ext/vorbis/vorbisdec.c (vorbis_handle_comment_packet): Post a message to the bus with the tags. Still not sent downst...

Original commit message from CVS:
* ext/vorbis/vorbisdec.c (vorbis_handle_comment_packet): Post a
message to the bus with the tags. Still not sent downstream tho.

* gst/playback/gstdecodebin.c (remove_element_chain): Unref after
get_parent.
(remove_element_chain): Use OBJECT_PARENT instead of get_parent to
avoid refcounting hassles.
This commit is contained in:
Andy Wingo 2005-05-11 03:20:15 +00:00
parent a214f5bf7b
commit 3aacd7982e
3 changed files with 28 additions and 9 deletions

View file

@ -1,3 +1,13 @@
2005-05-10 Andy Wingo <wingo@pobox.com>
* ext/vorbis/vorbisdec.c (vorbis_handle_comment_packet): Post a
message to the bus with the tags. Still not sent downstream tho.
* gst/playback/gstdecodebin.c (remove_element_chain): Unref after
get_parent.
(remove_element_chain): Use OBJECT_PARENT instead of get_parent to
avoid refcounting hassles.
2005-05-09 Andy Wingo <wingo@pobox.com>
* gst/volume/Makefile.am:

View file

@ -442,6 +442,7 @@ static GstFlowReturn
vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
{
gchar *encoder = NULL;
GstMessage *message;
GstTagList *list;
GstBuffer *buf;
@ -479,7 +480,8 @@ vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_MINIMUM_BITRATE, (guint) vd->vi.bitrate_lower, NULL);
//gst_element_found_tags_for_pad (GST_ELEMENT (vd), vd->srcpad, 0, list);
message = gst_message_new_tag ((GstObject *) vd, list);
gst_element_post_message (GST_ELEMENT (vd), message);
return GST_FLOW_OK;
}

View file

@ -671,9 +671,11 @@ get_our_ghost_pad (GstDecodeBin * decode_bin, GstPad * pad)
if (parent == GST_ELEMENT (decode_bin)) {
GST_DEBUG_OBJECT (decode_bin, "pad is our ghostpad");
gst_object_unref (GST_OBJECT_CAST (parent));
return pad;
} else {
GST_DEBUG_OBJECT (decode_bin, "pad is ghostpad but not ours");
gst_object_unref (GST_OBJECT_CAST (parent));
return NULL;
}
}
@ -702,7 +704,7 @@ static void
remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad)
{
GList *int_links;
GstElement *elem = gst_pad_get_parent (pad);
GstElement *elem = GST_ELEMENT (GST_OBJECT_PARENT (pad));
while (GST_OBJECT_PARENT (elem) &&
GST_OBJECT_PARENT (elem) != GST_OBJECT (decode_bin))
@ -743,13 +745,18 @@ remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad)
GST_DEBUG_OBJECT (decode_bin, "internal pad %s:%s linked to pad %s:%s",
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (peer));
if (gst_pad_get_real_parent (peer) != GST_ELEMENT (decode_bin)) {
GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s",
GST_DEBUG_PAD_NAME (peer));
} else {
GST_DEBUG_OBJECT (decode_bin, "recursing element %s on pad %s:%s",
gst_element_get_name (elem), GST_DEBUG_PAD_NAME (pad));
remove_element_chain (decode_bin, peer);
{
GstElement *parent = gst_pad_get_real_parent (peer);
if (parent != GST_ELEMENT (decode_bin)) {
GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s",
GST_DEBUG_PAD_NAME (peer));
} else {
GST_DEBUG_OBJECT (decode_bin, "recursing element %s on pad %s:%s",
gst_element_get_name (elem), GST_DEBUG_PAD_NAME (pad));
remove_element_chain (decode_bin, peer);
}
gst_object_unref (GST_OBJECT_CAST (parent));
}
}
GST_DEBUG_OBJECT (decode_bin, "removing %s", gst_element_get_name (elem));