rpms/gstreamer-ffmpeg/devel 0001-configure.ac-Fix-for-new-libav.patch, NONE, 1.1 0002-gstffmpegutils-Fix-include.patch, NONE, 1.1 0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch, NONE, 1.1 0004-ffmpeg-fix-pad-template-ref-leaks.patch, NONE, 1.1 0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch, NONE, 1.1 0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch, NONE, 1.1 0007-ffmpegdemux-fix-caps-leak.patch, NONE, 1.1 0008-ffdec-Only-set-get_buffer-function-for-video.patch, NONE, 1.1 0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch, NONE, 1.1 0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch, NONE, 1.1 0011-ffmux-Use-correct-enum-type-for-return-value.patch, NONE, 1.1 0012-ffdec-don-t-flush-buffers-on-DISCONT.patch, NONE, 1.1 .cvsignore, 1.12, 1.13 gstreamer-ffmpeg.spec, 1.20, 1.21 sources, 1.12, 1.13

Hans de Goede jwrdegoede at rpmfusion.org
Thu Jul 12 16:07:06 CEST 2012


Author: jwrdegoede

Update of /cvs/free/rpms/gstreamer-ffmpeg/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv26164

Modified Files:
	.cvsignore gstreamer-ffmpeg.spec sources 
Added Files:
	0001-configure.ac-Fix-for-new-libav.patch 
	0002-gstffmpegutils-Fix-include.patch 
	0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch 
	0004-ffmpeg-fix-pad-template-ref-leaks.patch 
	0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch 
	0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch 
	0007-ffmpegdemux-fix-caps-leak.patch 
	0008-ffdec-Only-set-get_buffer-function-for-video.patch 
	0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch 
	0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch 
	0011-ffmux-Use-correct-enum-type-for-return-value.patch 
	0012-ffdec-don-t-flush-buffers-on-DISCONT.patch 
Log Message:
* Thu Jul 12 2012 Hans de Goede <j.w.r.degoede at gmail.com> - 0.10.13-3
- Switch to the build in libav for now, gst-ffmpeg wants libav-0.8,
  and the system ffmpeg is 0.11, which is more or less the unreleased
  libav-0.9. Once libav-0.9 gets officially released gst-ffmpeg will
  hopefully switch to it
- Upgrade the buildin libav to 0.8.3 to get all the security fixes from
  upstream libav


0001-configure.ac-Fix-for-new-libav.patch:
 configure |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE 0001-configure.ac-Fix-for-new-libav.patch ---
>From d97f8b09fbc1db16ad257ad0f0c682611a95a94c Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Mon, 17 Oct 2011 14:26:20 +0000
Subject: [PATCH 01/12] configure.ac: Fix for new libav

---
 configure |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 87e825e..83020f7 100755
--- a/configure
+++ b/configure
@@ -16696,8 +16696,8 @@ fi
   embffmpeg_configure_args="--prefix=$prefix"
 
   # Enable pic and static so that we get .a files, but with PIC code.
-  embffmpeg_configure_args="$embffmpeg_configure_args --disable-ffserver --disable-ffplay\
-        --disable-ffmpeg --disable-ffprobe --enable-static --enable-pic \
+  embffmpeg_configure_args="$embffmpeg_configure_args --disable-avserver --disable-avplay\
+        --disable-ffmpeg --disable-avprobe --enable-postproc --enable-gpl --enable-static --enable-pic \
 	--disable-encoder=flac --disable-decoder=cavs --disable-protocols --disable-devices\
 	--disable-network --disable-hwaccels --disable-filters --disable-doc\
 	--enable-optimizations"
-- 
1.7.10.4


0002-gstffmpegutils-Fix-include.patch:
 gstffmpegutils.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- NEW FILE 0002-gstffmpegutils-Fix-include.patch ---
>From d4e381c1cf8fa825d060b3c2797272e675d15937 Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Mon, 17 Oct 2011 16:26:52 +0200
Subject: [PATCH 02/12] gstffmpegutils: Fix include

---
 ext/ffmpeg/gstffmpegutils.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ext/ffmpeg/gstffmpegutils.h b/ext/ffmpeg/gstffmpegutils.h
index 4b713de..dbc3fae 100644
--- a/ext/ffmpeg/gstffmpegutils.h
+++ b/ext/ffmpeg/gstffmpegutils.h
@@ -20,11 +20,17 @@
 #ifndef __GST_FFMPEG_UTILS_H__
 #define __GST_FFMPEG_UTILS_H__
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef HAVE_FFMPEG_UNINSTALLED
+#include <mathematics.h>
 #include <avcodec.h>
 #else
 #include <libavcodec/avcodec.h>
 #endif
+
 #include <gst/gst.h>
 
 /*
-- 
1.7.10.4


0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch:
 gstffmpegdec.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch ---
>From 68c379469f807bc8d34bd8bb0ea28fd25a9be1db Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Mon, 17 Oct 2011 16:27:36 +0200
Subject: [PATCH 03/12] gstffmpegdec: Re-enable MT-decoding by default

---
 ext/ffmpeg/gstffmpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index cc07889..035307e 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -197,7 +197,7 @@ gst_ts_info_get (GstFFMpegDec * dec, gint idx)
 #define DEFAULT_DO_PADDING		TRUE
 #define DEFAULT_DEBUG_MV		FALSE
 #define DEFAULT_CROP			TRUE
-#define DEFAULT_MAX_THREADS		1
+#define DEFAULT_MAX_THREADS		0
 
 enum
 {
-- 
1.7.10.4


0004-ffmpeg-fix-pad-template-ref-leaks.patch:
 ffmpeg/gstffmpegaudioresample.c |    6 ++----
 ffmpeg/gstffmpegdeinterlace.c   |    6 ++----
 ffmpeg/gstffmpegmux.c           |    3 +++
 libpostproc/gstpostproc.c       |    8 ++++----
 libswscale/gstffmpegscale.c     |    7 ++-----
 5 files changed, 13 insertions(+), 17 deletions(-)

--- NEW FILE 0004-ffmpeg-fix-pad-template-ref-leaks.patch ---
>From e392044f5b363f0cdba8a9441a1cb32b20387569 Mon Sep 17 00:00:00 2001
From: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date: Mon, 28 Nov 2011 13:23:42 +0000
Subject: [PATCH 04/12] ffmpeg: fix pad template ref leaks

https://bugzilla.gnome.org/show_bug.cgi?id=662664
---
 ext/ffmpeg/gstffmpegaudioresample.c |    6 ++----
 ext/ffmpeg/gstffmpegdeinterlace.c   |    6 ++----
 ext/ffmpeg/gstffmpegmux.c           |    3 +++
 ext/libpostproc/gstpostproc.c       |    8 ++++----
 ext/libswscale/gstffmpegscale.c     |    6 ++----
 5 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegaudioresample.c b/ext/ffmpeg/gstffmpegaudioresample.c
index 321a008..b63068d 100644
--- a/ext/ffmpeg/gstffmpegaudioresample.c
+++ b/ext/ffmpeg/gstffmpegaudioresample.c
@@ -103,10 +103,8 @@ gst_ffmpegaudioresample_base_init (gpointer g_class)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
 
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_factory));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_factory));
+  gst_element_class_add_static_pad_template (element_class, &src_factory);
+  gst_element_class_add_static_pad_template (element_class, &sink_factory);
   gst_element_class_set_details_simple (element_class,
       "FFMPEG Audio resampling element", "Filter/Converter/Audio",
       "Converts audio from one samplerate to another",
diff --git a/ext/ffmpeg/gstffmpegdeinterlace.c b/ext/ffmpeg/gstffmpegdeinterlace.c
index de95314..40fea5e 100644
--- a/ext/ffmpeg/gstffmpegdeinterlace.c
+++ b/ext/ffmpeg/gstffmpegdeinterlace.c
@@ -145,10 +145,8 @@ gst_ffmpegdeinterlace_base_init (gpointer g_class)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
 
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_factory));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_factory));
+  gst_element_class_add_static_pad_template (element_class, &src_factory);
+  gst_element_class_add_static_pad_template (element_class, &sink_factory);
   gst_element_class_set_details_simple (element_class,
       "FFMPEG Deinterlace element", "Filter/Effect/Video/Deinterlace",
       "Deinterlace video", "Luca Ognibene <luogni at tin.it>");
diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index 538aeed..a041761 100644
--- a/ext/ffmpeg/gstffmpegmux.c
+++ b/ext/ffmpeg/gstffmpegmux.c
@@ -272,17 +272,20 @@ gst_ffmpegmux_base_init (gpointer g_class)
   /* pad templates */
   srctempl = gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, srccaps);
   gst_element_class_add_pad_template (element_class, srctempl);
+  gst_object_unref (srctempl);
 
   if (audiosinkcaps) {
     audiosinktempl = gst_pad_template_new ("audio_%d",
         GST_PAD_SINK, GST_PAD_REQUEST, audiosinkcaps);
     gst_element_class_add_pad_template (element_class, audiosinktempl);
+    gst_object_unref (audiosinktempl);
   }
 
   if (videosinkcaps) {
     videosinktempl = gst_pad_template_new ("video_%d",
         GST_PAD_SINK, GST_PAD_REQUEST, videosinkcaps);
     gst_element_class_add_pad_template (element_class, videosinktempl);
+    gst_object_unref (videosinktempl);
   }
 
 beach:
diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c
index f9ddcdd..963b77d 100644
--- a/ext/libpostproc/gstpostproc.c
+++ b/ext/libpostproc/gstpostproc.c
@@ -381,10 +381,10 @@ gst_post_proc_base_init (GstPostProcClass * klass)
   g_free (longname);
   g_free (description);
 
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_post_proc_src_template));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&gst_post_proc_sink_template));
+  gst_element_class_add_static_pad_template (element_class,
+      &gst_post_proc_src_template);
+  gst_element_class_add_static_pad_template (element_class,
+      &gst_post_proc_sink_template);
 
   klass->filterid = ppidx;
 }
diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c
index b9ef3e1..e00956c 100644
--- a/ext/libswscale/gstffmpegscale.c
+++ b/ext/libswscale/gstffmpegscale.c
@@ -190,10 +190,8 @@ gst_ffmpegscale_base_init (gpointer g_class)
 {
   GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
 
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&src_factory));
-  gst_element_class_add_pad_template (element_class,
-      gst_static_pad_template_get (&sink_factory));
+  gst_element_class_add_static_pad_template (element_class, &src_factory);
+  gst_element_class_add_static_pad_template (element_class, &sink_factory);
   gst_element_class_set_details_simple (element_class, "FFMPEG Scale element",
       "Filter/Converter/Video",
       "Converts video from one resolution to another",
-- 
1.7.10.4


0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch:
 gstffmpegdec.c |   62 +++++++++++++++++++++++++++++++++------------------------
 1 file changed, 36 insertions(+), 26 deletions(-)

--- NEW FILE 0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch ---
>From 75665085f654d312a57a06406ae0e6c31ffdd1cd Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Tue, 8 Nov 2011 18:56:54 +0100
Subject: [PATCH 05/12] ffmpegdec: Report latency if B-frames are present

... and cleanup the query handler while we're at it

https://bugzilla.gnome.org/show_bug.cgi?id=663616
---
 ext/ffmpeg/gstffmpegdec.c |   61 ++++++++++++++++++++++++++-------------------
 1 file changed, 36 insertions(+), 25 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 035307e..a0f609a 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -477,35 +477,43 @@ static gboolean
 gst_ffmpegdec_query (GstPad * pad, GstQuery * query)
 {
   GstFFMpegDec *ffmpegdec;
-  GstPad *peer;
-  gboolean res;
+  gboolean res = FALSE;
 
   ffmpegdec = (GstFFMpegDec *) gst_pad_get_parent (pad);
 
-  res = FALSE;
-
-  if ((peer = gst_pad_get_peer (ffmpegdec->sinkpad))) {
-    /* just forward to peer */
-    res = gst_pad_query (peer, query);
-    gst_object_unref (peer);
-  }
-#if 0
-  {
-    GstFormat bfmt;
-
-    bfmt = GST_FORMAT_BYTES;
-
-    /* ok, do bitrate calc... */
-    if ((type != GST_QUERY_POSITION && type != GST_QUERY_TOTAL) ||
-        *fmt != GST_FORMAT_TIME || ffmpegdec->context->bit_rate == 0 ||
-        !gst_pad_query (peer, type, &bfmt, value))
-      return FALSE;
-
-    if (ffmpegdec->pcache && type == GST_QUERY_POSITION)
-      *value -= GST_BUFFER_SIZE (ffmpegdec->pcache);
-    *value *= GST_SECOND / ffmpegdec->context->bit_rate;
+  switch (GST_QUERY_TYPE (query)) {
+    case GST_QUERY_LATENCY:
+    {
+      GST_DEBUG_OBJECT (ffmpegdec, "latency query %d",
+          ffmpegdec->context->has_b_frames);
+      if ((res = gst_pad_peer_query (ffmpegdec->sinkpad, query))) {
+        if (ffmpegdec->context->has_b_frames) {
+          gboolean live;
+          GstClockTime min_lat, max_lat, our_lat;
+
+          gst_query_parse_latency (query, &live, &min_lat, &max_lat);
+          if (ffmpegdec->format.video.fps_n > 0)
+            our_lat =
+                gst_util_uint64_scale_int (ffmpegdec->context->has_b_frames *
+                GST_SECOND, ffmpegdec->format.video.fps_d,
+                ffmpegdec->format.video.fps_n);
+          else
+            our_lat =
+                gst_util_uint64_scale_int (ffmpegdec->context->has_b_frames *
+                GST_SECOND, 1, 25);
+          if (min_lat != -1)
+            min_lat += our_lat;
+          if (max_lat != -1)
+            max_lat += our_lat;
+          gst_query_set_latency (query, live, min_lat, max_lat);
+        }
+      }
+    }
+      break;
+    default:
+      res = gst_pad_query_default (pad, query);
+      break;
   }
-#endif
 
   gst_object_unref (ffmpegdec);
 
@@ -1546,6 +1554,9 @@ check_keyframe (GstFFMpegDec * ffmpegdec)
   if (!ffmpegdec->has_b_frames && ffmpegdec->picture->pict_type == FF_B_TYPE) {
     GST_DEBUG_OBJECT (ffmpegdec, "we have B frames");
     ffmpegdec->has_b_frames = TRUE;
+    /* Emit latency message to recalculate it */
+    gst_element_post_message (GST_ELEMENT_CAST (ffmpegdec),
+        gst_message_new_latency (GST_OBJECT_CAST (ffmpegdec)));
   }
 
   is_itype = (ffmpegdec->picture->pict_type == FF_I_TYPE);
-- 
1.7.10.4


0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch:
 gstffmpegcodecmap.c |   20 --------------------
 1 file changed, 20 deletions(-)

--- NEW FILE 0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch ---
>From 36004f3ac91e3436a55b2fd22438fe43493dcb8a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
Date: Tue, 10 Jan 2012 10:08:05 +0100
Subject: [PATCH 06/12] ffmpeg: Channel layouts are now set for DTS and (E)AC3
 by libav

---
 ext/ffmpeg/gstffmpegcodecmap.c |   19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index f3381dd..2b06b2b 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -340,25 +340,6 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
     GstAudioChannelPosition *pos;
     guint64 channel_layout = context->channel_layout;
 
-    if (channel_layout == 0) {
-      const guint64 default_channel_set[] = {
-        0, 0, CH_LAYOUT_SURROUND, CH_LAYOUT_QUAD, CH_LAYOUT_5POINT0,
-        CH_LAYOUT_5POINT1, 0, CH_LAYOUT_7POINT1
-      };
-
-      switch (codec_id) {
-        case CODEC_ID_EAC3:
-        case CODEC_ID_AC3:
-        case CODEC_ID_DTS:
-          if (context->channels > 0
-              && context->channels < G_N_ELEMENTS (default_channel_set))
-            channel_layout = default_channel_set[context->channels - 1];
-          break;
-        default:
-          break;
-      }
-    }
-
     caps = gst_caps_new_simple (mimetype,
         "rate", G_TYPE_INT, context->sample_rate,
         "channels", G_TYPE_INT, context->channels, NULL);
-- 
1.7.10.4


0007-ffmpegdemux-fix-caps-leak.patch:
 gstffmpegdemux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE 0007-ffmpegdemux-fix-caps-leak.patch ---
>From e0212a0b36fea9a3ad836bb0014e136675ad7ac8 Mon Sep 17 00:00:00 2001
From: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date: Thu, 12 Jan 2012 14:57:48 +0000
Subject: [PATCH 07/12] ffmpegdemux: fix caps leak

---
 ext/ffmpeg/gstffmpegdemux.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/ext/ffmpeg/gstffmpegdemux.c b/ext/ffmpeg/gstffmpegdemux.c
index 3eb5328..6122a40 100644
--- a/ext/ffmpeg/gstffmpegdemux.c
+++ b/ext/ffmpeg/gstffmpegdemux.c
@@ -1330,6 +1330,7 @@ gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
           in_plugin->name, sinkcaps, res);
 
       gst_type_find_suggest (tf, res, sinkcaps);
+      gst_caps_unref (sinkcaps);
     }
   }
 }
-- 
1.7.10.4


0008-ffdec-Only-set-get_buffer-function-for-video.patch:
 gstffmpegdec.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- NEW FILE 0008-ffdec-Only-set-get_buffer-function-for-video.patch ---
>From 2a7cd3290348ef20eef728e37e5c4dce31c40b08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
Date: Wed, 18 Jan 2012 10:05:09 +0100
Subject: [PATCH 08/12] ffdec: Only set get_buffer() function for video

Fixes bug #666435.
---
 ext/ffmpeg/gstffmpegdec.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index a0f609a..cbef197 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -766,9 +766,11 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
   }
 
   /* set buffer functions */
-  ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
-  ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
-  ffmpegdec->context->draw_horiz_band = NULL;
+  if (oclass->in_plugin->type == AVMEDIA_TYPE_VIDEO) {
+    ffmpegdec->context->get_buffer = gst_ffmpegdec_get_buffer;
+    ffmpegdec->context->release_buffer = gst_ffmpegdec_release_buffer;
+    ffmpegdec->context->draw_horiz_band = NULL;
+  }
 
   /* default is to let format decide if it needs a parser */
   ffmpegdec->turnoff_parser = FALSE;
-- 
1.7.10.4


0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch:
 gstffmpegcodecmap.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- NEW FILE 0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch ---
>From 92b319b021f4b0ce2ee7069d9894a6a47a78faf9 Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Wed, 22 Feb 2012 12:14:21 +0100
Subject: [PATCH 09/12] codecmap: Add mapping for Indeo 4 video codec

---
 ext/ffmpeg/gstffmpegcodecmap.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c
index 2b06b2b..3759a35 100644
--- a/ext/ffmpeg/gstffmpegcodecmap.c
+++ b/ext/ffmpeg/gstffmpegcodecmap.c
@@ -906,6 +906,11 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
           "indeoversion", G_TYPE_INT, 5, NULL);
       break;
 
+    case CODEC_ID_INDEO4:
+      caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
+          "indeoversion", G_TYPE_INT, 4, NULL);
+      break;
+
     case CODEC_ID_INDEO3:
       caps = gst_ff_vid_caps_new (context, codec_id, "video/x-indeo",
           "indeoversion", G_TYPE_INT, 3, NULL);
@@ -3162,6 +3167,9 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
         case 5:
           id = CODEC_ID_INDEO5;
           break;
+        case 4:
+          id = CODEC_ID_INDEO4;
+          break;
         case 3:
           id = CODEC_ID_INDEO3;
           break;
-- 
1.7.10.4


0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch:
 gstffmpegdec.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- NEW FILE 0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch ---
>From daabb55de44947f322181a3d7c320ad0202baf7a Mon Sep 17 00:00:00 2001
From: Edward Hervey <edward.hervey at collabora.co.uk>
Date: Fri, 2 Mar 2012 17:27:30 +0100
Subject: [PATCH 10/12] ffmpegdec: Use auto-threads if available, and only
 slice-threading

Slice threading causes less latency (and corruption)
---
 ext/ffmpeg/gstffmpegdec.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index cbef197..6ad266e 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -884,11 +884,16 @@ gst_ffmpegdec_setcaps (GstPad * pad, GstCaps * caps)
    * supports it) */
   ffmpegdec->context->debug_mv = ffmpegdec->debug_mv;
 
-  if (ffmpegdec->max_threads == 0)
-    ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
-  else
+  if (ffmpegdec->max_threads == 0) {
+    if (!(oclass->in_plugin->capabilities & CODEC_CAP_AUTO_THREADS))
+      ffmpegdec->context->thread_count = gst_ffmpeg_auto_max_threads ();
+    else
+      ffmpegdec->context->thread_count = 0;
+  } else
     ffmpegdec->context->thread_count = ffmpegdec->max_threads;
 
+  ffmpegdec->context->thread_type = FF_THREAD_SLICE;
+
   /* open codec - we don't select an output pix_fmt yet,
    * simply because we don't know! We only get it
    * during playback... */
-- 
1.7.10.4


0011-ffmux-Use-correct-enum-type-for-return-value.patch:
 gstffmpegmux.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE 0011-ffmux-Use-correct-enum-type-for-return-value.patch ---
>From 283e0a54d04b2bf84fc365752dd4004c1e501f38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
Date: Tue, 6 Mar 2012 15:27:22 +0100
Subject: [PATCH 11/12] ffmux: Use correct enum type for return value

---
 ext/ffmpeg/gstffmpegmux.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/ffmpeg/gstffmpegmux.c b/ext/ffmpeg/gstffmpegmux.c
index a041761..5486bda 100644
--- a/ext/ffmpeg/gstffmpegmux.c
+++ b/ext/ffmpeg/gstffmpegmux.c
@@ -785,7 +785,7 @@ gst_ffmpegmux_collected (GstCollectPads * pads, gpointer user_data)
 static GstStateChangeReturn
 gst_ffmpegmux_change_state (GstElement * element, GstStateChange transition)
 {
-  GstFlowReturn ret;
+  GstStateChangeReturn ret;
   GstFFMpegMux *ffmpegmux = (GstFFMpegMux *) (element);
 
   switch (transition) {
-- 
1.7.10.4


0012-ffdec-don-t-flush-buffers-on-DISCONT.patch:
 gstffmpegdec.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- NEW FILE 0012-ffdec-don-t-flush-buffers-on-DISCONT.patch ---
>From 4422d5369e2831003d721f2ccd30410b1efbdf36 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Fri, 20 Apr 2012 16:16:25 +0200
Subject: [PATCH 12/12] ffdec: don't flush buffers on DISCONT

Don't flush the buffers that ffmpeg has on DISCONT but instead let it recover.
This gives a much better image in the case of packet loss.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=635020
---
 ext/ffmpeg/gstffmpegdec.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c
index 6ad266e..d0773aa 100644
--- a/ext/ffmpeg/gstffmpegdec.c
+++ b/ext/ffmpeg/gstffmpegdec.c
@@ -2560,15 +2560,15 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
   discont = GST_BUFFER_IS_DISCONT (inbuf);
 
   /* The discont flags marks a buffer that is not continuous with the previous
-   * buffer. This means we need to clear whatever data we currently have. We
-   * currently also wait for a new keyframe, which might be suboptimal in the
-   * case of a network error, better show the errors than to drop all data.. */
+   * buffer. This means we need to clear whatever data we currently have. We let
+   * ffmpeg continue with the data that it has. We currently drain the old
+   * frames that might be inside the decoder and we clear any partial data in
+   * the pcache, we might be able to remove the drain and flush too. */
   if (G_UNLIKELY (discont)) {
     GST_DEBUG_OBJECT (ffmpegdec, "received DISCONT");
     /* drain what we have queued */
     gst_ffmpegdec_drain (ffmpegdec);
     gst_ffmpegdec_flush_pcache (ffmpegdec);
-    avcodec_flush_buffers (ffmpegdec->context);
     ffmpegdec->discont = TRUE;
     gst_ffmpegdec_reset_ts (ffmpegdec);
   }
-- 
1.7.10.4



Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/.cvsignore,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- .cvsignore	29 Jan 2012 21:15:47 -0000	1.12
+++ .cvsignore	12 Jul 2012 14:07:05 -0000	1.13
@@ -1 +1,2 @@
 gst-ffmpeg-0.10.13.tar.bz2
+libav-0.8.3.tar.xz


Index: gstreamer-ffmpeg.spec
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/gstreamer-ffmpeg.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- gstreamer-ffmpeg.spec	28 Feb 2012 11:26:22 -0000	1.20
+++ gstreamer-ffmpeg.spec	12 Jul 2012 14:07:06 -0000	1.21
@@ -1,16 +1,30 @@
 Name:           gstreamer-ffmpeg
 Version:        0.10.13
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        GStreamer FFmpeg-based plug-ins
 Group:          Applications/Multimedia
 # the ffmpeg plugin is LGPL, the postproc plugin is GPL
 License:        GPLv2+ and LGPLv2+
 URL:            http://gstreamer.freedesktop.org/
-Source:         http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-%{version}.tar.bz2
+Source0:        http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-%{version}.tar.bz2
+# We drop in a newer libav to get all the security bugfixes from there!
+Source1:        http://libav.org/releases/libav-0.8.3.tar.xz
 Patch0:         gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch
+# Patches cherry picked from upstream for newer libav and bugfixes
+Patch1:         0001-configure.ac-Fix-for-new-libav.patch
+Patch2:         0002-gstffmpegutils-Fix-include.patch
+Patch3:         0003-gstffmpegdec-Re-enable-MT-decoding-by-default.patch
+Patch4:         0004-ffmpeg-fix-pad-template-ref-leaks.patch
+Patch5:         0005-ffmpegdec-Report-latency-if-B-frames-are-present.patch
+Patch6:         0006-ffmpeg-Channel-layouts-are-now-set-for-DTS-and-E-AC3.patch
+Patch7:         0007-ffmpegdemux-fix-caps-leak.patch
+Patch8:         0008-ffdec-Only-set-get_buffer-function-for-video.patch
+Patch9:         0009-codecmap-Add-mapping-for-Indeo-4-video-codec.patch
+Patch10:        0010-ffmpegdec-Use-auto-threads-if-available-and-only-sli.patch
+Patch11:        0011-ffmux-Use-correct-enum-type-for-return-value.patch
+Patch12:        0012-ffdec-don-t-flush-buffers-on-DISCONT.patch
 BuildRequires:  gstreamer-devel >= 0.10.0
 BuildRequires:  gstreamer-plugins-base-devel >= 0.10.0
-BuildRequires:  ffmpeg-devel >= 0.8.8
 BuildRequires:  orc-devel bzip2-devel
 
 %description
@@ -25,15 +39,31 @@
 
 
 %prep
-%setup -q -n gst-ffmpeg-%{version}
+%setup -q -n gst-ffmpeg-%{version} -a 1
+rm -r gst-libs/ext/libav
+mv libav-0.8.3 gst-libs/ext/libav
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
 
 
 %build
+# Note no --with-system-ffmpeg *for now*, as gst-ffmpeg wants libav-0.8,
+# and the system ffmpeg is 0.11, which is more or less libav-0.9
 %configure --disable-dependency-tracking --disable-static \
   --with-package-name="gst-plugins-ffmpeg rpmfusion rpm" \
   --with-package-origin="http://rpmfusion.org/" \
-  --with-system-ffmpeg
+  --with-ffmpeg-extra-configure=--enable-runtime-cpudetect
 make %{?_smp_mflags}
 
 
@@ -50,6 +80,14 @@
 
 
 %changelog
+* Thu Jul 12 2012 Hans de Goede <j.w.r.degoede at gmail.com> - 0.10.13-3
+- Switch to the build in libav for now, gst-ffmpeg wants libav-0.8,
+  and the system ffmpeg is 0.11, which is more or less the unreleased
+  libav-0.9. Once libav-0.9 gets officially released gst-ffmpeg will
+  hopefully switch to it
+- Upgrade the buildin libav to 0.8.3 to get all the security fixes from
+  upstream libav
+
 * Tue Feb 28 2012 Nicolas Chauvet <kwizart at gmail.com> - 0.10.13-2
 - Rebuilt for x264/FFmpeg
 


Index: sources
===================================================================
RCS file: /cvs/free/rpms/gstreamer-ffmpeg/devel/sources,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- sources	29 Jan 2012 21:15:47 -0000	1.12
+++ sources	12 Jul 2012 14:07:06 -0000	1.13
@@ -1 +1,2 @@
 7f5beacaf1312db2db30a026b36888c4  gst-ffmpeg-0.10.13.tar.bz2
+a15280a6a5d1cbc2dac392d22680c257  libav-0.8.3.tar.xz


More information about the rpmfusion-commits mailing list