diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-07-26 15:48:47 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-07-26 15:48:47 +0000 |
commit | 9fa21084bf1e1e5396cc215f519253e582650873 (patch) | |
tree | 926185ccbd0c4f491131fd2701cee1523c286352 | |
parent | fa9c47f14d6b5ff16150854c5718a7c5f34fd0dc (diff) |
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.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | gst/rtsp/gstrtspext.c | 10 | ||||
-rw-r--r-- | gst/rtsp/gstrtspext.h | 2 | ||||
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 2 |
4 files changed, 19 insertions, 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: diff --git a/gst/rtsp/gstrtspext.c b/gst/rtsp/gstrtspext.c index 505a6197..b9d71bb1 100644 --- a/gst/rtsp/gstrtspext.c +++ b/gst/rtsp/gstrtspext.c @@ -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; } diff --git a/gst/rtsp/gstrtspext.h b/gst/rtsp/gstrtspext.h index dae5e531..e0b198c0 100644 --- a/gst/rtsp/gstrtspext.h +++ b/gst/rtsp/gstrtspext.h @@ -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 diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index fcc87e4d..8a0de7bd 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -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; |