+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:
vorbis_handle_comment_packet (GstVorbisDec * vd, ogg_packet * packet)
{
gchar *encoder = NULL;
+ GstMessage *message;
GstTagList *list;
GstBuffer *buf;
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;
}
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;
}
}
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))
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));