From: <wt...@ke...> - 2007-01-10 16:08:35
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: wtay Date: Wed Jan 10 2007 16:08:30 UTC Log message: * gst/playback/gstdecodebin.c: (dynamic_add), (close_pad_link), (is_demuxer_element), (new_caps): * gst/playback/gstplaybasebin.c: (source_new_pad): Fix the case where we try to ref a NULL element when we delay a link because of unfixed caps. Set the state of autoplugged decodebins to PAUSED. RTSP now works in playbin, we can remove it from the blacklist. Modified files: . : ChangeLog gst/playback : gstdecodebin.c gstplaybasebin.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.3078&r2=1.3079 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstdecodebin.c.diff?r1=1.89&r2=1.90 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c.diff?r1=1.133&r2=1.134 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.3078 retrieving revision 1.3079 diff -u -d -r1.3078 -r1.3079 --- ChangeLog 9 Jan 2007 14:33:24 -0000 1.3078 +++ ChangeLog 10 Jan 2007 16:08:18 -0000 1.3079 @@ -1,3 +1,13 @@ +2007-01-10 Wim Taymans <wi...@fl...> + + * gst/playback/gstdecodebin.c: (dynamic_add), (close_pad_link), + (is_demuxer_element), (new_caps): + * gst/playback/gstplaybasebin.c: (source_new_pad): + Fix the case where we try to ref a NULL element when we delay a link + because of unfixed caps. + Set the state of autoplugged decodebins to PAUSED. + RTSP now works in playbin, we can remove it from the blacklist. 2007-01-09 Tim-Philipp Müller <tim at centricular dot net> * gst/playback/Makefile.am: Index: gstdecodebin.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstdecodebin.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- gstdecodebin.c 16 Dec 2006 13:59:09 -0000 1.89 +++ gstdecodebin.c 10 Jan 2007 16:08:18 -0000 1.90 @@ -409,7 +409,7 @@ struct DynFind find_info; GList *found; - g_return_if_fail (element != NULL || pad != NULL); + g_return_if_fail (element != NULL); /* do a search that this entry doesn't already exist */ find_info.elem = element; @@ -421,25 +421,21 @@ /* take refs */ dyn = g_new0 (GstDynamic, 1); - dyn->element = element; - dyn->pad = pad; + dyn->element = gst_object_ref (element); dyn->decode_bin = gst_object_ref (decode_bin); - if (element) { + if (pad) { + dyn->pad = gst_object_ref (pad); + GST_DEBUG_OBJECT (decode_bin, "dynamic create for pad %" GST_PTR_FORMAT, + pad); + dyn->caps_sig_id = g_signal_connect (G_OBJECT (pad), "notify::caps", + G_CALLBACK (new_caps), dyn); + } else { GST_DEBUG_OBJECT (decode_bin, "dynamic create for element %" GST_PTR_FORMAT, element); - - gst_object_ref (element); dyn->np_sig_id = g_signal_connect (G_OBJECT (element), "pad-added", G_CALLBACK (new_pad), dyn); dyn->nmp_sig_id = g_signal_connect (G_OBJECT (element), "no-more-pads", G_CALLBACK (no_more_pads), dyn); - } else { - GST_DEBUG_OBJECT (decode_bin, "dynamic create for pad %" GST_PTR_FORMAT, - pad); - gst_object_ref (pad); - dyn->caps_sig_id = g_signal_connect (G_OBJECT (pad), "notify::caps", - G_CALLBACK (new_caps), dyn); } /* and add this element to the dynamic elements */ @@ -794,7 +790,7 @@ setup_caps_delay: { GST_LOG_OBJECT (pad, "setting up a delayed link"); - dynamic_add (NULL, pad, decode_bin); + dynamic_add (element, pad, decode_bin); return; } @@ -814,7 +810,7 @@ klass = gst_element_factory_get_klass (srcfactory); /* Can't be a demuxer unless it has Demux in the klass name */ - if (!strstr (klass, "Demux")) + if (klass == NULL || !strstr (klass, "Demux")) return FALSE; /* Walk the src pad templates and count how many the element @@ -1311,7 +1307,7 @@ static void new_caps (GstPad * pad, GParamSpec * unused, GstDynamic * dynamic) { - GST_DEBUG_OBJECT (dynamic->decode_bin, "delayed link triggered\n"); + GST_DEBUG_OBJECT (dynamic->decode_bin, "delayed link triggered"); new_pad (dynamic->element, pad, dynamic); Index: gstplaybasebin.c RCS file: /cvs/gstreamer/gst-plugins-base/gst/playback/gstplaybasebin.c,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- gstplaybasebin.c 9 Jan 2007 14:33:24 -0000 1.133 +++ gstplaybasebin.c 10 Jan 2007 16:08:18 -0000 1.134 @@ -1451,7 +1451,7 @@ }; /* blacklisted URIs, we know they will always fail. */ -static const gchar *blacklisted_uris[] = { "rtsp://", NULL }; +static const gchar *blacklisted_uris[] = { NULL }; /* mime types that we don't consider to be media types */ static const gchar *no_media_mimes[] = { @@ -1580,6 +1580,8 @@ if (!gst_element_link (bin->source, decoder)) goto could_not_link; + gst_element_set_state (decoder, GST_STATE_PAUSED); return; /* ERRORS */ |