From a1e0ce5940a0384e2db7381ffae7d82c1ac68375 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 10:23:39 +0200
Subject: [PATCH 1/9] gstreamer1: update to 1.16.0.

---
 .../gstreamer1/patches/no-gir-automagic.patch | 13 ++++++
 srcpkgs/gstreamer1/template                   | 42 +++++++++----------
 2 files changed, 32 insertions(+), 23 deletions(-)
 create mode 100644 srcpkgs/gstreamer1/patches/no-gir-automagic.patch

diff --git a/srcpkgs/gstreamer1/patches/no-gir-automagic.patch b/srcpkgs/gstreamer1/patches/no-gir-automagic.patch
new file mode 100644
index 00000000000..c0135214edd
--- /dev/null
+++ b/srcpkgs/gstreamer1/patches/no-gir-automagic.patch
@@ -0,0 +1,13 @@
+diff --git a/meson.build b/meson.build
+index e738c55..e1b8d93 100644
+--- meson.build
++++ meson.build
+@@ -451,7 +451,7 @@ rt_lib = cc.find_library('rt', required : false)
+ gir = find_program('g-ir-scanner', required : get_option('introspection'))
+ gnome = import('gnome')
+ 
+-build_gir = gir.found() and not meson.is_cross_build()
++build_gir = gir.found()
+ 
+ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
+     'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
diff --git a/srcpkgs/gstreamer1/template b/srcpkgs/gstreamer1/template
index 4f419e38488..4bcdf03012b 100644
--- a/srcpkgs/gstreamer1/template
+++ b/srcpkgs/gstreamer1/template
@@ -1,40 +1,34 @@
 # Template file for 'gstreamer1'
 pkgname=gstreamer1
-version=1.14.5
+version=1.16.0
 revision=1
 wrksrc="gstreamer-${version}"
-build_style=gnu-configure
+build_style=meson
 build_helper="gir"
-configure_args="--disable-valgrind --enable-docbook
- --with-package-origin=http://www.voidlinux.org $(vopt_enable gir introspection)"
-hostmakedepends="automake gettext-devel libtool pkg-config flex python
- docbook-xsl glib-devel"
-makedepends="libxml2-devel libglib-devel"
+configure_args="-Dptp-helper-permissions=capabilities
+ -Dpackage-origin=https://www.voidlinux.org -Ddbghelp=disabled
+ -Dintrospection=$(vopt_if gir enabled disabled)
+ -Dgtk_doc=$(vopt_if gtk_doc enabled disabled)"
+hostmakedepends="gettext-devel pkg-config flex python docbook-xsl glib-devel
+ libcap-progs $(vopt_if gtk_doc gtk-doc)"
+makedepends="libxml2-devel libglib-devel gtk+3-devel libcap-devel libunwind-devel
+ bash-completion"
 short_desc="Core GStreamer libraries and elements (1.x)"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="LGPL-2.0-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/gstreamer/gstreamer-${version}.tar.xz"
-checksum=e40888752883177e97b2d90cd68591f87ccd213dc0178ff721d80a4cdaad34b5
+checksum=0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00
 
 # Package build options
-build_options="gir"
+build_options="gir gtk_doc"
 build_options_default="gir"
 
-pre_configure() {
-	# Remove a non-existing include path from the gstreamer.pc.in file,
-	# or otherwise building pkgs which enable -Werror fail to build with
-	# gcc-6.2.1 which issues a warning for non existing -I/some/path args.
-	# There is no ./usr/lib/gstreamer-1.0/include path in this pkg.
-	sed -i pkgconfig/gstreamer.pc.in \
-		-e 's; -I${libdir}/gstreamer-@GST_API_VERSION@/include;;'
-	NOCONFIGURE=1 ./autogen.sh
-}
+desc_option_gtk_doc="Build GTK Documentation with gtk-doc"
 
-pre_build() {
-	 # Export paths for gobject introspection
-	 export GIR_EXTRA_LIBS_PATH="${wrksrc}/gst/.libs:${wrksrc}/libs/gst/base/.libs"
-}
+if [ -z "$CROSS_BUILD" ]; then
+	build_options_default+=" gtk_doc"
+fi
 
 gstreamer1-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
@@ -43,7 +37,9 @@ gstreamer1-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove "usr/lib/*.so"
-		vmove usr/share/gtk-doc
+		if [ "$build_option_gtk_doc" ]; then
+			vmove usr/share/gtk-doc
+		fi
 		vmove usr/share/aclocal
 		if [ "$build_option_gir" ]; then
 			vmove "usr/share/gir*"

From 5bdee4cacc328d222412830b3a1ab48af0204bfe Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 10:58:49 +0200
Subject: [PATCH 2/9] gst-plugins-base1: update to 1.16.0.

---
 .../patches/no-gir-automagic.patch            |  11 ++
 srcpkgs/gst-plugins-base1/patches/sndio.patch | 169 ++++++------------
 srcpkgs/gst-plugins-base1/template            |  28 +--
 3 files changed, 77 insertions(+), 131 deletions(-)
 create mode 100644 srcpkgs/gst-plugins-base1/patches/no-gir-automagic.patch

diff --git a/srcpkgs/gst-plugins-base1/patches/no-gir-automagic.patch b/srcpkgs/gst-plugins-base1/patches/no-gir-automagic.patch
new file mode 100644
index 00000000000..f1226041ae6
--- /dev/null
+++ b/srcpkgs/gst-plugins-base1/patches/no-gir-automagic.patch
@@ -0,0 +1,11 @@
+--- meson.build	2019-06-09 10:53:06.607859182 +0200
++++ meson.build	2019-06-09 10:53:24.953088389 +0200
+@@ -356,7 +356,7 @@
+ 
+ gir = find_program('g-ir-scanner', required : get_option('introspection'))
+ gnome = import('gnome')
+-build_gir = gir.found() and not meson.is_cross_build()
++build_gir = gir.found()
+ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
+     'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
+     'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
diff --git a/srcpkgs/gst-plugins-base1/patches/sndio.patch b/srcpkgs/gst-plugins-base1/patches/sndio.patch
index 8173db6ab7d..fe61fb88e67 100644
--- a/srcpkgs/gst-plugins-base1/patches/sndio.patch
+++ b/srcpkgs/gst-plugins-base1/patches/sndio.patch
@@ -1,115 +1,21 @@
-Source: OpenBSD ports
+Source: OpenBSD ports, adapted to work with meson
 Upstream: No
 Reason: sndio support
 
-
-diff --git configure.ac configure.ac
-index 1287583a6..5cb12c7db 100644
---- configure.ac
-+++ configure.ac
-@@ -634,6 +634,20 @@ AG_GST_CHECK_FEATURE(ALSA, [ALSA], alsa, [
-   ])
- ])
- 
-+dnl *** sndio ***
-+AG_GST_CHECK_FEATURE(SNDIO, [sndio audio], sndio, [
-+  AC_CHECK_HEADER(sndio.h, HAVE_SNDIO="yes", HAVE_SNDIO="no")
-+  if test $HAVE_SNDIO = yes
-+  then
-+    AC_CHECK_LIB(sndio, sio_open, HAVE_SNDIO="yes", HAVE_SNDIO="no", [])
-+    if test $HAVE_SNDIO = yes
-+    then
-+      SNDIO_LIBS=-lsndio
-+      AC_SUBST(SNDIO_LIBS)
-+    fi
-+  fi
-+])
-+
- dnl *** CDParanoia ***
- dnl Note: upstream has a pkg-config file only in post-10.2 SVN so far
- translit(dnm, m, l) AM_CONDITIONAL(USE_CDPARANOIA, true)
-@@ -789,6 +803,7 @@ else
- dnl not building plugins with external dependencies,
- dnl but we still need to set the conditionals
- AM_CONDITIONAL(USE_ALSA, false)
-+AM_CONDITIONAL(USE_SNDIO, false)
- AM_CONDITIONAL(USE_CDPARANOIA, false)
- AM_CONDITIONAL(USE_GL, false)
- AM_CONDITIONAL(USE_IVORBIS, false)
-@@ -930,6 +945,7 @@ sys/ximage/Makefile
- sys/xvimage/Makefile
- ext/Makefile
- ext/alsa/Makefile
-+ext/sndio/Makefile
- ext/cdparanoia/Makefile
- ext/gl/Makefile
- ext/libvisual/Makefile
-diff --git ext/Makefile.am ext/Makefile.am
-index c70b212d6..c28b8a3ea 100644
---- ext/Makefile.am
-+++ ext/Makefile.am
-@@ -4,6 +4,12 @@ else
- ALSA_DIR=
- endif
- 
-+if USE_SNDIO
-+SNDIO_DIR=sndio
-+else
-+SNDIO_DIR=
-+endif
-+
- if USE_CDPARANOIA
- CDPARANOIA_DIR=cdparanoia
- else
-@@ -62,6 +68,7 @@ endif
- 
- SUBDIRS = \
-   $(ALSA_DIR) \
-+  $(SNDIO_DIR) \
-   $(CDPARANOIA_DIR) \
-   $(GL_DIR) \
-   $(LIBVISUAL_DIR) \
-@@ -73,6 +80,7 @@ SUBDIRS = \
- 
- DIST_SUBDIRS = \
-   alsa \
-+  sndio \
-   cdparanoia \
-   gl \
-   libvisual \
-diff --git ext/sndio/Makefile.am ext/sndio/Makefile.am
-new file mode 100644
-index 000000000..7b782de8a
---- /dev/null
-+++ ext/sndio/Makefile.am
-@@ -0,0 +1,24 @@
-+plugin_LTLIBRARIES = libgstsndio.la
-+
-+libgstsndio_la_SOURCES = \
-+	gstsndio.c \
-+	sndiosink.c \
-+	sndiosrc.c
-+
-+libgstsndio_la_CFLAGS = \
-+	$(GST_PLUGINS_BASE_CFLAGS) \
-+        $(GST_BASE_CFLAGS) \
-+	$(GST_CFLAGS)
-+	$(SNDIO_CFLAGS)
-+libgstsndio_la_LIBADD = \
-+	$(top_builddir)/gst-libs/gst/audio/libgstaudio-$(GST_API_VERSION).la \
-+	$(GST_BASE_LIBS) \
-+	$(SNDIO_LIBS)
-+
-+libgstsndio_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-+libgstsndio_la_LIBTOOLFLAGS = --tag=disable-static
-+
-+noinst_HEADERS = \
-+	gstsndio.h \
-+	sndiosink.h \
-+	sndiosrc.h
+diff --git ext/meson.build ext/meson.build
+index d984b50..5f0becc 100644
+--- ext/meson.build
++++ ext/meson.build
+@@ -5,5 +5,6 @@ subdir('libvisual')
+ subdir('ogg')
+ subdir('opus')
+ subdir('pango')
++subdir('sndio')
+ subdir('theora')
+ subdir('vorbis')
 diff --git ext/sndio/gstsndio.c ext/sndio/gstsndio.c
 new file mode 100644
-index 000000000..2321dc208
+index 0000000..2321dc2
 --- /dev/null
 +++ ext/sndio/gstsndio.c
 @@ -0,0 +1,401 @@
@@ -516,7 +422,7 @@ index 000000000..2321dc208
 +}
 diff --git ext/sndio/gstsndio.h ext/sndio/gstsndio.h
 new file mode 100644
-index 000000000..77ec4e6f8
+index 0000000..77ec4e6
 --- /dev/null
 +++ ext/sndio/gstsndio.h
 @@ -0,0 +1,78 @@
@@ -598,9 +504,36 @@ index 000000000..77ec4e6f8
 +GstCaps *gst_sndio_caps (gpointer sio, int mode, struct sio_hdl *hdl);
 +
 +#endif
+diff --git ext/sndio/meson.build ext/sndio/meson.build
+new file mode 100644
+index 0000000..3f9a9fe
+--- /dev/null
++++ ext/sndio/meson.build
+@@ -0,0 +1,21 @@
++sndio_sources = [
++  'gstsndio.c',
++  'sndiosink.c',
++  'sndiosrc.c',
++]
++
++cc =  meson.get_compiler('c')
++
++sndio_dep = cc.find_library('sndio', required : get_option('sndio'))
++
++if sndio_dep.found()
++  gstsndio = library('gstsndio',
++    sndio_sources,
++	c_args : gst_plugins_base_args,
++  include_directories: [configinc, libsinc],
++  dependencies: [gst_base_dep, sndio_dep, audio_dep],
++    install : true,
++    install_dir : plugins_install_dir,
++  )
++  pkgconfig.generate(gstsndio, install_dir : plugins_pkgconfig_install_dir)
++endif
 diff --git ext/sndio/sndiosink.c ext/sndio/sndiosink.c
 new file mode 100644
-index 000000000..cc68bd29d
+index 0000000..cc68bd2
 --- /dev/null
 +++ ext/sndio/sndiosink.c
 @@ -0,0 +1,226 @@
@@ -832,7 +765,7 @@ index 000000000..cc68bd29d
 +}
 diff --git ext/sndio/sndiosink.h ext/sndio/sndiosink.h
 new file mode 100644
-index 000000000..314e62210
+index 0000000..314e622
 --- /dev/null
 +++ ext/sndio/sndiosink.h
 @@ -0,0 +1,57 @@
@@ -895,7 +828,7 @@ index 000000000..314e62210
 +#endif /* __GST_SNDIOSINK_H__ */
 diff --git ext/sndio/sndiosrc.c ext/sndio/sndiosrc.c
 new file mode 100644
-index 000000000..5b6d787c5
+index 0000000..5b6d787
 --- /dev/null
 +++ ext/sndio/sndiosrc.c
 @@ -0,0 +1,225 @@
@@ -1126,7 +1059,7 @@ index 000000000..5b6d787c5
 +}
 diff --git ext/sndio/sndiosrc.h ext/sndio/sndiosrc.h
 new file mode 100644
-index 000000000..83fd29ce4
+index 0000000..83fd29c
 --- /dev/null
 +++ ext/sndio/sndiosrc.h
 @@ -0,0 +1,57 @@
@@ -1187,3 +1120,15 @@ index 000000000..83fd29ce4
 +G_END_DECLS
 +
 +#endif /* __GST_SNDIOSRC_H__ */
+diff --git meson_options.txt meson_options.txt
+index e7af4dd..827507f 100644
+--- meson_options.txt
++++ meson_options.txt
+@@ -58,6 +58,7 @@ option('libvisual', type : 'feature', value : 'auto', description : 'libvisual a
+ option('ogg', type : 'feature', value : 'auto', description : 'ogg parser, muxer, demuxer plugin')
+ option('opus', type : 'feature', value : 'auto', description : 'OPUS audio codec plugin')
+ option('pango', type : 'feature', value : 'auto', description : 'Pango text rendering and overlay plugin')
++option('sndio', type : 'feature', value : 'auto', description : 'sndio support')
+ option('theora', type : 'feature', value : 'auto', description : 'Theora video parser and codec plugin')
+ option('tremor', type : 'feature', value : 'auto', description : 'Integer Vorbis decoder plugin for devices without floating point')
+ option('vorbis', type : 'feature', value : 'auto', description : 'Vorbis audio parser, tagger, and codec plugin')
diff --git a/srcpkgs/gst-plugins-base1/template b/srcpkgs/gst-plugins-base1/template
index f28fcc0b1a7..aa098aecb0e 100644
--- a/srcpkgs/gst-plugins-base1/template
+++ b/srcpkgs/gst-plugins-base1/template
@@ -1,26 +1,27 @@
 # Template file for 'gst-plugins-base1'
 pkgname=gst-plugins-base1
-version=1.14.5
+version=1.16.0
 revision=1
 wrksrc="${pkgname/1/}-${version}"
-build_style=gnu-configure
+build_style=meson
 build_helper="gir"
-configure_args="--enable-experimental --disable-static
- $(vopt_enable gir introspection) $(vopt_enable cdparanoia) $(vopt_enable sndio)"
-hostmakedepends="automake gettext-devel libtool python pkg-config
- glib-devel"
+configure_args="-Dtremor=disabled -Dexamples=disabled -Dgtk_doc=disabled
+ -Dcdparanoia=$(vopt_if cdparanoia enabled disabled)
+ -Dintrospection=$(vopt_if gir enabled disabled)
+ -Dsndio=$(vopt_if sndio enabled disabled)"
+hostmakedepends="gettext-devel pkg-config glib-devel orc"
 makedepends="gstreamer1-devel glib-devel libxml2-devel pango-devel
  cairo-devel liboil-devel alsa-lib-devel libXv-devel libXext-devel
  libvisual-devel libgudev-devel libtheora-devel libvorbis-devel
  libSM-devel orc-devel $(vopt_if cdparanoia libcdparanoia-devel)
- opus-devel MesaLib-devel $(vopt_if sndio sndio-devel)"
+ opus-devel MesaLib-devel $(vopt_if sndio sndio-devel) graphene-devel"
 depends="orc>=0.4.18 gstreamer1>=${version}"
 short_desc="GStreamer Base Plug-ins (v1.x)"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.0-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/${pkgname/1/}/${pkgname/1/}-${version}.tar.xz"
-checksum=7bfa9b329ea7f3c654fa1b2d43650bf2646598a5e3cb21f42c516b7e975d638e
+checksum=4093aa7b51e28fb24dfd603893fead8d1b7782f088b05ed0f22a21ef176fb5ae
 
 case "$XBPS_TARGET_MACHINE" in
 	i686*) CFLAGS="-O2 -msse2";;
@@ -30,16 +31,6 @@ esac
 build_options="cdparanoia gir sndio"
 build_options_default="cdparanoia gir sndio"
 
-pre_configure() {
-	NOCONFIGURE=1 ./autogen.sh
-}
-
-pre_build() {
-	vsed \
-		-e '/--library/a --library-path="$(top_builddir)/gst-libs/gst/sdp/.libs" \\' \
-		-i gst-libs/gst/rtsp/Makefile
-}
-
 gst-plugins-base1-devel_package() {
 	depends="gstreamer1-devel>=${version} ${sourcepkg}>=${version}_${revision} orc-devel"
 	short_desc+=" - development files"
@@ -47,7 +38,6 @@ gst-plugins-base1-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove "usr/lib/*.so"
-		vmove usr/share/gtk-doc
 		if [ "$build_option_gir" ]; then
 			vmove "usr/share/gir*"
 		fi

From 0d07dbcf88522a4d70955d536ffd2a5134ff0cda Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 11:27:51 +0200
Subject: [PATCH 3/9] gst-plugins-good1: update to 1.16.0.

---
 srcpkgs/gst-plugins-good1/template | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/gst-plugins-good1/template b/srcpkgs/gst-plugins-good1/template
index 435febbcbeb..f4d640ef740 100644
--- a/srcpkgs/gst-plugins-good1/template
+++ b/srcpkgs/gst-plugins-good1/template
@@ -1,29 +1,28 @@
 # Template file for 'gst-plugins-good1'
 pkgname=gst-plugins-good1
-version=1.14.5
+version=1.16.0
 revision=1
 wrksrc="${pkgname/1/}-${version}"
 lib32disabled=yes
-build_style=gnu-configure
-configure_args="--with-gudev --with-libv4l2 --enable-experimental
- --enable-libcaca --disable-libdv --disable-dv1394 --disable-shout2
- --enable-aalib --enable-speex"
+build_style=meson
+configure_args="-Ddv=disabled -Ddv1394=disabled -Dshout2=disabled"
 # XXX: libdv, dv1394 and shout2 modules.
-hostmakedepends="pkg-config intltool python glib-devel"
+hostmakedepends="pkg-config intltool glib-devel qt5-qmake orc qt5-host-tools"
 makedepends="
  libpng-devel libxml2-devel libgudev-devel libflac-devel
  libXdamage-devel aalib-devel libcaca-devel
  taglib-devel libsoup-gnome-devel gst-plugins-base1-devel
  pulseaudio-devel orc-devel libXv-devel wavpack-devel
  v4l-utils-devel jack-devel speex-devel libvpx-devel lame-devel
- mpg123-devel twolame-devel $(vopt_if gtk3 gtk+3-devel)"
+ mpg123-devel twolame-devel $(vopt_if gtk3 gtk+3-devel) qt5-devel
+ qt5-declarative-devel  qt5-x11extras-devel qt5-wayland-devel"
 depends="gst-plugins-base1>=${version}"
 short_desc="GStreamer set of well-maintained good plug-ins (1.x)"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/${pkgname/1/}/${pkgname/1/}-${version}.tar.xz"
-checksum=678221b3f0208b31b90df3ffa509857cc8bfc337f3f5073d195c5b365d616503
+checksum=654adef33380d604112f702c2927574cfc285e31307b79e584113858838bb0fd
 
 build_options="gtk3"
 build_options_default="gtk3"

From a872220000913af42b98a579ebf7ec4314a944c1 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 12:38:58 +0200
Subject: [PATCH 4/9] gst-plugins-ugly1: update to 1.16.0.

---
 srcpkgs/gst-plugins-ugly1/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/gst-plugins-ugly1/template b/srcpkgs/gst-plugins-ugly1/template
index f6c4e316435..8af690d6240 100644
--- a/srcpkgs/gst-plugins-ugly1/template
+++ b/srcpkgs/gst-plugins-ugly1/template
@@ -1,11 +1,11 @@
 # Template file for 'gst-plugins-ugly1'.
 pkgname=gst-plugins-ugly1
-version=1.14.5
+version=1.16.0
 revision=1
 lib32disabled=yes
 wrksrc="${pkgname/1/}-${version}"
-build_style=gnu-configure
-configure_args="--enable-experimental"
+build_style=meson
+configure_args="-Damrnb=disabled -Damrwbdec=disabled -Dsidplay=disabled"
 # XXX add required pkgs for the amr, sid plugins.
 hostmakedepends="pkg-config intltool python"
 makedepends="glib-devel libxml2-devel gst-plugins-base1-devel
@@ -17,4 +17,4 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/${pkgname/1/}/${pkgname/1/}-${version}.tar.xz"
-checksum=3ed802727286f18a9331cfed6ee85d07744d87cf868baae976615441f4bee04b
+checksum=e30964c5f031c32289e0b25e176c3c95a5737f2052dfc81d0f7427ef0233a4c2

From 3a68abd333e31a3f7c25646e6ed6315d232a82d6 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 12:44:57 +0200
Subject: [PATCH 5/9] lilv-devel: fix dependencies

---
 srcpkgs/lilv/template | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 680c7c6de43..ce76b44b355 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,12 +1,12 @@
 # Template file for 'lilv'
 pkgname=lilv
 version=0.24.4
-revision=1
+revision=2
 build_style=waf
 configure_args="--dyn-manifest"
 hostmakedepends="pkg-config python"
 makedepends="python-devel serd-devel sord-devel sratom-devel lv2"
-short_desc="A simple yet powerful C API for using LV2 plugins"
+short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="ISC"
 homepage="http://drobilla.net/software/lilv/"
@@ -36,7 +36,7 @@ lilv-bash-completion_package() {
 }
 
 lilv-devel_package() {
-	depends="sord-devel liblilv>=${version}_${revision}"
+	depends="serd-devel sord-devel sratom-devel lv2 liblilv>=${version}_${revision}"
 	short_desc+=" - Development files"
 	pkg_install() {
 		vmove usr/include

From dfd7a35c70808c04c26934df27e283fcc375ab0d Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 13:09:39 +0200
Subject: [PATCH 6/9] common/shlibs: add shared libraries for flite

---
 common/shlibs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/shlibs b/common/shlibs
index d8eb9bbbeb6..c4e14ce3d09 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3468,5 +3468,9 @@ libqaccessibilityclient-qt5.so.0 libqaccessibilityclient-0.4.0_1
 libnitrokey.so.3 libnitrokey-3.4.1_1
 libceres.so.1 ceres-solver-1.14.0_1
 libgraphene-1.0.so.0 graphene-1.8.2_1
+libflite.so.1 flite-2.1_1
+libflite_cmu_us_kal.so.1 flite-2.1_1
+libflite_usenglish.so.1 flite-2.1_1
+libflite_cmulex.so.1 flite-2.1_1
 libgtk-4.so.0.9400.0 gtk4-3.94.0_1
 libmodule.so.4 libmodule-4.1.0_1

From 69c7afaf845581e9637b39c0c29576edf2bf76e3 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 13:20:14 +0200
Subject: [PATCH 7/9] gst-plugins-bad1: update to 1.16.0.

---
 .../patches/no-gir-automagic.patch            | 11 +++++
 srcpkgs/gst-plugins-bad1/template             | 41 ++++++++++++-------
 2 files changed, 37 insertions(+), 15 deletions(-)
 create mode 100644 srcpkgs/gst-plugins-bad1/patches/no-gir-automagic.patch

diff --git a/srcpkgs/gst-plugins-bad1/patches/no-gir-automagic.patch b/srcpkgs/gst-plugins-bad1/patches/no-gir-automagic.patch
new file mode 100644
index 00000000000..68c74ee18e5
--- /dev/null
+++ b/srcpkgs/gst-plugins-bad1/patches/no-gir-automagic.patch
@@ -0,0 +1,11 @@
+--- meson.build	2019-06-09 12:56:31.309473261 +0200
++++ meson.build	2019-06-09 12:56:46.166649265 +0200
+@@ -405,7 +405,7 @@
+ 
+ gir = find_program('g-ir-scanner', required : get_option('introspection'))
+ gnome = import('gnome')
+-build_gir = gir.found() and not meson.is_cross_build()
++build_gir = gir.found()
+ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
+     'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
+     'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index 7b361e44836..d145a0158c6 100644
--- a/srcpkgs/gst-plugins-bad1/template
+++ b/srcpkgs/gst-plugins-bad1/template
@@ -1,12 +1,21 @@
 # Template file for 'gst-plugins-bad1'
 pkgname=gst-plugins-bad1
-version=1.14.5
+version=1.16.0
 revision=1
 wrksrc="${pkgname/1/}-${version}"
-build_style=gnu-configure
-configure_args="--enable-experimental --disable-static"
-hostmakedepends="automake gettext-devel libtool pkg-config intltool python glib-devel
- gobject-introspection"
+build_helper="gir"
+build_style=meson
+configure_args="-Dpackage-origin=https://voidlinux.org -Dgtk_doc=false
+ -Dopencv=disabled -Dmsdk=disabled -Dopensles=disabled -Dtinyalsa=disabled
+ -Dwasapi=disabled -Dnvenc=disabled -Dnvdec=disabled -Ddc1394=disabled
+ -Diqa=disabled -Dkate=disabled -Dlibde265=disabled -Dmpeg2enc=disabled
+ -Dmplex=disabled -Dmusepack=disabled -Dofa=disabled -Dopenexr=disabled
+ -Dopenh264=disabled -Dopenmpt=disabled -Dopenni2=disabled -Dsctp=disabled
+ -Dsrt=disabled -Dteletext=disabled -Dvoaacenc=disabled -Dvoamrwbenc=disabled
+ -Dwildmidi=disabled -Dwpe=disabled
+ -Ddirectfb=disabled -Dintrospection=$(vopt_if gir enabled disabled)"
+hostmakedepends="automake gettext-devel libtool pkg-config python glib-devel
+ orc"
 makedepends="alsa-lib-devel celt-devel libressl-devel exempi-devel
  gst-plugins-base1-devel libdca-devel orc-devel libmms-devel
  libexif-devel libmpcdec-devel faac-devel SDL-devel libpng-devel
@@ -14,23 +23,26 @@ makedepends="alsa-lib-devel celt-devel libressl-devel exempi-devel
  xvidcore-devel jasper-devel libmodplug-devel neon-devel libcurl-devel
  libvdpau-devel libgsm-devel librtmp-devel libass-devel libvpx-devel
  soundtouch-devel opus-devel libwebp-devel wayland-devel x265-devel
- libsrtp-devel libopenal-devel gtk+3-devel libnice-devel"
+ libsrtp-devel libopenal-devel gtk+3-devel libnice-devel libbluetooth-devel
+ libgudev-devel libusb-devel libaom-devel libbs2b-devel chromaprint-devel
+ fdk-aac-devel flite-devel fluidsynth-devel libgme-devel liblrdf-devel
+ ladspa-sdk lilv-devel lv2 libopenjpeg2-devel sbc-devel spandsp-devel
+ vulkan-loader Vulkan-Headers webrtc-audio-processing-devel libzbar-devel"
 depends="gst-plugins-base1>=${version}"
 short_desc="GStreamer plugins from the bad set (v1.x)"
 maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="GPL-2.0-or-later, LGPL-2.1-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/${pkgname/1/}/${pkgname/1/}-${version}.tar.xz"
-checksum=44da47126349fde90aed6c5ed0915f3b43f1d8802cd827139eb15a1fff1c6ad2
-lib32disabled=yes
+checksum=22139de35626ada6090bdfa3423b27b7fc15a0198331d25c95e6b12cb1072b05
 
-if [ "${CROSS_BUILD}" ]; then
-	configure_args+=" --enable-introspection=no"
-fi
+build_options="gir"
 
-pre_configure() {
-	NOCONFIGURE=1 ./autogen.sh
-}
+case "$XBPS_TARGET_MACHINE" in
+	i686-musl|x86_64-musl) build_options_default+=" gir" ;;
+	*-musl) ;;
+	*) build_options_default+=" gir" ;;
+esac
 
 gst-plugins-bad1-devel_package() {
 	depends="gst-plugins-base1-devel>=${version} ${sourcepkg}>=${version}_${revision}"
@@ -39,7 +51,6 @@ gst-plugins-bad1-devel_package() {
 		vmove usr/include
 		vmove usr/lib/pkgconfig
 		vmove usr/lib/*.so
-		vmove usr/share/gtk-doc
 		if [ ! "${CROSS_BUILD}" ]; then
 			vmove "usr/share/gir*"
 		fi

From baccdd38a2ef4ad7ec3e20a72fe91d8dc8465626 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 13:28:35 +0200
Subject: [PATCH 8/9] gst-libav: update to 1.16.0.

---
 srcpkgs/gst-libav/patches/ffmpeg4.patch | 661 ------------------------
 srcpkgs/gst-libav/template              |  15 +-
 2 files changed, 4 insertions(+), 672 deletions(-)
 delete mode 100644 srcpkgs/gst-libav/patches/ffmpeg4.patch

diff --git a/srcpkgs/gst-libav/patches/ffmpeg4.patch b/srcpkgs/gst-libav/patches/ffmpeg4.patch
deleted file mode 100644
index 6cf496baa74..00000000000
--- a/srcpkgs/gst-libav/patches/ffmpeg4.patch
+++ /dev/null
@@ -1,661 +0,0 @@
-source: https://gitlab.collabora.com/nicolas/gst-ffmpeg/commit/b529e05a6ad5a8226d2fcbdcc2cde1be09e5ecba
-
-From b529e05a6ad5a8226d2fcbdcc2cde1be09e5ecba Mon Sep 17 00:00:00 2001
-From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
-Date: Fri, 27 Apr 2018 16:06:28 -0400
-Subject: [PATCH] WIP: Port to FFMPEG 4.X
-
----
- ext/libav/gstav.c         |  4 ++--
- ext/libav/gstavauddec.c   | 20 ++++++++++----------
- ext/libav/gstavaudenc.c   |  7 +++----
- ext/libav/gstavcfg.c      | 59 ++++++++++++++++++++++++++++++++++++++---------------------
- ext/libav/gstavcodecmap.c | 29 +++++++++++++++--------------
- ext/libav/gstavcodecmap.h |  2 +-
- ext/libav/gstavscale.c    |  4 ++--
- ext/libav/gstavviddec.c   | 33 +++++++++++++++------------------
- ext/libav/gstavvidenc.c   | 40 ++++++++++++++++++++++------------------
- 9 files changed, 108 insertions(+), 90 deletions(-)
-
-diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c
-index 0b9da42..10d8423 100644
---- a/ext/libav/gstav.c
-+++ b/ext/libav/gstav.c
-@@ -30,7 +30,7 @@
- 
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
--#include <libavfilter/avfiltergraph.h>
-+//#include <libavfilter/avfiltergraph.h>
- 
- #include "gstav.h"
- #include "gstavutils.h"
-@@ -158,7 +158,7 @@ plugin_init (GstPlugin * plugin)
-   gst_ffmpeg_init_pix_fmt_info ();
- 
-   av_register_all ();
--  avfilter_register_all ();
-+  //avfilter_register_all ();
- 
-   gst_ffmpegaudenc_register (plugin);
-   gst_ffmpegvidenc_register (plugin);
-diff --git a/ext/libav/gstavauddec.c b/ext/libav/gstavauddec.c
-index 9aa45e3..fd25efd 100644
---- a/ext/libav/gstavauddec.c
-+++ b/ext/libav/gstavauddec.c
-@@ -283,7 +283,7 @@ gst_ffmpegauddec_propose_allocation (GstAudioDecoder * decoder,
-   gst_allocation_params_init (&params);
-   params.flags = GST_MEMORY_FLAG_ZERO_PADDED;
-   params.align = 15;
--  params.padding = FF_INPUT_BUFFER_PADDING_SIZE;
-+  params.padding = AV_INPUT_BUFFER_PADDING_SIZE;
-   /* we would like to have some padding so that we don't have to
-    * memcpy. We don't suggest an allocator. */
-   gst_query_add_allocation_param (query, NULL, &params);
-@@ -665,7 +665,7 @@ gst_ffmpegauddec_drain (GstFFMpegAudDec * ffmpegdec)
- 
-   oclass = (GstFFMpegAudDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
- 
--  if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
-+  if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) {
-     gint have_data, len;
- 
-     GST_LOG_OBJECT (ffmpegdec,
-@@ -744,10 +744,10 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
-   bsize = map.size;
- 
-   if (bsize > 0 && (!GST_MEMORY_IS_ZERO_PADDED (map.memory)
--          || (map.maxsize - map.size) < FF_INPUT_BUFFER_PADDING_SIZE)) {
-+          || (map.maxsize - map.size) < AV_INPUT_BUFFER_PADDING_SIZE)) {
-     /* add padding */
--    if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
--      ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
-+    if (ffmpegdec->padded_size < bsize + AV_INPUT_BUFFER_PADDING_SIZE) {
-+      ffmpegdec->padded_size = bsize + AV_INPUT_BUFFER_PADDING_SIZE;
-       ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size);
-       GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d",
-           ffmpegdec->padded_size);
-@@ -755,7 +755,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
-     GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec,
-         "Copy input to add padding");
-     memcpy (ffmpegdec->padded, bdata, bsize);
--    memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+    memset (ffmpegdec->padded + bsize, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- 
-     bdata = ffmpegdec->padded;
-     do_padding = TRUE;
-@@ -764,7 +764,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
-   }
- 
-   do {
--    guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE];
-+    guint8 tmp_padding[AV_INPUT_BUFFER_PADDING_SIZE];
- 
-     data = bdata;
-     size = bsize;
-@@ -773,15 +773,15 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
-       /* add temporary padding */
-       GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec,
-           "Add temporary input padding");
--      memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE);
--      memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+      memcpy (tmp_padding, data + size, AV_INPUT_BUFFER_PADDING_SIZE);
-+      memset (data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
-     }
- 
-     /* decode a frame of audio now */
-     len = gst_ffmpegauddec_frame (ffmpegdec, data, size, &have_data, &ret);
- 
-     if (do_padding) {
--      memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
-+      memcpy (data + size, tmp_padding, AV_INPUT_BUFFER_PADDING_SIZE);
-     }
- 
-     if (ret != GST_FLOW_OK) {
-diff --git a/ext/libav/gstavaudenc.c b/ext/libav/gstavaudenc.c
-index 6ffbc3e..2a82273 100644
---- a/ext/libav/gstavaudenc.c
-+++ b/ext/libav/gstavaudenc.c
-@@ -283,7 +283,6 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
-   }
- 
-   /* some other defaults */
--  ffmpegaudenc->context->rc_strategy = 2;
-   ffmpegaudenc->context->b_frame_strategy = 0;
-   ffmpegaudenc->context->coder_type = 0;
-   ffmpegaudenc->context->context_model = 0;
-@@ -330,7 +329,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
-             oclass->in_plugin) < 0)
-       GST_DEBUG_OBJECT (ffmpegaudenc, "Failed to set context defaults");
- 
--    if ((oclass->in_plugin->capabilities & CODEC_CAP_EXPERIMENTAL) &&
-+    if ((oclass->in_plugin->capabilities & AV_CODEC_CAP_EXPERIMENTAL) &&
-         ffmpegaudenc->compliance != GST_FFMPEG_EXPERIMENTAL) {
-       GST_ELEMENT_ERROR (ffmpegaudenc, LIBRARY, SETTINGS,
-           ("Codec is experimental, but settings don't allow encoders to "
-@@ -602,7 +601,7 @@ gst_ffmpegaudenc_encode_audio (GstFFMpegAudEnc * ffmpegaudenc,
-         pkt->size, 0, pkt->size, pkt, gst_ffmpegaudenc_free_avpacket);
- 
-     codec = ffmpegaudenc->context->codec;
--    if ((codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) || !buffer) {
-+    if ((codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) || !buffer) {
-       /* FIXME: Not really correct, as -1 means "all the samples we got
-          given so far", which may not be true depending on the codec,
-          but we have no way to know AFAICT */
-@@ -626,7 +625,7 @@ gst_ffmpegaudenc_drain (GstFFMpegAudEnc * ffmpegaudenc)
- 
-   oclass = (GstFFMpegAudEncClass *) (G_OBJECT_GET_CLASS (ffmpegaudenc));
- 
--  if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
-+  if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) {
-     gint have_data, try = 0;
- 
-     GST_LOG_OBJECT (ffmpegaudenc,
-diff --git a/ext/libav/gstavcfg.c b/ext/libav/gstavcfg.c
-index a1863fd..408e08e 100644
---- a/ext/libav/gstavcfg.c
-+++ b/ext/libav/gstavcfg.c
-@@ -42,9 +42,9 @@ gst_ffmpeg_pass_get_type (void)
-   if (!ffmpeg_pass_type) {
-     static const GEnumValue ffmpeg_passes[] = {
-       {0, "Constant Bitrate Encoding", "cbr"},
--      {CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"},
--      {CODEC_FLAG_PASS1, "VBR Encoding - Pass 1", "pass1"},
--      {CODEC_FLAG_PASS2, "VBR Encoding - Pass 2", "pass2"},
-+      {AV_CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"},
-+      {AV_CODEC_FLAG_PASS1, "VBR Encoding - Pass 1", "pass1"},
-+      {AV_CODEC_FLAG_PASS2, "VBR Encoding - Pass 2", "pass2"},
-       {0, NULL, NULL},
-     };
- 
-@@ -66,7 +66,7 @@ gst_ffmpeg_lim_pass_get_type (void)
-   if (!ffmpeg_lim_pass_type) {
-     static const GEnumValue ffmpeg_lim_passes[] = {
-       {0, "Constant Bitrate Encoding", "cbr"},
--      {CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"},
-+      {AV_CODEC_FLAG_QSCALE, "Constant Quantizer", "quant"},
-       {0, NULL, NULL},
-     };
- 
-@@ -121,9 +121,9 @@ gst_ffmpeg_mb_cmp_get_type (void)
-       {FF_CMP_VSSE, "VSSE", "vsse"},
- #if 0
- /* economize a bit for now */
--      {FF_CMP_NSSE, "NSSE", "nsse"},
--      {FF_CMP_W53, "W53", "w53"},
--      {FF_CMP_W97, "W97", "w97"},
-+      {AV_CMP_NSSE, "NSSE", "nsse"},
-+      {AV_CMP_W53, "W53", "w53"},
-+      {AV_CMP_W97, "W97", "w97"},
- #endif
-       {0, NULL, NULL},
-     };
-@@ -260,21 +260,22 @@ gst_ffmpeg_flags_get_type (void)
-   /* FIXME: This needs some serious resyncing with avcodec.h */
-   if (!ffmpeg_flags_type) {
-     static const GFlagsValue ffmpeg_flags[] = {
--      {CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
--      {CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
--      {CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
--      {CODEC_FLAG_GMC, "GMC", "gmc"},
--      {CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
--      {CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
--      {CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
--      {CODEC_FLAG_NORMALIZE_AQP,
--          "Normalize Adaptive Quantization (masking, etc)", "aqp"},
--      {CODEC_FLAG_GLOBAL_HEADER,
-+      {AV_CODEC_FLAG_QSCALE, "Use fixed qscale", "qscale"},
-+      {AV_CODEC_FLAG_4MV, "Allow 4 MV per MB", "4mv"},
-+      {AV_CODEC_FLAG_QPEL, "Quartel Pel Motion Compensation", "qpel"},
-+      //{AV_CODEC_FLAG_GMC, "GMC", "gmc"},
-+      //{AV_CODEC_FLAG_MV0, "Always try a MB with MV (0,0)", "mv0"},
-+      {AV_CODEC_FLAG_LOOP_FILTER, "Loop filter", "loop-filter"},
-+      {AV_CODEC_FLAG_GRAY, "Only decode/encode grayscale", "gray"},
-+      //{AV_CODEC_FLAG_NORMALIZE_AQP,
-+      //    "Normalize Adaptive Quantization (masking, etc)", "aqp"},
-+      {AV_CODEC_FLAG_GLOBAL_HEADER,
-             "Global headers in extradata instead of every keyframe",
-           "global-headers"},
--      {CODEC_FLAG_AC_PRED, "H263 Advanced Intra Coding / MPEG4 AC prediction",
-+      {AV_CODEC_FLAG_AC_PRED,
-+            "H263 Advanced Intra Coding / MPEG4 AC prediction",
-           "aic"},
--      {CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
-+      {AV_CODEC_FLAG_CLOSED_GOP, "Closed GOP", "closedgop"},
-       {0, NULL, NULL},
-     };
- 
-@@ -487,31 +488,39 @@ gst_ffmpeg_cfg_init (void)
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.qblur, FALSE, mpeg, NULL);
- 
-+#if 0
-   pspec = g_param_spec_float ("rc-qsquish", "Ratecontrol Limiting Method",
-       "0 means limit by clipping, otherwise use nice continuous function",
-       0, 99.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_qsquish, FALSE, mpeg, NULL);
-+#endif
- 
-+#if 0
-   pspec = g_param_spec_float ("rc-qmod-amp", "Ratecontrol Mod",
-       "Ratecontrol Mod", 0, 99.0f, 0,
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_qmod_amp, FALSE, mpeg, NULL);
-+#endif
- 
-+#if 0
-   pspec = g_param_spec_int ("rc-qmod-freq", "Ratecontrol Freq",
-       "Ratecontrol Freq", 0, 0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_qmod_freq, FALSE, mpeg, NULL);
-+#endif
- 
-   pspec = g_param_spec_int ("rc-buffer-size", "Ratecontrol Buffer Size",
-       "Decoder bitstream buffer size", 0, G_MAXINT, 0,
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_buffer_size, FALSE, mpeg, NULL);
- 
-+#if 0
-   pspec =
-       g_param_spec_float ("rc-buffer-aggressivity",
-       "Ratecontrol Buffer Aggressivity", "Ratecontrol Buffer Aggressivity", 0,
-       99.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_buffer_aggressivity, FALSE, mpeg,
-       NULL);
-+#endif
- 
- #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT (57, 3, 0)
-   pspec = g_param_spec_int ("rc-max-rate", "Ratecontrol Maximum Bitrate",
-@@ -529,17 +538,21 @@ gst_ffmpeg_cfg_init (void)
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_min_rate, FALSE, mpeg, NULL);
- 
-+#if 0
-   pspec =
-       g_param_spec_float ("rc-initial-cplx",
-       "Initial Complexity for Pass 1 Ratecontrol",
-       "Initial Complexity for Pass 1 Ratecontrol", 0, 9999999.0f, 0,
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_initial_cplx, FALSE, mpeg, NULL);
-+#endif
- 
-+#if 0
-   pspec = g_param_spec_string ("rc-eq", "Ratecontrol Equation",
-       "Ratecontrol Equation", "tex^qComp",
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.rc_eq, FALSE, mpeg, NULL);
-+#endif
- 
-   pspec = g_param_spec_float ("b-quant-factor", "B-Quantizer Factor",
-       "Factor in B-Frame Quantizer Computation",
-@@ -630,19 +643,23 @@ gst_ffmpeg_cfg_init (void)
-       0, 16000, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.me_range, FALSE, mpeg, NULL);
- 
-+#if 0
-   pspec = g_param_spec_int ("intra-quant-bias",
-       "Intra Quantizer Bias",
-       "Intra Quantizer Bias",
--      -1000000, 1000000, FF_DEFAULT_QUANT_BIAS,
-+      -1000000, 1000000, AV_DEFAULT_QUANT_BIAS,
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.intra_quant_bias, FALSE, mpeg, NULL);
-+#endif
- 
-+#if 0
-   pspec = g_param_spec_int ("inter-quant-bias",
-       "Inter Quantizer Bias",
-       "Inter Quantizer Bias",
--      -1000000, 1000000, FF_DEFAULT_QUANT_BIAS,
-+      -1000000, 1000000, AV_DEFAULT_QUANT_BIAS,
-       G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-   gst_ffmpeg_add_pspec (pspec, config.inter_quant_bias, FALSE, mpeg, NULL);
-+#endif
- 
-   pspec = g_param_spec_int ("noise-reduction",
-       "Noise Reduction",
-diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
-index 9a72033..6b66bb9 100644
---- a/ext/libav/gstavcodecmap.c
-+++ b/ext/libav/gstavcodecmap.c
-@@ -825,10 +825,10 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
-       if (encode && context) {
- 
-         gst_caps_set_simple (caps,
--            "annex-f", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_4MV,
--            "annex-j", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_LOOP_FILTER,
--            "annex-i", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
--            "annex-t", G_TYPE_BOOLEAN, context->flags & CODEC_FLAG_AC_PRED,
-+            "annex-f", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_4MV,
-+            "annex-j", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_LOOP_FILTER,
-+            "annex-i", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_AC_PRED,
-+            "annex-t", G_TYPE_BOOLEAN, context->flags & AV_CODEC_FLAG_AC_PRED,
-             NULL);
-       }
-       break;
-@@ -3181,7 +3181,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
-        * as is, as that is what most players do. */
-       context->extradata =
-           av_mallocz (GST_ROUND_UP_16 (size * 2 +
--              FF_INPUT_BUFFER_PADDING_SIZE));
-+              AV_INPUT_BUFFER_PADDING_SIZE));
-       copy_config (context->extradata, data, size, &extrasize);
-       GST_DEBUG ("escaped size: %d", extrasize);
-       context->extradata_size = extrasize;
-@@ -3192,7 +3192,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
-       GST_DEBUG ("copy codec_data");
-       context->extradata =
-           av_mallocz (GST_ROUND_UP_16 (map.size +
--              FF_INPUT_BUFFER_PADDING_SIZE));
-+              AV_INPUT_BUFFER_PADDING_SIZE));
-       memcpy (context->extradata, map.data, map.size);
-       context->extradata_size = map.size;
-     }
-@@ -3216,7 +3216,7 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
-     {
-       const gchar *mime = gst_structure_get_name (str);
- 
--      context->flags |= CODEC_FLAG_4MV;
-+      context->flags |= AV_CODEC_FLAG_4MV;
- 
-       if (!strcmp (mime, "video/x-divx"))
-         context->codec_tag = GST_MAKE_FOURCC ('D', 'I', 'V', 'X');
-@@ -3228,7 +3228,8 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
-         profile = gst_structure_get_string (str, "profile");
-         if (profile) {
-           if (g_strcmp0 (profile, "advanced-simple") == 0)
--            context->flags |= CODEC_FLAG_GMC | CODEC_FLAG_QPEL;
-+            context->flags |= AV_CODEC_FLAG_QPEL;
-+            /* FIXME use the "gmc" private option of the libxvid encoder */
-         }
-       }
-       break;
-@@ -3334,18 +3335,18 @@ gst_ffmpeg_caps_with_codecid (enum AVCodecID codec_id,
-       gboolean val;
- 
-       if (!gst_structure_get_boolean (str, "annex-f", &val) || val)
--        context->flags |= CODEC_FLAG_4MV;
-+        context->flags |= AV_CODEC_FLAG_4MV;
-       else
--        context->flags &= ~CODEC_FLAG_4MV;
-+        context->flags &= ~AV_CODEC_FLAG_4MV;
-       if ((!gst_structure_get_boolean (str, "annex-i", &val) || val) &&
-           (!gst_structure_get_boolean (str, "annex-t", &val) || val))
--        context->flags |= CODEC_FLAG_AC_PRED;
-+        context->flags |= AV_CODEC_FLAG_AC_PRED;
-       else
--        context->flags &= ~CODEC_FLAG_AC_PRED;
-+        context->flags &= ~AV_CODEC_FLAG_AC_PRED;
-       if (!gst_structure_get_boolean (str, "annex-j", &val) || val)
--        context->flags |= CODEC_FLAG_LOOP_FILTER;
-+        context->flags |= AV_CODEC_FLAG_LOOP_FILTER;
-       else
--        context->flags &= ~CODEC_FLAG_LOOP_FILTER;
-+        context->flags &= ~AV_CODEC_FLAG_LOOP_FILTER;
-       break;
-     }
-     case AV_CODEC_ID_ADPCM_G726:
-diff --git a/ext/libav/gstavcodecmap.h b/ext/libav/gstavcodecmap.h
-index 9575e77..14cdfce 100644
---- a/ext/libav/gstavcodecmap.h
-+++ b/ext/libav/gstavcodecmap.h
-@@ -155,7 +155,7 @@ gst_ffmpeg_formatid_to_caps (const gchar *format_name);
- 
- /*
-  * _formatid_get_codecids () can be used to get the codecIDs
-- * (CODEC_ID_NONE-terminated list) that fit that specific
-+ * (AV_CODEC_ID_NONE-terminated list) that fit that specific
-  * output format.
-  */
- 
-diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
-index f9c6096..0ed4b23 100644
---- a/ext/libav/gstavviddec.c
-+++ b/ext/libav/gstavviddec.c
-@@ -237,7 +237,7 @@ gst_ffmpegviddec_class_init (GstFFMpegVidDecClass * klass)
-           DEFAULT_OUTPUT_CORRUPT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- 
-   caps = klass->in_plugin->capabilities;
--  if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
-+  if (caps & (AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS)) {
-     g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS,
-         g_param_spec_int ("max-threads", "Maximum decode threads",
-             "Maximum number of worker threads to spawn. (0 = auto)",
-@@ -365,7 +365,7 @@ gst_ffmpegviddec_open (GstFFMpegVidDec * ffmpegdec)
-       oclass->in_plugin->name, oclass->in_plugin->id);
- 
-   gst_ffmpegviddec_context_set_flags (ffmpegdec->context,
--      CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt);
-+      AV_CODEC_FLAG_OUTPUT_CORRUPT, ffmpegdec->output_corrupt);
- 
-   return TRUE;
- 
-@@ -495,7 +495,7 @@ gst_ffmpegviddec_set_format (GstVideoDecoder * decoder,
-     gboolean is_live;
- 
-     if (ffmpegdec->max_threads == 0) {
--      if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
-+      if (!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS))
-         ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
-       else
-         ffmpegdec->context->thread_count = 0;
-@@ -624,10 +624,7 @@ gst_ffmpegvideodec_prepare_dr_pool (GstFFMpegVidDec * ffmpegdec,
-   avcodec_align_dimensions2 (ffmpegdec->context, &width, &height,
-       linesize_align);
- 
--  if (ffmpegdec->context->flags & CODEC_FLAG_EMU_EDGE)
--    edge = 0;
--  else
--    edge = avcodec_get_edge_width ();
-+  edge = 0;
- 
-   /* increase the size for the padding */
-   width += edge << 1;
-@@ -732,7 +729,7 @@ gst_ffmpegviddec_can_direct_render (GstFFMpegVidDec * ffmpegdec)
-     return FALSE;
- 
-   oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
--  return ((oclass->in_plugin->capabilities & CODEC_CAP_DR1) == CODEC_CAP_DR1);
-+  return ((oclass->in_plugin->capabilities & AV_CODEC_CAP_DR1) == AV_CODEC_CAP_DR1);
- }
- 
- /* called when ffmpeg wants us to allocate a buffer to write the decoded frame
-@@ -1769,7 +1766,7 @@ gst_ffmpegviddec_drain (GstVideoDecoder * decoder)
- 
-   oclass = (GstFFMpegVidDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
- 
--  if (oclass->in_plugin->capabilities & CODEC_CAP_DELAY) {
-+  if (oclass->in_plugin->capabilities & AV_CODEC_CAP_DELAY) {
-     gint have_data, len;
-     GstFlowReturn ret;
- 
-@@ -1815,10 +1812,10 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
-   bsize = minfo.size;
- 
-   if (bsize > 0 && (!GST_MEMORY_IS_ZERO_PADDED (minfo.memory)
--          || (minfo.maxsize - minfo.size) < FF_INPUT_BUFFER_PADDING_SIZE)) {
-+          || (minfo.maxsize - minfo.size) < AV_INPUT_BUFFER_PADDING_SIZE)) {
-     /* add padding */
--    if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
--      ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
-+    if (ffmpegdec->padded_size < bsize + AV_INPUT_BUFFER_PADDING_SIZE) {
-+      ffmpegdec->padded_size = bsize + AV_INPUT_BUFFER_PADDING_SIZE;
-       ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size);
-       GST_LOG_OBJECT (ffmpegdec, "resized padding buffer to %d",
-           ffmpegdec->padded_size);
-@@ -1826,7 +1823,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
-     GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec,
-         "Copy input to add padding");
-     memcpy (ffmpegdec->padded, bdata, bsize);
--    memset (ffmpegdec->padded + bsize, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+    memset (ffmpegdec->padded + bsize, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- 
-     bdata = ffmpegdec->padded;
-     do_padding = TRUE;
-@@ -1835,7 +1832,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
-   }
- 
-   do {
--    guint8 tmp_padding[FF_INPUT_BUFFER_PADDING_SIZE];
-+    guint8 tmp_padding[AV_INPUT_BUFFER_PADDING_SIZE];
- 
-     /* parse, if at all possible */
-     data = bdata;
-@@ -1845,8 +1842,8 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
-       /* add temporary padding */
-       GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, ffmpegdec,
-           "Add temporary input padding");
--      memcpy (tmp_padding, data + size, FF_INPUT_BUFFER_PADDING_SIZE);
--      memset (data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
-+      memcpy (tmp_padding, data + size, AV_INPUT_BUFFER_PADDING_SIZE);
-+      memset (data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
-     }
- 
-     /* decode a frame of audio/video now */
-@@ -1862,7 +1859,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
-     }
- 
-     if (do_padding) {
--      memcpy (data + size, tmp_padding, FF_INPUT_BUFFER_PADDING_SIZE);
-+      memcpy (data + size, tmp_padding, AV_INPUT_BUFFER_PADDING_SIZE);
-     }
- 
-     if (len == 0 && have_data == 0) {
-@@ -2143,7 +2140,7 @@ gst_ffmpegviddec_propose_allocation (GstVideoDecoder * decoder,
-   gst_allocation_params_init (&params);
-   params.flags = GST_MEMORY_FLAG_ZERO_PADDED;
-   params.align = DEFAULT_STRIDE_ALIGN;
--  params.padding = FF_INPUT_BUFFER_PADDING_SIZE;
-+  params.padding = AV_INPUT_BUFFER_PADDING_SIZE;
-   /* we would like to have some padding so that we don't have to
-    * memcpy. We don't suggest an allocator. */
-   gst_query_add_allocation_param (query, NULL, &params);
-diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c
-index 36143f5..22e5cae 100644
---- a/ext/libav/gstavvidenc.c
-+++ b/ext/libav/gstavvidenc.c
-@@ -68,18 +68,19 @@ enum
-   PROP_CFG_BASE,
- };
- 
-+#if 0
- #define GST_TYPE_ME_METHOD (gst_ffmpegvidenc_me_method_get_type())
- static GType
- gst_ffmpegvidenc_me_method_get_type (void)
- {
-   static GType ffmpegenc_me_method_type = 0;
-   static GEnumValue ffmpegenc_me_methods[] = {
--    {ME_ZERO, "None (Very low quality)", "zero"},
--    {ME_FULL, "Full (Slow, unmaintained)", "full"},
--    {ME_LOG, "Logarithmic (Low quality, unmaintained)", "logarithmic"},
--    {ME_PHODS, "phods (Low quality, unmaintained)", "phods"},
--    {ME_EPZS, "EPZS (Best quality, Fast)", "epzs"},
--    {ME_X1, "X1 (Experimental)", "x1"},
-+    {FF_CMP_ZERO, "None (Very low quality)", "zero"},
-+    {FF_CMP_FULL, "Full (Slow, unmaintained)", "full"},
-+    {FF_CMP_LOG, "Logarithmic (Low quality, unmaintained)", "logarithmic"},
-+    {FF_CMP_PHODS, "phods (Low quality, unmaintained)", "phods"},
-+    {FF_CMP_EPZS, "EPZS (Best quality, Fast)", "epzs"},
-+    {FF_CMP_X1, "X1 (Experimental)", "x1"},
-     {0, NULL, NULL},
-   };
-   if (!ffmpegenc_me_method_type) {
-@@ -88,6 +89,7 @@ gst_ffmpegvidenc_me_method_get_type (void)
-   }
-   return ffmpegenc_me_method_type;
- }
-+#endif
- 
- /* A number of function prototypes are given so we can refer to them later. */
- static void gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass);
-@@ -201,10 +203,12 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass)
-       g_param_spec_int ("gop-size", "GOP Size",
-           "Number of frames within one GOP", 0, G_MAXINT,
-           DEFAULT_VIDEO_GOP_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+#if 0
-   g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ME_METHOD,
-       g_param_spec_enum ("me-method", "ME Method", "Motion Estimation Method",
--          GST_TYPE_ME_METHOD, ME_EPZS,
-+          GST_TYPE_ME_METHOD, FF_CMP_EPZS,
-           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-+#endif
- 
-   g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFSIZE,
-       g_param_spec_int ("buffer-size", "Buffer Size",
-@@ -216,7 +220,7 @@ gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass)
-           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- 
-   caps = klass->in_plugin->capabilities;
--  if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) {
-+  if (caps & (AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS)) {
-     g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS,
-         g_param_spec_int ("max-threads", "Maximum encode threads",
-             "Maximum number of worker threads to spawn. (0 = auto)",
-@@ -259,7 +263,7 @@ gst_ffmpegvidenc_init (GstFFMpegVidEnc * ffmpegenc)
-   ffmpegenc->file = NULL;
- 
-   ffmpegenc->bitrate = DEFAULT_VIDEO_BITRATE;
--  ffmpegenc->me_method = ME_EPZS;
-+  //ffmpegenc->me_method = FF_CMP_EPZS;
-   ffmpegenc->buffer_size = 512 * 1024;
-   ffmpegenc->gop_size = DEFAULT_VIDEO_GOP_SIZE;
-   ffmpegenc->rtp_payload_size = 0;
-@@ -321,12 +325,12 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
-   ffmpegenc->context->bit_rate = ffmpegenc->bitrate;
-   ffmpegenc->context->bit_rate_tolerance = ffmpegenc->bitrate;
-   ffmpegenc->context->gop_size = ffmpegenc->gop_size;
--  ffmpegenc->context->me_method = ffmpegenc->me_method;
-+  //ffmpegenc->context->me_method = ffmpegenc->me_method;
-   GST_DEBUG_OBJECT (ffmpegenc, "Setting avcontext to bitrate %d, gop_size %d",
-       ffmpegenc->bitrate, ffmpegenc->gop_size);
- 
-   if (ffmpegenc->max_threads == 0) {
--    if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
-+    if (!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS))
-       ffmpegenc->context->thread_count = gst_ffmpeg_auto_max_threads ();
-     else
-       ffmpegenc->context->thread_count = 0;
-@@ -343,16 +347,16 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
-   gst_ffmpeg_cfg_fill_context (ffmpegenc, ffmpegenc->context);
- 
-   /* then handle some special cases */
--  ffmpegenc->context->lmin = (ffmpegenc->lmin * FF_QP2LAMBDA + 0.5);
--  ffmpegenc->context->lmax = (ffmpegenc->lmax * FF_QP2LAMBDA + 0.5);
-+  ffmpegenc->context->qmin = (ffmpegenc->lmin * FF_QP2LAMBDA + 0.5);
-+  ffmpegenc->context->qmax = (ffmpegenc->lmax * FF_QP2LAMBDA + 0.5);
- 
-   if (ffmpegenc->interlaced) {
-     ffmpegenc->context->flags |=
--        CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME;
-+        AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME;
-   }
- 
-   /* some other defaults */
--  ffmpegenc->context->rc_strategy = 2;
-+  //ffmpegenc->context->rc_strategy = 2;
-   ffmpegenc->context->b_frame_strategy = 0;
-   ffmpegenc->context->coder_type = 0;
-   ffmpegenc->context->context_model = 0;
-@@ -362,18 +366,18 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
-   ffmpegenc->context->flags |= ffmpegenc->pass;
-   switch (ffmpegenc->pass) {
-       /* some additional action depends on type of pass */
--    case CODEC_FLAG_QSCALE:
-+    case AV_CODEC_FLAG_QSCALE:
-       ffmpegenc->context->global_quality
-           = ffmpegenc->picture->quality = FF_QP2LAMBDA * ffmpegenc->quantizer;
-       break;
--    case CODEC_FLAG_PASS1:     /* need to prepare a stats file */
-+    case AV_CODEC_FLAG_PASS1:     /* need to prepare a stats file */
-       /* we don't close when changing caps, fingers crossed */
-       if (!ffmpegenc->file)
-         ffmpegenc->file = g_fopen (ffmpegenc->filename, "w");
-       if (!ffmpegenc->file)
-         goto open_file_err;
-       break;
--    case CODEC_FLAG_PASS2:
-+    case AV_CODEC_FLAG_PASS2:
-     {                           /* need to read the whole stats file ! */
-       gsize size;
- 
-
-
diff --git a/srcpkgs/gst-libav/template b/srcpkgs/gst-libav/template
index 2dc78fcf642..8d363c461bb 100644
--- a/srcpkgs/gst-libav/template
+++ b/srcpkgs/gst-libav/template
@@ -1,13 +1,11 @@
 # Template file for 'gst-libav'
 pkgname=gst-libav
-version=1.14.5
+version=1.16.0
 revision=1
-lib32disabled=yes
 wrksrc="${pkgname}-${version}"
-build_style=gnu-configure
-configure_args="--with-system-libav"
+build_style=meson
 patch_args="-Np1"
-hostmakedepends="pkg-config yasm python"
+hostmakedepends="pkg-config yasm"
 makedepends="orc-devel gst-plugins-base1-devel ffmpeg-devel"
 depends="orc>=0.4.18 gst-plugins-base1>=${version}"
 short_desc="GStreamer libav plugin (1.x)"
@@ -15,7 +13,7 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="LGPL-2.0-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/${pkgname}/${pkgname}-${version}.tar.xz"
-checksum=df10beebe794d316e6bbf019f16a8c6753cc28614f4ae8ce887bfd27761271fc
+checksum=dfac119043a9cfdcacd7acde77f674ab172cf2537b5812be52f49e9cddc53d9a
 
 case "$XBPS_TARGET_MACHINE" in
 	*-musl) # Required by musl for M_SQRT1_2
@@ -23,11 +21,6 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 esac
 
-pre_configure() {
-	# Fix cross compiling for arm* where os=linuxeabihf
-	sed -i ${wrksrc}/gst-libs/ext/libav/configure -e "s;linux);linux*);"
-}
-
 post_configure() {
 	case "$XBPS_TARGET_MACHINE" in
 		x86_64-musl) # compiling with -O3 triggers a gcc bug

From b48196a97d8d3e7d01fad14d4a24e229a5306488 Mon Sep 17 00:00:00 2001
From: Helmut Pozimski <helmut@pozimski.eu>
Date: Sun, 9 Jun 2019 13:38:02 +0200
Subject: [PATCH 9/9] gst1-python: update to 1.16.0.

---
 srcpkgs/gst1-python/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gst1-python/template b/srcpkgs/gst1-python/template
index 6710bedd303..4313b59880b 100644
--- a/srcpkgs/gst1-python/template
+++ b/srcpkgs/gst1-python/template
@@ -1,6 +1,6 @@
 # Template file for 'gst1-python'.
 pkgname=gst1-python
-version=1.14.5
+version=1.16.0
 revision=1
 wrksrc="gst-python-${version}"
 build_style=gnu-configure
@@ -14,7 +14,7 @@ maintainer="Juan RP <xtraeme@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gstreamer.freedesktop.org"
 distfiles="${homepage}/src/gst-python/gst-python-${version}.tar.xz"
-checksum=18afc00a2d67e6c1bae172241ac2521b3c2cc74b8b0273433e71edc9572add5a
+checksum=55dc7aaed1855565f9b9ef842d93e93bfc5cb2b376faef6af5b463e1774e2d38
 
 pre_configure() {
 	if [ "$CROSS_BUILD" ]; then
