All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0
@ 2018-08-25  7:31 Bernd Kuhls
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 2/7] package/freeswitch: " Bernd Kuhls
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1 series

 package/aubio/0001-ffmpeg4.patch | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/aubio/0001-ffmpeg4.patch

diff --git a/package/aubio/0001-ffmpeg4.patch b/package/aubio/0001-ffmpeg4.patch
new file mode 100644
index 0000000000..bdaac55a3d
--- /dev/null
+++ b/package/aubio/0001-ffmpeg4.patch
@@ -0,0 +1,32 @@
+From 5690daf759b473b9d13b4547ef37adc2695cf524 Mon Sep 17 00:00:00 2001
+From: James Cowgill <jcowgill@jcowgill.uk>
+Date: Sun, 25 Feb 2018 14:23:25 +0000
+Subject: [PATCH] Fix build with FFmpeg 4.0
+
+Downloaded from upstream commit
+https://git.aubio.org/?p=aubio.git;a=commitdiff;h=5690daf759b473b9d13b4547ef37adc2695cf524
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ src/io/source_avcodec.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
+index ccdce807..8197445c 100644
+--- a/src/io/source_avcodec.c
++++ b/src/io/source_avcodec.c
+@@ -58,7 +58,11 @@
+ #include "fmat.h"
+ #include "source_avcodec.h"
+ 
++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0)
+ #define AUBIO_AVCODEC_MAX_BUFFER_SIZE FF_MIN_BUFFER_SIZE
++#else
++#define AUBIO_AVCODEC_MAX_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
++#endif
+ 
+ struct _aubio_source_avcodec_t {
+   uint_t hop_size;
+-- 
+2.11.0
+
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 2/7] package/freeswitch: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:04   ` Thomas Petazzoni
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: " Bernd Kuhls
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Added missing license hashes.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1 series, added missing license hashes,
    git-formatted patch 0002
    patch 0001 can not be reformatted because Makefile.in is not part of
    the git repository

 .../0002-mod_av-unbreak-with-ffmpeg-4.0.patch | 90 +++++++++++++++++++
 package/freeswitch/freeswitch.hash            |  2 +
 2 files changed, 92 insertions(+)
 create mode 100644 package/freeswitch/0002-mod_av-unbreak-with-ffmpeg-4.0.patch

diff --git a/package/freeswitch/0002-mod_av-unbreak-with-ffmpeg-4.0.patch b/package/freeswitch/0002-mod_av-unbreak-with-ffmpeg-4.0.patch
new file mode 100644
index 0000000000..0fc7536f52
--- /dev/null
+++ b/package/freeswitch/0002-mod_av-unbreak-with-ffmpeg-4.0.patch
@@ -0,0 +1,90 @@
+From 72f2f7047ad35b37002d6210458667a89c301cfe Mon Sep 17 00:00:00 2001
+From: jbeich <jbeich@FreeBSD.org>
+Date: Thu, 16 Aug 2018 22:14:20 +0200
+Subject: [PATCH] mod_av: unbreak with ffmpeg 4.0
+
+avcodec.c:194:40: error: use of undeclared identifier 'FF_INPUT_BUFFER_PADDING_SIZE'
+static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
+                                       ^
+avformat.c:471:14: error: use of undeclared identifier 'CODEC_FLAG_LOOP_FILTER'
+                        c->flags|=CODEC_FLAG_LOOP_FILTER;   // flags=+loop
+                                  ^
+avformat.c:477:47: error: use of undeclared identifier 'ME_HEX'
+                        av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0);
+                                                                   ^
+avformat.c:553:15: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
+                c->flags |= CODEC_FLAG_GLOBAL_HEADER;
+                            ^
+avformat.c:638:31: error: use of undeclared identifier 'CODEC_CAP_VARIABLE_FRAME_SIZE'
+        if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
+                                     ^
+
+PR:		227726
+Reported by:	antoine (via exp-run)
+
+Downloaded from
+https://github.com/freebsd/freebsd-ports/commit/da104360ea7d7861aa9fe6dc04b776a1eaf794ec
+
+Original file
+https://svnweb.freebsd.org/ports/head/net/freeswitch/files/patch-ffmpeg4?view=markup
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ src/mod/applications/mod_av/avcodec.c  | 2 +-
+ src/mod/applications/mod_av/avformat.c | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/mod/applications/mod_av/avcodec.c b/src/mod/applications/mod_av/avcodec.c
+index f987a47466..54a61c878c 100644
+--- a/src/mod/applications/mod_av/avcodec.c
++++ b/src/mod/applications/mod_av/avcodec.c
+@@ -191,7 +191,7 @@ typedef struct h264_codec_context_s {
+ 	int hw_encoder;
+ } h264_codec_context_t;
+ 
+-static uint8_t ff_input_buffer_padding[FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
++static uint8_t ff_input_buffer_padding[AV_INPUT_BUFFER_PADDING_SIZE] = { 0 };
+ 
+ static switch_status_t buffer_h264_nalu(h264_codec_context_t *context, switch_frame_t *frame)
+ {
+diff --git a/src/mod/applications/mod_av/avformat.c b/src/mod/applications/mod_av/avformat.c
+index b9f6f99ef5..f5329c9106 100644
+--- a/src/mod/applications/mod_av/avformat.c
++++ b/src/mod/applications/mod_av/avformat.c
+@@ -468,13 +468,13 @@ GCC_DIAG_ON(deprecated-declarations)
+ 			c->ticks_per_frame = 2;
+ 
+ 
+-			c->flags|=CODEC_FLAG_LOOP_FILTER;   // flags=+loop
++			c->flags|=AV_CODEC_FLAG_LOOP_FILTER;   // flags=+loop
+ 			c->me_cmp|= 1;  // cmp=+chroma, where CHROMA = 1
+ 			c->me_range = 16;   // me_range=16
+ 			c->max_b_frames = 3;    // bf=3
+ 
+ 			av_opt_set_int(c->priv_data, "b_strategy", 1, 0);
+-			av_opt_set_int(c->priv_data, "motion_est", ME_HEX, 0);
++			av_opt_set(c->priv_data, "motion_est", "hex", 0);
+ 			av_opt_set_int(c->priv_data, "coder", 1, 0);
+ 
+ 			switch (mm->vprofile) {
+@@ -550,7 +550,7 @@ GCC_DIAG_ON(deprecated-declarations)
+ 
+ 	/* Some formats want stream headers to be separate. */
+ 	if (fc->oformat->flags & AVFMT_GLOBALHEADER) {
+-		c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++		c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ 	}
+ 
+ 	return SWITCH_STATUS_SUCCESS;
+@@ -639,7 +639,7 @@ GCC_DIAG_ON(deprecated-declarations)
+ 	mst->frame->format         = AV_SAMPLE_FMT_S16;
+ 	mst->frame->channel_layout = c->channel_layout;
+ 
+-	if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE) {
++	if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE) {
+ 		mst->frame->nb_samples = 10000;
+ 	} else {
+ 		mst->frame->nb_samples = c->frame_size;
+-- 
+2.18.0
+
diff --git a/package/freeswitch/freeswitch.hash b/package/freeswitch/freeswitch.hash
index 25421de99b..057142e655 100644
--- a/package/freeswitch/freeswitch.hash
+++ b/package/freeswitch/freeswitch.hash
@@ -8,6 +8,8 @@ sha256 dbb0f73109171bd381772b247b8ef581f6a176964619082a1fe031b004086f6b  freeswi
 sha256 10299420c1e8602c0daf5a59d022621cd72a9148d1f0f33501edb3db3445c7fe  COPYING
 sha256 e8e26b16da14aa3e6ed5c22c705fdc1f45d6225fca461ea9f7314bcdfdc414c4  libs/apr/LICENSE
 sha256 1eefb2ea1db0af7729a9d8a27d7c65d8a37ab185393f935b029aac6828ce315a  libs/apr-util/LICENSE
+sha256 8267348d5af1262c11d1a08de2f5afc77457755f1ac658627dd9acf71011d615  libs/libvpx/LICENSE
+sha256 2b2cc1180c7e6988328ad2033b04b80117419db9c4c584918bbb3cfec7e9364f  libs/libyuv/LICENSE
 sha256 7d72a8aee2c4b1a084200487992a5d86f5df6b535727a14c1874918e99d24600  libs/libzrtp/src/zrtp_legal.c
 sha256 e1c0890440efe31b6cd2ee2abf895eb917c787799f079133f5809414d90d5d60  libs/sofia-sip/COPYING
 sha256 b402ae58cf355b33be8fa023f704a039e3d41ecaccd2bbcda43ca31d703e4556  libs/sofia-sip/COPYRIGHTS
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 2/7] package/freeswitch: " Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:23   ` Thomas Petazzoni
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: " Bernd Kuhls
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1 series, git-formatted patch,
    fixed typo in patch description (Peter S.)

 .../0001-Fix-build-with-ffmpeg-4.0.patch      | 676 ++++++++++++++++++
 1 file changed, 676 insertions(+)
 create mode 100644 package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch

diff --git a/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch b/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch
new file mode 100644
index 0000000000..2d750e2345
--- /dev/null
+++ b/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch
@@ -0,0 +1,676 @@
+From 257963d93ce6a8ce08c3f3771e3a1b7ebb71dc2e Mon Sep 17 00:00:00 2001
+From: Ulenrich <eulenreich@gmx.de>
+Date: Thu, 16 Aug 2018 22:43:18 +0200
+Subject: [PATCH] Fix build with ffmpeg 4.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Instead of using the ffmpeg copy included by this package we use a patch
+from the Gentoo bug tracker to fix the build with ffmpeg 4.0.
+
+Upstream included support for ffmpeg 4.0 in the upcoming 1.16.x release
+of gstreamer:
+https://bugzilla.gnome.org/show_bug.cgi?id=792900
+
+NEWS mentions that the fixes "won?t be backported to the 1.14 branch as
+it is rather intrusive":
+https://github.com/GStreamer/gst-libav/commit/8886a016fce625e1c25a4902be4021196a6784a2#diff-ff4e2dc4962dc25a1512353299992c8dR1400
+
+Downloaded from https://bugs.gentoo.org/654628#c11
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ 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/gstavviddec.c   | 33 ++++++++++------------
+ ext/libav/gstavvidenc.c   | 40 ++++++++++++++------------
+ 8 files changed, 106 insertions(+), 88 deletions(-)
+
+diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c
+index 0fba840..3f26c86 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"
+@@ -156,7 +156,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 9e56275..ae8aa66 100644
+--- a/ext/libav/gstavauddec.c
++++ b/ext/libav/gstavauddec.c
+@@ -287,7 +287,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);
+@@ -669,7 +669,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,
+@@ -748,10 +748,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);
+@@ -759,7 +759,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
+     GST_CAT_TRACE_OBJECT (GST_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;
+@@ -768,7 +768,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;
+@@ -777,15 +777,15 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
+       /* add temporary padding */
+       GST_CAT_TRACE_OBJECT (GST_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 d3830dd..11ad02c 100644
+--- a/ext/libav/gstavviddec.c
++++ b/ext/libav/gstavviddec.c
+@@ -239,7 +239,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)",
+@@ -369,7 +369,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;
+ 
+@@ -499,7 +499,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;
+@@ -628,10 +628,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;
+@@ -736,7 +733,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
+@@ -1773,7 +1770,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;
+ 
+@@ -1819,10 +1816,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);
+@@ -1830,7 +1827,7 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
+     GST_CAT_TRACE_OBJECT (GST_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;
+@@ -1839,7 +1836,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;
+@@ -1849,8 +1846,8 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
+       /* add temporary padding */
+       GST_CAT_TRACE_OBJECT (GST_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 */
+@@ -1866,7 +1863,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) {
+@@ -2147,7 +2144,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;
+ 
+-- 
+2.18.0
+
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 2/7] package/freeswitch: " Bernd Kuhls
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: " Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:11   ` Thomas Petazzoni
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 5/7] package/motion: " Bernd Kuhls
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Added license hash.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1 series, git-formatted patch,
    added license hash

 ...FER_PADDING_SIZE-to-determine-paddin.patch | 64 +++++++++++++++++++
 package/mediastreamer/mediastreamer.hash      |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 package/mediastreamer/0002-Use-AV_INPUT_BUFFER_PADDING_SIZE-to-determine-paddin.patch

diff --git a/package/mediastreamer/0002-Use-AV_INPUT_BUFFER_PADDING_SIZE-to-determine-paddin.patch b/package/mediastreamer/0002-Use-AV_INPUT_BUFFER_PADDING_SIZE-to-determine-paddin.patch
new file mode 100644
index 0000000000..792c3eeb44
--- /dev/null
+++ b/package/mediastreamer/0002-Use-AV_INPUT_BUFFER_PADDING_SIZE-to-determine-paddin.patch
@@ -0,0 +1,64 @@
+From 84b1919124884232e0fa30b30458470db27c73fc Mon Sep 17 00:00:00 2001
+From: James Cowgill <jcowgill@debian.org>
+Date: Sat, 18 Aug 2018 12:56:38 +0200
+Subject: [PATCH] Use AV_INPUT_BUFFER_PADDING_SIZE to determine padding
+ size
+
+Hardcoding the value for FF_INPUT_BUFFER_PADDING_SIZE is not safe
+because  upstream FFmpeg might change it (as they did in FFmpeg 4.0).
+
+Instead, use FFmpeg's AV_INPUT_BUFFER_PADDING_SIZE if available and
+only hardcode a value if FFmpeg is disabled (in which case the value
+doesn't particularly matter anyway). For compatibility with older
+FFmpeg versions, define AV_INPUT_BUFFER_PADDING_SIZE if hasn't been
+defined yet.
+
+Downloaded from
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901735
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ src/utils/ffmpeg-priv.h     | 4 ++++
+ src/videofilters/nowebcam.c | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/utils/ffmpeg-priv.h b/src/utils/ffmpeg-priv.h
+index c0745a9a..d59ea0e1 100644
+--- a/src/utils/ffmpeg-priv.h
++++ b/src/utils/ffmpeg-priv.h
+@@ -102,6 +102,10 @@ static inline int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
+ #endif
+ #endif
+ 
++#ifndef AV_INPUT_BUFFER_PADDING_SIZE
++#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
++#endif
++
+ #ifndef HAVE_FUN_avcodec_encode_video2
+ int avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr);
+ #endif
+diff --git a/src/videofilters/nowebcam.c b/src/videofilters/nowebcam.c
+index bd2ca838..4783de05 100644
+--- a/src/videofilters/nowebcam.c
++++ b/src/videofilters/nowebcam.c
+@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ #ifndef NO_FFMPEG
+ #include "ffmpeg-priv.h"
+ #else
+-#define FF_INPUT_BUFFER_PADDING_SIZE 32
++#define AV_INPUT_BUFFER_PADDING_SIZE 32
+ #endif
+ 
+ #if TARGET_OS_IPHONE
+@@ -248,7 +248,7 @@ static mblk_t *_ms_load_jpeg_as_yuv(const char *jpgpath, MSVideoSize *reqsize){
+ 			ms_error("Cannot load %s",jpgpath);
+ 			return NULL;
+ 		}
+-		jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + FF_INPUT_BUFFER_PADDING_SIZE);
++		jpgbuf=(uint8_t*)ms_malloc0(statbuf.st_size + AV_INPUT_BUFFER_PADDING_SIZE);
+ 		if (jpgbuf==NULL)
+ 		{
+ 			close(fd);
+-- 
+2.18.0
+
diff --git a/package/mediastreamer/mediastreamer.hash b/package/mediastreamer/mediastreamer.hash
index 5f26b54bff..8ebf64af09 100644
--- a/package/mediastreamer/mediastreamer.hash
+++ b/package/mediastreamer/mediastreamer.hash
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  1144849c0c96abafb1153adf56109f0f195a9e4a53cf28cb611bbca7a9012c1a  mediastreamer-2.14.0.tar.gz
+sha256  ba9ed2269151ad63b922598f3c5c19ddf781b2bbb6cb843ed9f085ecd1679c5d  COPYING
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/7] package/motion: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
                   ` (2 preceding siblings ...)
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: " Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:24   ` Thomas Petazzoni
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 6/7] package/squeezelite: " Bernd Kuhls
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1
    backported upstream commit (Thomas)

 ...001-Fix-build-errors-with-FFmpeg-4.0.patch | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch

diff --git a/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch
new file mode 100644
index 0000000000..e738809a74
--- /dev/null
+++ b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch
@@ -0,0 +1,58 @@
+From 9b93a417e37e1f0fef58d1582a7e98e4c05d3b42 Mon Sep 17 00:00:00 2001
+From: James Cowgill <jcowgill@users.noreply.github.com>
+Date: Sun, 25 Feb 2018 20:13:57 +0000
+Subject: [PATCH] Fix build errors with FFmpeg 4.0
+
+Backported from upstream commit
+https://github.com/Motion-Project/motion/commit/9b93a417e37e1f0fef58d1582a7e98e4c05d3b42
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ ffmpeg.c | 19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/ffmpeg.c b/ffmpeg.c
+index 1e6cdf6..4299ba3 100644
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -67,6 +67,19 @@
+ 
+ #endif
+ 
++/*********************************************/
++#if (LIBAVCODEC_VERSION_MAJOR >= 57)
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        AV_CODEC_FLAG_QSCALE
++
++#else
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        CODEC_FLAG_QSCALE
++
++#endif
++
+ /*********************************************/
+ AVFrame *my_frame_alloc(void){
+     AVFrame *pic;
+@@ -548,7 +561,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){
+         /* The selection of 8000 is a subjective number based upon viewing output files */
+         if (ffmpeg->vbr > 0){
+             ffmpeg->vbr =(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000) + 1;
+-            ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE;
++            ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_QSCALE;
+             ffmpeg->ctx_codec->global_quality=ffmpeg->vbr;
+         }
+     }
+@@ -673,7 +686,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){
+       ffmpeg->ctx_codec->strict_std_compliance = -2;
+       ffmpeg->ctx_codec->level = 3;
+     }
+-    ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
++    ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER;
+ 
+     retcd = ffmpeg_set_quality(ffmpeg);
+     if (retcd < 0){
+-- 
+2.18.0
+
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 6/7] package/squeezelite: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
                   ` (3 preceding siblings ...)
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 5/7] package/motion: " Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:26   ` Thomas Petazzoni
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2 Bernd Kuhls
  2018-09-08 21:04 ` [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Thomas Petazzoni
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

Git-formatted patch 0003, added license hash.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: re-integrated in ffmpeg bump series
v2: split patch from v1, git-formatted patches 3 & 4, added license hash

 ... 0003-Replace-deprecated-FFmpeg-API.patch} | 26 ++++++++++------
 .../0004-Fix-FTBFS-with-FFmpeg-4.0.patch      | 31 +++++++++++++++++++
 package/squeezelite/squeezelite.hash          |  1 +
 3 files changed, 49 insertions(+), 9 deletions(-)
 rename package/squeezelite/{0003-ffmpeg_2_9.patch => 0003-Replace-deprecated-FFmpeg-API.patch} (80%)
 create mode 100644 package/squeezelite/0004-Fix-FTBFS-with-FFmpeg-4.0.patch

diff --git a/package/squeezelite/0003-ffmpeg_2_9.patch b/package/squeezelite/0003-Replace-deprecated-FFmpeg-API.patch
similarity index 80%
rename from package/squeezelite/0003-ffmpeg_2_9.patch
rename to package/squeezelite/0003-Replace-deprecated-FFmpeg-API.patch
index f69b829b38..74d8f1be55 100644
--- a/package/squeezelite/0003-ffmpeg_2_9.patch
+++ b/package/squeezelite/0003-Replace-deprecated-FFmpeg-API.patch
@@ -1,17 +1,22 @@
-Fix compilation with ffmpeg >= 2.9
+From cce6a0378ac319b87d2545d73f593d440bf686f5 Mon Sep 17 00:00:00 2001
+From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
+Date: Sat, 18 Aug 2018 13:25:23 +0200
+Subject: [PATCH] Replace deprecated FFmpeg API
+
+Fixes compilation with ffmpeg >= 2.9.
 
 Downloaded from Debian:
-https://sources.debian.net/src/squeezelite/1.8-3/debian/patches/ffmpeg_2.9.patch/
+https://sources.debian.org/src/squeezelite/1.8-4.1/debian/patches/ffmpeg_2.9.patch/
 
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ ffmpeg.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
 
-
-Description: Replace deprecated FFmpeg API
-Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-Last-Update: <2015-11-02>
-
---- squeezelite-1.8.orig/ffmpeg.c
-+++ squeezelite-1.8/ffmpeg.c
+diff --git a/ffmpeg.c b/ffmpeg.c
+index 279f31d..bc9136c 100644
+--- a/ffmpeg.c
++++ b/ffmpeg.c
 @@ -52,8 +52,8 @@ struct ff_s {
  	unsigned (* avcodec_version)(void);
  	AVCodec * (* avcodec_find_decoder)(int);
@@ -55,3 +60,6 @@ Last-Update: <2015-11-02>
  	ff->avcodec_decode_audio4 = dlsym(handle_codec, "avcodec_decode_audio4");
  	ff->av_init_packet = dlsym(handle_codec, "av_init_packet");
  	ff->av_free_packet = dlsym(handle_codec, "av_free_packet");
+-- 
+2.18.0
+
diff --git a/package/squeezelite/0004-Fix-FTBFS-with-FFmpeg-4.0.patch b/package/squeezelite/0004-Fix-FTBFS-with-FFmpeg-4.0.patch
new file mode 100644
index 0000000000..25a5db3cae
--- /dev/null
+++ b/package/squeezelite/0004-Fix-FTBFS-with-FFmpeg-4.0.patch
@@ -0,0 +1,31 @@
+From 4ad37284447e768d641768c7c8a69c4640c83181 Mon Sep 17 00:00:00 2001
+From: James Cowgill <jcowgill@debian.org>
+Date: Sat, 18 Aug 2018 13:26:59 +0200
+Subject: [PATCH] Fix FTBFS with FFmpeg 4.0
+
+Bug-Debian: https://bugs.debian.org/888335
+
+Downloaded from Debian:
+https://sources.debian.org/src/squeezelite/1.8-4.1/debian/patches/ffmpeg4.0.patch/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ ffmpeg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ffmpeg.c b/ffmpeg.c
+index bc9136c..d51b08e 100644
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -264,7 +264,7 @@ static decode_state ff_decode(void) {
+ 		ff->mmsh_bytes_left = ff->mmsh_bytes_pad = ff->mmsh_packet_len = 0;
+ 
+ 		if (!ff->readbuf) {
+-			ff->readbuf = AV(ff, malloc, READ_SIZE +  FF_INPUT_BUFFER_PADDING_SIZE);
++			ff->readbuf = AV(ff, malloc, READ_SIZE +  AV_INPUT_BUFFER_PADDING_SIZE);
+ 		}
+ 
+ 		avio = AVIO(ff, alloc_context, ff->readbuf, READ_SIZE, 0, NULL, _read_data, NULL, NULL);
+-- 
+2.18.0
+
diff --git a/package/squeezelite/squeezelite.hash b/package/squeezelite/squeezelite.hash
index 1dbb4c155a..d56f5da665 100644
--- a/package/squeezelite/squeezelite.hash
+++ b/package/squeezelite/squeezelite.hash
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256 0c844e7714d3f15325629c59ee75e6309763116e61a6b73486b502e2e5cce5fd squeezelite-v1.8.tar.gz
+sha256 3e4379e1f34b8c5da00e545cfe94369b94a57745902c5d12be43b6332c34c04e LICENSE.txt
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
                   ` (4 preceding siblings ...)
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 6/7] package/squeezelite: " Bernd Kuhls
@ 2018-08-25  7:31 ` Bernd Kuhls
  2018-09-08 21:27   ` Thomas Petazzoni
  2018-09-08 21:04 ` [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Thomas Petazzoni
  6 siblings, 1 reply; 15+ messages in thread
From: Bernd Kuhls @ 2018-08-25  7:31 UTC (permalink / raw)
  To: buildroot

ffserver was removed upstream:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6b35a83214f1bc3fb38c9ea9c2cd3676f28709fa

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: initial version

 Config.in.legacy           | 6 ++++++
 package/ffmpeg/Config.in   | 6 ------
 package/ffmpeg/ffmpeg.hash | 2 +-
 package/ffmpeg/ffmpeg.mk   | 8 +-------
 4 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index aae8d28e13..3aa82aa5fe 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -145,6 +145,12 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2018.11"
 
+config BR2_PACKAGE_FFMPEG_FFSERVER
+	bool "ffserver was removed"
+	select BR2_LEGACY
+	help
+	  ffserver was removed upstream
+
 config BR2_KERNEL_HEADERS_4_10
 	bool "kernel headers version 4.10.x are no longer supported"
 	select BR2_KERNEL_HEADERS_4_9
diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in
index 2d94c5712a..eec7ce0f6b 100644
--- a/package/ffmpeg/Config.in
+++ b/package/ffmpeg/Config.in
@@ -63,12 +63,6 @@ config BR2_PACKAGE_FFMPEG_FFPLAY
 comment "ffplay needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
 
-config BR2_PACKAGE_FFMPEG_FFSERVER
-	bool "Build ffserver"
-	depends on BR2_USE_MMU # fork()
-	help
-	  FFserver is a streaming server for both audio and video.
-
 config BR2_PACKAGE_FFMPEG_FFPROBE
 	bool "Build ffprobe"
 	help
diff --git a/package/ffmpeg/ffmpeg.hash b/package/ffmpeg/ffmpeg.hash
index 7d64d8441c..ff6b8ffcb5 100644
--- a/package/ffmpeg/ffmpeg.hash
+++ b/package/ffmpeg/ffmpeg.hash
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256 386f7601e865df6bddde05bb6927119b5a853f0b92e2e9834f59c125a17d3fc6  ffmpeg-3.4.4.tar.xz
+sha256 a95c0cc9eb990e94031d2183f2e6e444cc61c99f6f182d1575c433d62afb2f97  ffmpeg-4.0.2.tar.xz
 sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING.GPLv2
 sha256 b634ab5640e258563c536e658cad87080553df6f34f62269a21d554844e58bfe  COPYING.LGPLv2.1
 sha256 73d99bc83313fff665b426d6672b4e0479102bc402fe22314ac9ce94a38aa5ff  LICENSE.md
diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
index cf9abeb102..4071e1ccef 100644
--- a/package/ffmpeg/ffmpeg.mk
+++ b/package/ffmpeg/ffmpeg.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FFMPEG_VERSION = 3.4.4
+FFMPEG_VERSION = 4.0.2
 FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
 FFMPEG_SITE = http://ffmpeg.org/releases
 FFMPEG_INSTALL_STAGING = YES
@@ -84,12 +84,6 @@ else
 FFMPEG_CONF_OPTS += --disable-ffplay
 endif
 
-ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y)
-FFMPEG_CONF_OPTS += --enable-ffserver
-else
-FFMPEG_CONF_OPTS += --disable-ffserver
-endif
-
 ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y)
 FFMPEG_CONF_OPTS += --enable-avresample
 else
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0
  2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
                   ` (5 preceding siblings ...)
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2 Bernd Kuhls
@ 2018-09-08 21:04 ` Thomas Petazzoni
  6 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:12 +0200, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v3: re-integrated in ffmpeg bump series
> v2: split patch from v1 series
> 
>  package/aubio/0001-ffmpeg4.patch | 32 ++++++++++++++++++++++++++++++++

Please use the file name generated by git format-patch, i.e in the
upstream Git repository, run:

$ git format-patch 5690daf759b473b9d13b4547ef37adc2695cf524^..5690daf759b473b9d13b4547ef37adc2695cf524

which generates:

0001-Fix-build-with-FFmpeg-4.0.patch

I've renamed the file and applied, but please try to do this for the
next contributions. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 2/7] package/freeswitch: Fix build with FFmpeg 4.0
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 2/7] package/freeswitch: " Bernd Kuhls
@ 2018-09-08 21:04   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:04 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:13 +0200, Bernd Kuhls wrote:

>  .../0002-mod_av-unbreak-with-ffmpeg-4.0.patch | 90 +++++++++++++++++++

This patch no longer applies since the bump of freeswitch to 1.8.1,
could you respin a new version ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: Fix build with FFmpeg 4.0
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: " Bernd Kuhls
@ 2018-09-08 21:11   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:15 +0200, Bernd Kuhls wrote:
> Added license hash.

Please don't add license hash in unrelated patches. When doing a
package bump, it's fairly OK, but mixed with ffmpeg 4.0 fixes,  that's
really odd.

I've applied after dropping the license file hash addition. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: Fix build with FFmpeg 4.0
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: " Bernd Kuhls
@ 2018-09-08 21:23   ` Thomas Petazzoni
  2018-09-09 14:16     ` Bernd Kuhls
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:23 UTC (permalink / raw)
  To: buildroot

Hello Bernd,

On Sat, 25 Aug 2018 09:31:14 +0200, Bernd Kuhls wrote:

> diff --git a/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch b/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch
> new file mode 100644
> index 0000000000..2d750e2345
> --- /dev/null
> +++ b/package/gstreamer1/gst1-libav/0001-Fix-build-with-ffmpeg-4.0.patch
> @@ -0,0 +1,676 @@
> +From 257963d93ce6a8ce08c3f3771e3a1b7ebb71dc2e Mon Sep 17 00:00:00 2001
> +From: Ulenrich <eulenreich@gmx.de>
> +Date: Thu, 16 Aug 2018 22:43:18 +0200
> +Subject: [PATCH] Fix build with ffmpeg 4.0
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Instead of using the ffmpeg copy included by this package we use a patch
> +from the Gentoo bug tracker to fix the build with ffmpeg 4.0.
> +
> +Upstream included support for ffmpeg 4.0 in the upcoming 1.16.x release
> +of gstreamer:
> +https://bugzilla.gnome.org/show_bug.cgi?id=792900
> +
> +NEWS mentions that the fixes "won?t be backported to the 1.14 branch as
> +it is rather intrusive":
> +https://github.com/GStreamer/gst-libav/commit/8886a016fce625e1c25a4902be4021196a6784a2#diff-ff4e2dc4962dc25a1512353299992c8dR1400
> +
> +Downloaded from https://bugs.gentoo.org/654628#c11

I am a bit worried about this patch, see below.

> +-  params.padding = FF_INPUT_BUFFER_PADDING_SIZE;
> ++  params.padding = AV_INPUT_BUFFER_PADDING_SIZE;

Is AV_INPUT_BUFFER_PADDING_SIZE defined in ffmpeg 3.x that we
currently have ? If not, then this change is going to break the build.

In other packages, what is done is:

++#ifndef AV_INPUT_BUFFER_PADDING_SIZE
++#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
++#endif

Which to me, implies that AV_INPUT_BUFFER_PADDING_SIZE is not defined
in older versions of ffmpeg.

> ++#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

Is it OK to just remove all this code ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 5/7] package/motion: Fix build with FFmpeg 4.0
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 5/7] package/motion: " Bernd Kuhls
@ 2018-09-08 21:24   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:24 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:16 +0200, Bernd Kuhls wrote:
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v3: re-integrated in ffmpeg bump series
> v2: split patch from v1
>     backported upstream commit (Thomas)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 6/7] package/squeezelite: Fix build with FFmpeg 4.0
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 6/7] package/squeezelite: " Bernd Kuhls
@ 2018-09-08 21:26   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:26 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:17 +0200, Bernd Kuhls wrote:
> Git-formatted patch 0003, added license hash.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v3: re-integrated in ffmpeg bump series
> v2: split patch from v1, git-formatted patches 3 & 4, added license hash

I've dropped the license file hash addition (should be done in a
separate commit), and applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2
  2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2 Bernd Kuhls
@ 2018-09-08 21:27   ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2018-09-08 21:27 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 25 Aug 2018 09:31:18 +0200, Bernd Kuhls wrote:
> ffserver was removed upstream:
> http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6b35a83214f1bc3fb38c9ea9c2cd3676f28709fa
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

Since I did not apply the gst-libav and freeswitch patches, they are
not yet compatible with ffmpeg 4.x, so I did not apply this one either.

Could you resend it as part of the next series with the freeswitch and
gst-libav fixes ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: Fix build with FFmpeg 4.0
  2018-09-08 21:23   ` Thomas Petazzoni
@ 2018-09-09 14:16     ` Bernd Kuhls
  0 siblings, 0 replies; 15+ messages in thread
From: Bernd Kuhls @ 2018-09-09 14:16 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

Am Sat, 08 Sep 2018 23:23:31 +0200 schrieb Thomas Petazzoni:

>> +Downloaded from https://bugs.gentoo.org/654628#c11
> 
> I am a bit worried about this patch, see below.
> 
>> +-  params.padding = FF_INPUT_BUFFER_PADDING_SIZE;
>> ++  params.padding = AV_INPUT_BUFFER_PADDING_SIZE;
> 
> Is AV_INPUT_BUFFER_PADDING_SIZE defined in ffmpeg 3.x that we
> currently have ? If not, then this change is going to break the build.

Yes, it was added to ffmpeg 2.8 back in 2015:
http://git.videolan.org/?
p=ffmpeg.git;a=commitdiff;h=29d147c94dd40a78ca3981f39365cc77dae9a0da

>> ++#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
> 
> Is it OK to just remove all this code ?

To get gst1-libav 1.14.2 compiled, yes, it seems so.

The alternative would be to bump gstreamer1 to its current git master 
branch like Debian did:

http://metadata.ftp-master.debian.org/changelogs//main/g/gst-libav1.0/gst-
libav1.0_1.15.0.1+git20180723+db823502-1_changelog

Regards, Bernd

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-09-09 14:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-25  7:31 [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Bernd Kuhls
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 2/7] package/freeswitch: " Bernd Kuhls
2018-09-08 21:04   ` Thomas Petazzoni
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 3/7] package/gstreamer1/gst1-libav: " Bernd Kuhls
2018-09-08 21:23   ` Thomas Petazzoni
2018-09-09 14:16     ` Bernd Kuhls
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 4/7] package/mediastreamer: " Bernd Kuhls
2018-09-08 21:11   ` Thomas Petazzoni
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 5/7] package/motion: " Bernd Kuhls
2018-09-08 21:24   ` Thomas Petazzoni
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 6/7] package/squeezelite: " Bernd Kuhls
2018-09-08 21:26   ` Thomas Petazzoni
2018-08-25  7:31 ` [Buildroot] [PATCH/next v3 7/7] package/ffmpeg: bump version to 4.0.2 Bernd Kuhls
2018-09-08 21:27   ` Thomas Petazzoni
2018-09-08 21:04 ` [Buildroot] [PATCH/next v3 1/7] package/aubio: Fix build with FFmpeg 4.0 Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.