mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
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.
This commit is contained in:
parent
fa9c47f14d
commit
9fa21084bf
4 changed files with 19 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue