From a8ee445da6ff59bbe89b67b5133f1e3aa574bae2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 27 Jul 2007 11:21:20 +0000 Subject: gst/rtsp/: Clean up the interface list. Original commit message from CVS: * gst/rtsp/gstrtspext.c: (gst_rtsp_ext_list_free), (gst_rtsp_ext_list_connect): * gst/rtsp/gstrtspext.h: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_send_cb): Clean up the interface list. Allow connecting to interface signals for the extensions. Remove old extension code. Free list on cleanup. Allow extensions to send additional RTSP messages. --- gst/rtsp/gstrtspext.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gst/rtsp/gstrtspext.c') diff --git a/gst/rtsp/gstrtspext.c b/gst/rtsp/gstrtspext.c index b9d71bb1..0ad81b56 100644 --- a/gst/rtsp/gstrtspext.c +++ b/gst/rtsp/gstrtspext.c @@ -105,6 +105,20 @@ gst_rtsp_ext_list_get (void) return result; } +void +gst_rtsp_ext_list_free (GstRTSPExtensionList * ext) +{ + GList *walk; + + for (walk = ext->extensions; walk; walk = g_list_next (walk)) { + GstRTSPExtension *elem = (GstRTSPExtension *) walk->data; + + gst_object_unref (GST_OBJECT_CAST (elem)); + } + g_list_free (ext->extensions); + g_free (ext); +} + gboolean gst_rtsp_ext_list_detect_server (GstRTSPExtensionList * ext, GstRTSPMessage * resp) @@ -220,3 +234,16 @@ gst_rtsp_ext_list_stream_select (GstRTSPExtensionList * ext, GstRTSPUrl * url) } return res; } + +void +gst_rtsp_ext_list_connect (GstRTSPExtensionList * ext, + const gchar * detailed_signal, GCallback c_handler, gpointer data) +{ + GList *walk; + + for (walk = ext->extensions; walk; walk = g_list_next (walk)) { + GstRTSPExtension *elem = (GstRTSPExtension *) walk->data; + + g_signal_connect (elem, detailed_signal, c_handler, data); + } +} -- cgit