rpms/gstreamer-plugins-base/F-12 gstpb-fix-missing-plugins.patch, 1.1, 1.2

Bastien Nocera hadess at fedoraproject.org
Tue Oct 13 15:31:11 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/gstreamer-plugins-base/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2572

Modified Files:
	gstpb-fix-missing-plugins.patch 
Log Message:
Fix missing plugins patch

gstpb-fix-missing-plugins.patch:
 b/gst/playback/gstdecodebin2.c   |   13 
 b/gst/playback/gstfactorylists.c |   10 
 b/gst/playback/gsturidecodebin.c |    7 
 gst/playback/gstdecodebin2.c     | 1851 ++++++++++++++++++++-------------------
 4 files changed, 997 insertions(+), 884 deletions(-)

Index: gstpb-fix-missing-plugins.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-base/F-12/gstpb-fix-missing-plugins.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- gstpb-fix-missing-plugins.patch	13 Oct 2009 15:17:09 -0000	1.1
+++ gstpb-fix-missing-plugins.patch	13 Oct 2009 15:31:10 -0000	1.2
@@ -1,17 +1,213 @@
-commit cf9c6a2271ad35e422c8fba6af842e3ea309d82d
-Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
-Date:   Sat Sep 26 12:17:49 2009 +0200
-
-    decodebin2: Rewrite autoplugging and how groups of pads are exposed
-    
-    This now keeps track of everything that is going on, creates
-    a tree of chains and groups to allow "demuxer after demuxer" scenarios
-    and allows chained Oggs with multiple streams (needs oggdemux or playbin2 fixes).
-    
-    Also document everything in detail and give a general overview of what
-    decodebin2 is doing at the top of the sources.
-    
-    Fixes bug #596183, #563828 and #591677.
+From 881e4aa606ac184e4da485a88066ff30e88fc5cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Sat, 26 Sep 2009 12:04:55 +0200
+Subject: [PATCH 1/7] decodebin2: Only use the object lock for protecting the subtitle elements
+
+Using the decodebin lock will result in deadlocks if the subtitle encoding
+is accessed from a pad-added handler.
+---
+ gst/playback/gstdecodebin2.c |   12 +++++-------
+ 1 files changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
+index 3b60ae9..1ad7968 100644
+--- a/gst/playback/gstdecodebin2.c
++++ b/gst/playback/gstdecodebin2.c
+@@ -857,18 +857,16 @@ gst_decode_bin_set_subs_encoding (GstDecodeBin * dbin, const gchar * encoding)
+ 
+   GST_DEBUG_OBJECT (dbin, "Setting new encoding: %s", GST_STR_NULL (encoding));
+ 
+-  DECODE_BIN_LOCK (dbin);
+   GST_OBJECT_LOCK (dbin);
+   g_free (dbin->encoding);
+   dbin->encoding = g_strdup (encoding);
+-  GST_OBJECT_UNLOCK (dbin);
+ 
+   /* set the subtitle encoding on all added elements */
+   for (walk = dbin->subtitles; walk; walk = g_list_next (walk)) {
+     g_object_set (G_OBJECT (walk->data), "subtitle-encoding", dbin->encoding,
+         NULL);
+   }
+-  DECODE_BIN_UNLOCK (dbin);
++  GST_OBJECT_UNLOCK (dbin);
+ }
+ 
+ static gchar *
+@@ -1319,11 +1317,11 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad,
+       continue;
+     }
+     if (subtitle) {
+-      DECODE_BIN_LOCK (dbin);
++      GST_OBJECT_LOCK (dbin);
+       /* we added the element now, add it to the list of subtitle-encoding
+        * elements when we can set the property */
+       dbin->subtitles = g_list_prepend (dbin->subtitles, element);
+-      DECODE_BIN_UNLOCK (dbin);
++      GST_OBJECT_UNLOCK (dbin);
+     }
+ 
+     res = TRUE;
+@@ -2364,10 +2362,10 @@ restart:
+ 
+ done:
+   gst_element_set_state (element, GST_STATE_NULL);
+-  DECODE_BIN_LOCK (dbin);
++  GST_OBJECT_LOCK (dbin);
+   /* remove possible subtitle element */
+   dbin->subtitles = g_list_remove (dbin->subtitles, element);
+-  DECODE_BIN_UNLOCK (dbin);
++  GST_OBJECT_UNLOCK (dbin);
+   gst_bin_remove (GST_BIN (dbin), element);
+ 
+ beach:
+-- 
+1.6.4.3
+
+From a7fe6e683ae91caa9445d899964553a2610fba17 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Sat, 26 Sep 2009 12:10:21 +0200
+Subject: [PATCH 2/7] decodebin2: Don't set the external ghostpads blocked but only their targets
+
+Pad blocks should never be done on external pads as outside elements
+might want to use their own pad blocks on them and this will lead to
+conflicts and deadlocks.
+---
+ gst/playback/gstdecodebin2.c |   23 ++++++++++++++++++-----
+ 1 files changed, 18 insertions(+), 5 deletions(-)
+
+diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
+index 1ad7968..24e251b 100644
+--- a/gst/playback/gstdecodebin2.c
++++ b/gst/playback/gstdecodebin2.c
+@@ -2484,7 +2484,7 @@ gst_decode_pad_init (GstDecodePad * pad)
+ }
+ 
+ static void
+-source_pad_blocked_cb (GstDecodePad * dpad, gboolean blocked, gpointer unused)
++source_pad_blocked_cb (GstPad * opad, gboolean blocked, GstDecodePad * dpad)
+ {
+   GstDecodeGroup *group;
+   GstDecodeBin *dbin;
+@@ -2531,10 +2531,16 @@ static void
+ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
+ {
+   GstDecodeBin *dbin = dpad->dbin;
++  GstPad *opad;
+ 
+   DECODE_BIN_DYN_LOCK (dbin);
+-  gst_pad_set_blocked_async (GST_PAD (dpad), blocked,
+-      (GstPadBlockCallback) source_pad_blocked_cb, NULL);
++  opad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (dpad));
++  if (!opad)
++    goto out;
++
++  gst_pad_set_blocked_async_full (opad, blocked,
++      (GstPadBlockCallback) source_pad_blocked_cb, gst_object_ref (dpad),
++      (GDestroyNotify) gst_object_unref);
+   if (blocked) {
+     if (dbin->shutdown) {
+       /* deactivate to force flushing state to prevent NOT_LINKED errors */
+@@ -2548,6 +2554,8 @@ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
+       gst_object_unref (dpad);
+     dbin->blocked_pads = g_list_remove (dbin->blocked_pads, dpad);
+   }
++  gst_object_unref (opad);
++out:
+   DECODE_BIN_DYN_UNLOCK (dbin);
+ }
+ 
+@@ -2659,15 +2667,20 @@ unblock_pads (GstDecodeBin * dbin)
+ 
+   for (tmp = dbin->blocked_pads; tmp; tmp = next) {
+     GstDecodePad *dpad = (GstDecodePad *) tmp->data;
++    GstPad *opad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (dpad));
+ 
+     next = g_list_next (tmp);
++    if (!opad)
++      continue;
+ 
+     GST_DEBUG_OBJECT (dpad, "unblocking");
+-    gst_pad_set_blocked_async (GST_PAD (dpad), FALSE,
+-        (GstPadBlockCallback) source_pad_blocked_cb, NULL);
++    gst_pad_set_blocked_async_full (opad, FALSE,
++        (GstPadBlockCallback) source_pad_blocked_cb, gst_object_ref (dpad),
++        (GDestroyNotify) gst_object_unref);
+     /* make flushing, prevent NOT_LINKED */
+     GST_PAD_SET_FLUSHING (GST_PAD (dpad));
+     gst_object_unref (dpad);
++    gst_object_unref (opad);
+     GST_DEBUG_OBJECT (dpad, "unblocked");
+   }
+ 
+-- 
+1.6.4.3
+
+From 10cb19bcda3082435d57518666076a69e51a1bba Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Thu, 24 Sep 2009 16:05:58 +0200
+Subject: [PATCH 3/7] factorylist: Use gst_caps_can_intersect() instead of _intersect()
+
+This is faster and results in less allocations.
+---
+ gst/playback/gstfactorylists.c |    9 +++------
+ 1 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/gst/playback/gstfactorylists.c b/gst/playback/gstfactorylists.c
+index 7099927..df1916f 100644
+--- a/gst/playback/gstfactorylists.c
++++ b/gst/playback/gstfactorylists.c
+@@ -240,7 +240,6 @@ gst_factory_list_filter (GValueArray * array, const GstCaps * caps)
+ 
+       /* we only care about the sink templates */
+       if (templ->direction == GST_PAD_SINK) {
+-        GstCaps *intersect;
+         GstCaps *tmpl_caps;
+ 
+         /* try to intersect the caps with the caps of the template */
+@@ -248,21 +247,19 @@ gst_factory_list_filter (GValueArray * array, const GstCaps * caps)
+ 
+         /* FIXME, intersect is not the right method, we ideally want to check
+          * for a subset here */
+-        intersect = gst_caps_intersect (caps, tmpl_caps);
+-        gst_caps_unref (tmpl_caps);
+ 
+         /* check if the intersection is empty */
+-        if (!gst_caps_is_empty (intersect)) {
++        if (gst_caps_can_intersect (caps, tmpl_caps)) {
+           /* non empty intersection, we can use this element */
+           GValue resval = { 0, };
+           g_value_init (&resval, G_TYPE_OBJECT);
+           g_value_set_object (&resval, factory);
+           g_value_array_append (result, &resval);
+           g_value_unset (&resval);
+-          gst_caps_unref (intersect);
++          gst_caps_unref (tmpl_caps);
+           break;
+         }
+-        gst_caps_unref (intersect);
++        gst_caps_unref (tmpl_caps);
+       }
+     }
+   }
+-- 
+1.6.4.3
+
+From 39bc12ee20437b352a13361ba48dcc886fce35a2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Sat, 26 Sep 2009 12:17:49 +0200
+Subject: [PATCH 4/7] decodebin2: Rewrite autoplugging and how groups of pads are exposed
+
+This now keeps track of everything that is going on, creates
+a tree of chains and groups to allow "demuxer after demuxer" scenarios
+and allows chained Oggs with multiple streams (needs oggdemux or playbin2 fixes).
+
+Also document everything in detail and give a general overview of what
+decodebin2 is doing at the top of the sources.
+
+Fixes bug #596183, #563828 and #591677.
+---
+ gst/playback/gstdecodebin2.c | 1782 ++++++++++++++++++++++--------------------
+ 1 files changed, 946 insertions(+), 836 deletions(-)
 
 diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
 index 24e251b..1d6c9d2 100644
@@ -2487,3 +2683,171 @@ index 24e251b..1d6c9d2 100644
      default:
        break;
    }
+-- 
+1.6.4.3
+
+From 5ee4ee1682cff7ca44897fec0dcee6374cd6636d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Thu, 24 Sep 2009 14:56:48 +0200
+Subject: [PATCH 5/7] uridecodebin: Don't post missing plugin messages twice
+
+decodebin2 already posts them after emitting the unknown-type signal,
+there's no need to post another one.
+---
+ gst/playback/gsturidecodebin.c |    6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c
+index 0e0bb74..6420414 100644
+--- a/gst/playback/gsturidecodebin.c
++++ b/gst/playback/gsturidecodebin.c
+@@ -33,8 +33,6 @@
+ #include <gst/gst.h>
+ #include <gst/gst-i18n-plugin.h>
+ 
+-#include <gst/pbutils/missing-plugins.h>
+-
+ #include "gstfactorylists.h"
+ #include "gstplay-marshal.h"
+ #include "gstplay-enum.h"
+@@ -622,12 +620,8 @@ static void
+ unknown_type_cb (GstElement * element, GstPad * pad, GstCaps * caps,
+     GstURIDecodeBin * decoder)
+ {
+-  GstMessage *msg;
+   gchar *capsstr;
+ 
+-  msg = gst_missing_decoder_message_new (GST_ELEMENT_CAST (decoder), caps);
+-  gst_element_post_message (GST_ELEMENT_CAST (decoder), msg);
+-
+   capsstr = gst_caps_to_string (caps);
+   GST_ELEMENT_WARNING (decoder, CORE, MISSING_PLUGIN,
+       (_("No decoder available for type \'%s\'."), capsstr), (NULL));
+-- 
+1.6.4.3
+
+From 4a7f2e6c102eeefa7da8e7c9c2eec3c0019bba01 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Sat, 26 Sep 2009 12:47:53 +0200
+Subject: [PATCH 6/7] decodebin2: Use the iterate internal links function instead of string magic to get multiqueue srcpads
+
+---
+ gst/playback/gstdecodebin2.c |   31 +++++++++++++++++--------------
+ 1 files changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
+index 1d6c9d2..4fe62b4 100644
+--- a/gst/playback/gstdecodebin2.c
++++ b/gst/playback/gstdecodebin2.c
+@@ -2108,7 +2108,7 @@ gst_decode_group_control_demuxer_pad (GstDecodeGroup * group, GstPad * pad)
+ {
+   GstDecodeBin *dbin;
+   GstPad *srcpad, *sinkpad;
+-  gchar *nb, *sinkname, *srcname;
++  GstIterator *it = NULL;
+ 
+   dbin = group->dbin;
+ 
+@@ -2126,29 +2126,32 @@ gst_decode_group_control_demuxer_pad (GstDecodeGroup * group, GstPad * pad)
+ 
+   if ((gst_pad_link (pad, sinkpad) != GST_PAD_LINK_OK)) {
+     GST_ERROR_OBJECT (dbin, "Couldn't link demuxer and multiqueue");
+-    goto beach;
++    goto error;
+   }
+ 
+-  CHAIN_MUTEX_LOCK (group->parent);
+-  group->reqpads = g_list_prepend (group->reqpads, gst_object_ref (sinkpad));
+-
+-  sinkname = gst_pad_get_name (sinkpad);
+-  nb = sinkname + 4;
+-  srcname = g_strdup_printf ("src%s", nb);
+-  g_free (sinkname);
++  it = gst_pad_iterate_internal_links (sinkpad);
+ 
+-  if (!(srcpad = gst_element_get_static_pad (group->multiqueue, srcname))) {
+-    GST_ERROR_OBJECT (dbin, "Couldn't get srcpad %s from multiqueue", srcname);
+-    goto chiringuito;
++  if (!it || (gst_iterator_next (it, (gpointer *) & srcpad)) != GST_ITERATOR_OK
++      || srcpad == NULL) {
++    GST_ERROR_OBJECT (dbin,
++        "Couldn't get srcpad from multiqueue for sinkpad %" GST_PTR_FORMAT,
++        sinkpad);
++    goto error;
+   }
+ 
+-chiringuito:
+-  g_free (srcname);
++  CHAIN_MUTEX_LOCK (group->parent);
++  group->reqpads = g_list_prepend (group->reqpads, gst_object_ref (sinkpad));
+   CHAIN_MUTEX_UNLOCK (group->parent);
+ 
+ beach:
++  if (it)
++    gst_iterator_free (it);
+   gst_object_unref (sinkpad);
+   return srcpad;
++
++error:
++  gst_element_release_request_pad (group->multiqueue, sinkpad);
++  goto beach;
+ }
+ 
+ /* gst_decode_group_is_complete:
+-- 
+1.6.4.3
+
+From 68cef57e9260265229d194f1309cdffd654c95b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian.droege at collabora.co.uk>
+Date: Sat, 26 Sep 2009 12:56:36 +0200
+Subject: [PATCH 7/7] decodebin2: Chains with an exposed endpad are complete too
+
+This allows partial group changes, i.e. demuxer2 in the example below
+goes EOS but has a next group and audio2 stays the same.
+
+          /-- >demuxer2---->video
+demuxer---             \--->audio1
+          \--->audio2
+---
+ gst/playback/gstdecodebin2.c |   11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/gst/playback/gstdecodebin2.c b/gst/playback/gstdecodebin2.c
+index 4fe62b4..60dbf57 100644
+--- a/gst/playback/gstdecodebin2.c
++++ b/gst/playback/gstdecodebin2.c
+@@ -2191,7 +2191,7 @@ out:
+  *
+  * Returns TRUE if the chain is complete, this means either
+  * a) This chain is a dead end, i.e. we have no suitable plugins
+- * b) This chain ends in an endpad and this is blocked
++ * b) This chain ends in an endpad and this is blocked or exposed
+  *
+  * Not MT-safe, always call with decodebin expose lock
+  */
+@@ -2200,7 +2200,12 @@ gst_decode_chain_is_complete (GstDecodeChain * chain)
+ {
+   gboolean complete = FALSE;
+ 
+-  if (chain->deadend || (chain->endpad && chain->endpad->blocked)) {
++  if (chain->deadend) {
++    complete = TRUE;
++    goto out;
++  }
++
++  if (chain->endpad && (chain->endpad->blocked || chain->endpad->exposed)) {
+     complete = TRUE;
+     goto out;
+   }
+@@ -2543,7 +2548,7 @@ gst_decode_chain_expose (GstDecodeChain * chain, GList ** endpads)
+     return TRUE;
+ 
+   if (chain->endpad) {
+-    if (!chain->endpad->blocked)
++    if (!chain->endpad->blocked && !chain->endpad->exposed)
+       return FALSE;
+     *endpads = g_list_prepend (*endpads, gst_object_ref (chain->endpad));
+     return TRUE;
+-- 
+1.6.4.3
+




More information about the fedora-extras-commits mailing list