Commit 9fa21084 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst/rtsp/: Use rank to filter out extensions.

Original commit message from CVS:
* 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.
parent fa9c47f1
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:
......
......@@ -51,6 +51,7 @@ static gboolean
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))
......@@ -61,6 +62,11 @@ gst_rtsp_ext_list_filter (GstPluginFeature * feature, gpointer user_data)
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;
}
......@@ -202,7 +208,7 @@ gst_rtsp_ext_list_get_transports (GstRTSPExtensionList * ext,
}
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;
......@@ -210,7 +216,7 @@ gst_rtsp_ext_list_stream_select (GstRTSPExtensionList * ext)
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;
}
......@@ -70,7 +70,7 @@ GstRTSPResult gst_rtsp_ext_list_setup_media (GstRTSPExtensionList *ext, Gs
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
......
......@@ -3305,7 +3305,7 @@ gst_rtspsrc_setup_streams (GstRTSPSrc * src)
}
}
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment