From 12c87a2f3998808a46da034dd9feb48810c3631a Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 2 Jun 2005 11:21:48 +0000 Subject: [PATCH] pkgconfig/: Add gst/tag to the -L list. Original commit message from CVS: 2005-06-02 Andy Wingo * pkgconfig/gstreamer-libs-uninstalled.pc.in (prefix): * pkgconfig/gstreamer-libs.pc.in (prefix): Add gst/tag to the -L list. * gst/playback/gstdecodebin.c (gst_decode_bin_dispose): Don't remove the typefind, the bin dispose will do it for us. When it's removed and unreffed, the signal handler will be disconnected, too. (unlinked): It's too difficult to disconnect from unlinked handlers, as they are on pads not elements. Just punt if the pads aren't grandkids of the bin. --- ChangeLog | 14 ++++++++++++++ gst/playback/gstdecodebin.c | 30 +++++++++++++++++++++++------- pkgconfig/gstreamer-libs-uninstalled.pc.in | 2 +- pkgconfig/gstreamer-libs.pc.in | 2 +- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ebb44a..ff106dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-06-02 Andy Wingo + + * pkgconfig/gstreamer-libs-uninstalled.pc.in (prefix): + * pkgconfig/gstreamer-libs.pc.in (prefix): Add gst/tag to the -L + list. + + * gst/playback/gstdecodebin.c (gst_decode_bin_dispose): Don't + remove the typefind, the bin dispose will do it for us. When it's + removed and unreffed, the signal handler will be disconnected, + too. + (unlinked): It's too difficult to disconnect from unlinked + handlers, as they are on pads not elements. Just punt if the pads + aren't grandkids of the bin. + 2005-06-02 Wim Taymans * ext/ogg/README: diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 26f3d06..9e473b3 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -343,11 +343,6 @@ gst_decode_bin_dispose (GObject * object) decode_bin = GST_DECODE_BIN (object); - g_signal_handler_disconnect (G_OBJECT (decode_bin->typefind), - decode_bin->have_type_id); - - gst_bin_remove (GST_BIN (decode_bin), decode_bin->typefind); - g_list_free (decode_bin->factories); for (dyns = decode_bin->dynamics; dyns; dyns = g_list_next (dyns)) { @@ -815,21 +810,41 @@ no_more_pads (GstElement * element, GstDynamic * dynamic) } } +static gboolean +is_our_kid (GstElement * e, GstDecodeBin * decode_bin) +{ + gboolean ret; + GstElement *parent; + + parent = (GstElement *) gst_object_get_parent ((GstObject *) e); + ret = (parent == (GstElement *) decode_bin); + + if (parent) + gst_object_unref ((GstObject *) parent); + + return ret; +} + /* This function will be called when a pad is disconnected for some reason */ static void unlinked (GstPad * pad, GstPad * peerpad, GstDecodeBin * decode_bin) { GstDynamic *dyn; - GstElement *element; + GstElement *element, *peer; /* inactivate pad */ gst_pad_set_active (pad, GST_ACTIVATE_NONE); + element = gst_pad_get_parent (pad); + peer = gst_pad_get_parent (peerpad); + + if (!is_our_kid (peer, decode_bin)) + goto exit; + /* remove all elements linked to the peerpad */ remove_element_chain (decode_bin, peerpad); /* if an element removes two pads, then we don't want this twice */ - element = gst_pad_get_parent (pad); if (g_list_find (decode_bin->dynamics, element) != NULL) goto exit; @@ -841,6 +856,7 @@ unlinked (GstPad * pad, GstPad * peerpad, GstDecodeBin * decode_bin) exit: gst_object_unref (GST_OBJECT (element)); + gst_object_unref (GST_OBJECT (peer)); } /* this function inspects the given element and tries to connect something diff --git a/pkgconfig/gstreamer-libs-uninstalled.pc.in b/pkgconfig/gstreamer-libs-uninstalled.pc.in index 78eaf98..1251407 100644 --- a/pkgconfig/gstreamer-libs-uninstalled.pc.in +++ b/pkgconfig/gstreamer-libs-uninstalled.pc.in @@ -8,5 +8,5 @@ Description: Streaming-media framework media-specific libraries, not installed Version: @VERSION@ Requires: gstreamer-@GST_MAJORMINOR@ -Libs: -L${libdir}/audio -L${libdir}/video +Libs: -L${libdir}/audio -L${libdir}/video -L${libdir}/tag Cflags: -I${includedir} diff --git a/pkgconfig/gstreamer-libs.pc.in b/pkgconfig/gstreamer-libs.pc.in index 0bbc92c..07988c1 100644 --- a/pkgconfig/gstreamer-libs.pc.in +++ b/pkgconfig/gstreamer-libs.pc.in @@ -7,5 +7,5 @@ Name: GStreamer Plugin Libraries Description: Streaming-media framework, plugin libraries Requires: gstreamer-@GST_MAJORMINOR@ Version: @VERSION@ -Libs: -L${libdir}/audio -L${libdir}/video +Libs: -L${libdir}/audio -L${libdir}/video -L${libdir}/tag Cflags: -I${includedir} -- 2.7.4