Upgrade to 1.14.4

Change-Id: I2461c9ac95ddbacb251465ff1b29f6fa7461e9f8
diff --git a/debian/build-deps b/debian/build-deps
index 47f2c75..d558f70 100644
--- a/debian/build-deps
+++ b/debian/build-deps
@@ -3,13 +3,16 @@
 autopoint (>= 0.17)
 autotools-dev
 cdbs (>= 0.4.93)
-debhelper (>= 10)
+debhelper (>= 9)
 dh-autoreconf
 dpkg-dev (>= 1.15.1)
 flite-dev
 @GST_EXTRA_BUILD_DEPENDS@
 @GST_LIB_DEV_DEP@
-gstreamer@GST_ABI@-plugins-base (>= 1.12.0)
+gstreamer@GST_ABI@-doc
+gstreamer@GST_ABI@-plugins-base (>= 1.14.4)
+gstreamer@GST_ABI@-plugins-base-doc
+gtk-doc-tools (>= 1.12)
 ladspa-sdk
 libass-dev (>= 0.10.4)
 libbs2b-dev
@@ -20,22 +23,19 @@
 libdca-dev
 libde265-dev
 libdvdnav-dev (>= 4.1.2) [!hurd-any]
-libegl1-mesa-dev
 libexempi-dev
 libexif-dev (>= 0.6.16)
 libfaad-dev (>= 2.7)
 libfluidsynth-dev (>= 1.0)
-libgl1-mesa-dev
-libgles2-mesa-dev
 libglib2.0-dev (>= 2.40)
-libglu1-mesa-dev
 libgme-dev
 libgnutls28-dev (>= 2.11.3)
 libgsm1-dev
-libgstreamer-plugins-base@GST_ABI@-dev (>= 1.12.0)
+libgstreamer-plugins-base@GST_ABI@-dev (>= 1.14.4)
 libgtk-3-dev (>= 3.15.0)
 libiptcdata0-dev (>= 1.0.2)
 libkate-dev (>= 0.1.7)
+liblcms2-dev (>= 2.7)
 liblilv-dev (>= 0.16)
 libmjpegtools-dev
 libmms-dev (>= 0.4)
@@ -44,7 +44,8 @@
 libofa0-dev (>= 0.9.3)
 libopenal-dev (>= 1:1.14)
 libopenexr-dev
-libopenjp2-7-dev
+libopenjp2-7-dev (>= 2.1)
+libopenmpt-dev
 libopus-dev (>= 0.9.4)
 liborc-0.4-dev (>= 1:0.4.17)
 libpng-dev
@@ -53,7 +54,6 @@
 libsndfile1-dev (>= 1.0.16)
 libsoundtouch-dev (>= 1.5.0)
 libspandsp-dev
-libsrtp0-dev
 libssl-dev
 libtool (>= 2.2.6)
 libvo-aacenc-dev
diff --git a/debian/changelog b/debian/changelog
index 035e3d8..8b36ce0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+imx-gst-plugins-bad (1.14.4+imx-6) UNRELEASED; urgency=medium
+
+  * Update to 1.14.4
+
+ -- Coral <coral-support@google.com>  Thu, 06 Jun 2019 13:37:52 -0700
+
 imx-gst-plugins-bad (1.12.2+imx-5) mendel-chef; urgency=medium
 
   * Various waylandsink leak fixes
diff --git a/debian/control b/debian/control
index 10d0402..db61579 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,9 @@
 Source: imx-gst-plugins-bad
 Section: libs
 Priority: extra
-Maintainer: Coral <coral-support@google.com>
+Maintainer: Maintainers of GStreamer packages <gst-plugins-bad1.0@packages.debian.org>
+Uploaders: Sebastian Dröge <slomo@debian.org>,
+           Sjoerd Simons <sjoerd@debian.org>
 Build-Depends: autoconf (>= 2.69),
                automake (>= 1.14),
                autopoint (>= 0.17),
@@ -14,18 +16,20 @@
                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.4.0) [linux-any],
                libdrm-dev (>= 2.4.55) [linux-any],
                libdrm-imx-dev (>= 2.4.84+imx),
-               linux-headers-4.9.51-imx (>=1),
+               linux-headers-4.14.98-imx (>=1),
                wayland-protocols (>= 1.4) [linux-any],
                libvulkan-dev [linux-any],
-               libgstreamer1.0-dev (>= 1.12.0),
-               gstreamer1.0-plugins-base (>= 1.12.0),
+               libgstreamer1.0-dev (>= 1.14.4),
+               gtk-doc-tools (>= 1.12),
+               gstreamer1.0-doc,
+               gstreamer1.0-plugins-base (>= 1.14.4),
+               gstreamer1.0-plugins-base-doc,
                ladspa-sdk,
                libass-dev (>= 0.10.4),
                libbs2b-dev,
@@ -36,7 +40,6 @@
                libdca-dev,
                libde265-dev,
                libdvdnav-dev (>= 4.1.2) [!hurd-any],
-               libegl1-mesa-dev,
                libexempi-dev,
                libexif-dev (>= 0.6.16),
                libfaad-dev (>= 2.7),
@@ -44,14 +47,14 @@
                libgl1-mesa-dev,
                libgles2-mesa-dev,
                libglib2.0-dev (>= 2.40),
-               libglu1-mesa-dev,
                libgme-dev,
                libgnutls28-dev (>= 2.11.3),
                libgsm1-dev,
-               libgstreamer-plugins-base1.0-dev (>= 1.12.0),
+               libgstreamer-plugins-base1.0-dev (>= 1.14.4),
                libgtk-3-dev (>= 3.15.0),
                libiptcdata0-dev (>= 1.0.2),
                libkate-dev (>= 0.1.7),
+               liblcms2-dev (>= 2.7),
                liblilv-dev (>= 0.16),
                libmjpegtools-dev,
                libmms-dev (>= 0.4),
@@ -60,7 +63,8 @@
                libofa0-dev (>= 0.9.3),
                libopenal-dev (>= 1:1.14),
                libopenexr-dev,
-               libopenjp2-7-dev,
+               libopenjp2-7-dev (>= 2.1),
+               libopenmpt-dev,
                libopus-dev (>= 0.9.4),
                liborc-0.4-dev (>= 1:0.4.17),
                libpng-dev,
@@ -69,7 +73,6 @@
                libsndfile1-dev (>= 1.0.16),
                libsoundtouch-dev (>= 1.5.0),
                libspandsp-dev,
-               libsrtp0-dev,
                libssl-dev,
                libtool (>= 2.2.6),
                libvo-aacenc-dev,
@@ -77,6 +80,8 @@
                libwebp-dev (>= 0.2.1),
                libwebrtc-audio-processing-dev (>= 0.2),
                libwildmidi-dev (>= 0.2.3),
+               libx11-dev,
+               libx11-xcb-dev,
                libx265-dev,
                libxml2-dev (>= 2.8),
                libxvidcore-dev,
@@ -84,8 +89,32 @@
                nettle-dev,
                pkg-config (>= 0.11.0)
 Standards-Version: 3.9.8
-Homepage: http://gstreamer.freedesktop.org/modules/gst-plugins-bad.html
+Vcs-Git: https://salsa.debian.org/gstreamer-team/gst-plugins-bad1.0.git
+Vcs-Browser: https://salsa.debian.org/gstreamer-team/gst-plugins-bad1.0/
+Homepage: https://gstreamer.freedesktop.org
 
+Package: gstreamer1.0-plugins-bad-doc
+Architecture: all
+Multi-Arch: foreign
+Section: doc
+Depends: ${misc:Depends},
+         gstreamer1.0-doc,
+         gstreamer1.0-plugins-base-doc
+Description: GStreamer documentation for plugins 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 the documentation for plugins from the "bad" set.
+ 
 Package: gstreamer1.0-plugins-bad
 Architecture: any
 Multi-Arch: same
@@ -153,7 +182,7 @@
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends},
          ${shlibs:Depends},
-Description: GStreamer development files for libraries from the "bad" set
+Description: 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
@@ -171,6 +200,7 @@
 
 Package: libgstreamer-plugins-bad1.0-dev
 Architecture: any
+Multi-Arch: same
 Section: libdevel
 Priority: extra
 Depends: ${misc:Depends},
@@ -192,3 +222,4 @@
  .
  This package contains development files for GStreamer libraries from the
  "bad" set. The API is not guaranteed to be stable.
+
diff --git a/debian/gstreamer-plugins-bad-doc.install b/debian/gstreamer-plugins-bad-doc.install
new file mode 100644
index 0000000..133e6a2
--- /dev/null
+++ b/debian/gstreamer-plugins-bad-doc.install
@@ -0,0 +1 @@
+debian/tmp/usr/share/gtk-doc
diff --git a/debian/gstreamer-plugins-bad.install b/debian/gstreamer-plugins-bad.install
index 4a99beb..5845a3a 100644
--- a/debian/gstreamer-plugins-bad.install
+++ b/debian/gstreamer-plugins-bad.install
@@ -3,10 +3,10 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstadpcmenc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaiff.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiofxbad.so
-debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiomixer.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstasfmux.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstassrender.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiobuffersplit.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiolatency.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiomixmatrix.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstaudiovisualizers.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstautoconvert.so
@@ -17,6 +17,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcamerabin.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstchromaprint.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcoloreffects.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcolormanagement.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcompositor.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstcurl.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdashdemux.so
@@ -27,6 +28,7 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdvbsuboverlay.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstdvdspu.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstfaad.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstfaceoverlay.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstfestival.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstfieldanalysis.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstfreeverb.so
@@ -38,18 +40,19 @@
 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@/libgstgtk.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsthls.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
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstipcpipeline.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstivfparse.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstivtc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstkate.so
 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@/libgstlegacyrawparse.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstde265.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmidi.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmms.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstmodplug.so
@@ -62,12 +65,14 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstnetsim.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstofa.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopenal.so
-debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopengl.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopenglmixers.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopenexr.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopenjpeg.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopenmpt.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstopusparse.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstpcapparse.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstpnm.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstproxy.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstremovesilence.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrfbsrc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstrsvg.so
@@ -84,11 +89,11 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsoundtouch.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstspandsp.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstspeed.so
-debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsrtp.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgststereo.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstsubenc.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstteletext.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsttimecode.so
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstttmlsubs.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideofiltersbad.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideoframe_audiolevel.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstvideoparsersbad.so
@@ -103,7 +108,6 @@
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgsty4mdec.so
 debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/libgstyadif.so
 debian/tmp/usr/share/locale
-debian/tmp/usr/share/gstreamer-@GST_ABI@/presets/
 @dvb@
 @resindvd@
 @decklink@
@@ -112,3 +116,4 @@
 @waylandsink@
 @kms@
 @vcd@
+@vulkan@
diff --git a/debian/libgstreamer-plugins-bad-dev.install b/debian/libgstreamer-plugins-bad-dev.install
index 163b18c..ac87bac 100644
--- a/debian/libgstreamer-plugins-bad-dev.install
+++ b/debian/libgstreamer-plugins-bad-dev.install
@@ -1,4 +1,3 @@
 debian/tmp/usr/include
-debian/tmp/usr/lib/*/gstreamer-1.0/include
 debian/tmp/usr/lib/*/pkgconfig
 debian/tmp/usr/lib/*/*.so
diff --git a/debian/libgstreamer-plugins-bad.install b/debian/libgstreamer-plugins-bad.install
index 39a9bb8..588aec8 100644
--- a/debian/libgstreamer-plugins-bad.install
+++ b/debian/libgstreamer-plugins-bad.install
@@ -1,14 +1,13 @@
 debian/tmp/usr/lib/*/libgstadaptivedemux-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstphotography-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstbadaudio-@GST_ABI@.so.*
-debian/tmp/usr/lib/*/libgstbadallocators-@GST_ABI@.so.*
-debian/tmp/usr/lib/*/libgstbadbase-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstbadvideo-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstbasecamerabinsrc-@GST_ABI@.so.*
-debian/tmp/usr/lib/*/libgstgl-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstinsertbin-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstcodecparsers-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstmpegts-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgstplayer-@GST_ABI@.so.*
 debian/tmp/usr/lib/*/libgsturidownloader-@GST_ABI@.so.*
+debian/tmp/usr/lib/*/libgstisoff-@GST_ABI@.so.*
+debian/tmp/usr/lib/*/libgstwebrtc-@GST_ABI@.so.*
 @wayland@
diff --git a/debian/libgstreamer-plugins-bad1.0-0.lintian-overrides b/debian/libgstreamer-plugins-bad1.0-0.lintian-overrides
index e1ad105..2e9f2af 100644
--- a/debian/libgstreamer-plugins-bad1.0-0.lintian-overrides
+++ b/debian/libgstreamer-plugins-bad1.0-0.lintian-overrides
@@ -1 +1 @@
-libgstreamer-plugins-bad1.0-0: package-name-doesnt-match-sonames libgstadaptivedemux-1.0-0 libgstbadallocators-1.0-0 libgstbadaudio-1.0-0 libgstbadbase-1.0-0 libgstbadvideo-1.0-0 libgstbasecamerabinsrc-1.0-0 libgstcodecparsers-1.0-0 libgstgl-1.0-0 libgstinsertbin-1.0-0 libgstmpegts-1.0-0 libgstphotography-1.0-0 libgstplayer-1.0-0 libgsturidownloader-1.0-0 libgstwayland-1.0-0
+libgstreamer-plugins-bad1.0-0: package-name-doesnt-match-sonames libgstadaptivedemux-1.0-0 libgstbadaudio-1.0-0 libgstbadvideo-1.0-0 libgstbasecamerabinsrc-1.0-0 libgstcodecparsers-1.0-0 libgstinsertbin-1.0-0 libgstisoff-1.0-0 libgstmpegts-1.0-0 libgstphotography-1.0-0 libgstplayer-1.0-0 libgsturidownloader-1.0-0 libgstwayland-1.0-0 libgstwebrtc-1.0-0
diff --git a/debian/patches/01_fix-modplug-linking.patch b/debian/patches/01_fix-modplug-linking.patch
index 2a03069..d7cb05c 100644
--- a/debian/patches/01_fix-modplug-linking.patch
+++ b/debian/patches/01_fix-modplug-linking.patch
@@ -1,16 +1,17 @@
 Description: Tell libtool not to deduplicate linked libraries which causes problems in the case of circular deps. Force -lc to be added at the end.
 Author: Iain Lane <iain.lane@canonical.com>
 
---- a/ext/modplug/Makefile.am
-+++ b/ext/modplug/Makefile.am
-@@ -2,8 +2,8 @@
+Index: gst-plugins-bad1.0/ext/modplug/Makefile.am
+===================================================================
+--- gst-plugins-bad1.0.orig/ext/modplug/Makefile.am
++++ gst-plugins-bad1.0/ext/modplug/Makefile.am
+@@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstmodplug.la
  
  libgstmodplug_la_SOURCES = gstmodplug.cc
  libgstmodplug_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MODPLUG_CFLAGS)
 -libgstmodplug_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(LIBM) $(MODPLUG_LIBS)
+-libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 +libgstmodplug_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) $(LIBM) $(MODPLUG_LIBS) -lc
- libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
--libgstmodplug_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-+libgstmodplug_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --preserve-dup-deps
++libgstmodplug_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) --preserve-dup-deps
  
  noinst_HEADERS = gstmodplug.h
diff --git a/debian/patches/series b/debian/patches/series
index bf37309..6d1fff2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 01_fix-modplug-linking.patch
-0001-Don-t-include-non-existing-gst-allocators-gstdmabufd.patch
diff --git a/debian/rules b/debian/rules
index 5cc2f4e..232347a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,10 @@
 include /usr/share/cdbs/1/rules/utils.mk
 include /usr/share/cdbs/1/rules/autoreconf.mk
 
+# Work-around for gtk-doc bug:
+# https://bugzilla.gnome.org/show_bug.cgi?id=783926
+export PYTHONIOENCODING="utf-8"
+
 DEB_BUILD_PARALLEL = 1
 
 DEB_DH_AUTORECONF_ARGS += --as-needed
@@ -12,6 +16,7 @@
 CFLAGS += -Wno-error
 CXXFLAGS += -Wno-error
 LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
+DEB_MAKE_CHECK_TARGET = check || true
 
 # this is for compatibility with dpkg-dev < 1.13.5, see
 # <http://lists.debian.org/debian-devel-announce/2005/06/msg00010.html>
@@ -44,7 +49,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.12.0)
+gst_lib_dev_dep=$(gst_lib_dev) (>= 1.14.4)
 
 gst_pkgname=gstreamer$(gst_abi)
 gst_deb_abi=$(gst_abi)-0
@@ -62,18 +67,12 @@
 gst_extra_build_depends += , wayland-protocols (>= 1.4) [linux-any]
 gst_extra_build_depends += , libvulkan-dev [linux-any]
 
-# The plugins are basically the same.
-# Link special names to a template file.
-# still need "*.install" to be done by hand
-# 
-# EXTRA_PLUGINS: See debian/README.Debian for docs
-EXTRA_PLUGINS +=
-
-PLUGINS += plugins-bad $(EXTRA_PLUGINS)
+PLUGINS += plugins-bad
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 PLUGINS +=
 endif
 VERSIONIZE= \
+	plugins-bad-doc.install \
 
 #debug package
 DEB_DH_STRIP_ARGS := --dbg-package=$(gst_pkgname)-plugins-bad-dbg
@@ -111,7 +110,6 @@
 	# HACK in ion.h
 	mkdir -p extinc/linux
 	find /usr/src/*/include/uapi -name ion.h -exec cp {} extinc/linux \;
-
 	for p in $(PLUGINS); do \
 		rm -f debian/$(gst_pkgname)-$$p.install; \
 		sed \
@@ -156,12 +154,11 @@
 	--disable-pvr \
 	--disable-mpeg2enc \
 	--disable-mplex \
-	--enable-wayland \
-	--disable-x11 \
-	--disable-glx \
-	--disable-opengl \
-	--enable-gles2 \
 
+# only build the docs on arches which can
+ifeq (,$(findstring $(DEB_HOST_ARCH),m68k arm))
+DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc
+endif
 
 common-binary-fixup-arch::
 	LD_LIBRARY_PATH=debian/libgstreamer-plugins-bad1.0-0/usr/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH) \
@@ -177,10 +174,10 @@
 		rm -f debian/$(gst_pkgname)-$$f; \
 	done
 
-gst_patch = $(shell echo $(gst_version) | cut -d '.' -f 3)
+gst_patch = $(shell echo $(gst_version) | cut -d '.' -f 2)
 gst_patch_next = $(shell expr $(gst_patch) + 1)
-gst_version_next = $(shell echo $(gst_version) | cut -d '.' -f-2).$(gst_patch_next)
-DEB_DH_MAKESHLIBS_ARGS_libgstreamer-plugins-bad$(gst_deb_abi) += -V "libgstreamer-plugins-bad$(gst_deb_abi) (>= $(gst_version))"
+gst_version_next = $(shell echo $(gst_version) | cut -d '.' -f-1).$(gst_patch_next)
+DEB_DH_MAKESHLIBS_ARGS_libgstreamer-plugins-bad$(gst_deb_abi) += -V "libgstreamer-plugins-bad$(gst_deb_abi) (>= $(gst_version)), libgstreamer-plugins-bad$(gst_deb_abi) (<< $(gst_version_next))"
 DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS
 
 # Disable inclusion of large upstream ChangeLog
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..1b7b8ff
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-(1\.[\d\.]+)\.tar\.xz