+2007-07-26 Wim Taymans <wim.taymans@gmail.com>
+
+ * gst/rtsp/gstrtspext.c: (gst_rtsp_ext_list_filter),
+ (gst_rtsp_ext_list_stream_select):
+ * gst/rtsp/gstrtspext.h:
+ * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_streams):
+ Use rank to filter out extensions.
+ Add url to stream_select interface call.
+
2007-07-25 Wim Taymans <wim.taymans@gmail.com>
* gst/rtsp/Makefile.am:
gst_rtsp_ext_list_filter (GstPluginFeature * feature, gpointer user_data)
{
GstElementFactory *factory;
+ guint rank;
/* we only care about element factories */
if (!GST_IS_ELEMENT_FACTORY (feature))
if (!gst_element_factory_has_interface (factory, "GstRTSPExtension"))
return FALSE;
+ /* only select elements with autoplugging rank */
+ rank = gst_plugin_feature_get_rank (feature);
+ if (rank < GST_RANK_MARGINAL)
+ return FALSE;
+
return TRUE;
}
}
GstRTSPResult
-gst_rtsp_ext_list_stream_select (GstRTSPExtensionList * ext)
+gst_rtsp_ext_list_stream_select (GstRTSPExtensionList * ext, GstRTSPUrl * url)
{
GList *walk;
GstRTSPResult res = GST_RTSP_OK;
for (walk = ext->extensions; walk; walk = g_list_next (walk)) {
GstRTSPExtension *elem = (GstRTSPExtension *) walk->data;
- res = gst_rtsp_extension_stream_select (elem);
+ res = gst_rtsp_extension_stream_select (elem, url);
}
return res;
}
gboolean gst_rtsp_ext_list_configure_stream (GstRTSPExtensionList *ext, GstCaps *caps);
GstRTSPResult gst_rtsp_ext_list_get_transports (GstRTSPExtensionList *ext, GstRTSPLowerTrans protocols,
gchar **transport);
-GstRTSPResult gst_rtsp_ext_list_stream_select (GstRTSPExtensionList *ext);
+GstRTSPResult gst_rtsp_ext_list_stream_select (GstRTSPExtensionList *ext, GstRTSPUrl *url);
G_END_DECLS
}
}
- gst_rtsp_ext_list_stream_select (src->extensions);
+ gst_rtsp_ext_list_stream_select (src->extensions, src->url);
/* we need to activate the streams when we detect activity */
src->need_activate = TRUE;