summaryrefslogtreecommitdiffstats
path: root/gst/rtsp/gstrtspsrc.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-07-27 11:21:20 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-07-27 11:21:20 +0000
commita8ee445da6ff59bbe89b67b5133f1e3aa574bae2 (patch)
tree8f2585acdacc192c0ea77fa52ef5e4d1cfc5d8f5 /gst/rtsp/gstrtspsrc.c
parent1364d7b0b1f036e685fc518307fb4d8edd7d172f (diff)
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.
Diffstat (limited to 'gst/rtsp/gstrtspsrc.c')
-rw-r--r--gst/rtsp/gstrtspsrc.c44
1 files changed, 15 insertions, 29 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 8a0de7bd..619c1850 100644
--- a/gst/rtsp/gstrtspsrc.c
+++ b/gst/rtsp/gstrtspsrc.c
@@ -97,16 +97,6 @@
#include "gstrtspsrc.h"
-/* define for experimental real support */
-#undef WITH_EXT_REAL
-
-#if 0
-#include "rtspextwms.h"
-#ifdef WITH_EXT_REAL
-#include "rtspextreal.h"
-#endif
-#endif
-
GST_DEBUG_CATEGORY_STATIC (rtspsrc_debug);
#define GST_CAT_DEFAULT (rtspsrc_debug)
@@ -198,6 +188,9 @@ static GstStateChangeReturn gst_rtspsrc_change_state (GstElement * element,
GstStateChange transition);
static void gst_rtspsrc_handle_message (GstBin * bin, GstMessage * message);
+static GstRTSPResult gst_rtspsrc_send_cb (GstRTSPExtension * ext,
+ GstRTSPMessage * request, GstRTSPMessage * response, GstRTSPSrc * src);
+
static gboolean gst_rtspsrc_open (GstRTSPSrc * src);
static gboolean gst_rtspsrc_play (GstRTSPSrc * src);
static gboolean gst_rtspsrc_pause (GstRTSPSrc * src);
@@ -318,15 +311,9 @@ gst_rtspsrc_init (GstRTSPSrc * src, GstRTSPSrcClass * g_class)
/* get a list of all extensions */
src->extensions = gst_rtsp_ext_list_get ();
-#if 0
-#ifdef WITH_EXT_REAL
- src->extension = rtsp_ext_real_get_context ();
-#else
- /* install WMS extension by default */
- src->extension = rtsp_ext_wms_get_context ();
-#endif
- src->extension->src = (gpointer) src;
-#endif
+ /* connect to send signal */
+ gst_rtsp_ext_list_connect (src->extensions, "send",
+ (GCallback) gst_rtspsrc_send_cb, src);
src->state_rec_lock = g_new (GStaticRecMutex, 1);
g_static_rec_mutex_init (src->state_rec_lock);
@@ -340,6 +327,7 @@ gst_rtspsrc_finalize (GObject * object)
rtspsrc = GST_RTSPSRC (object);
+ gst_rtsp_ext_list_free (rtspsrc->extensions);
g_static_rec_mutex_free (rtspsrc->stream_rec_lock);
g_free (rtspsrc->stream_rec_lock);
g_free (rtspsrc->location);
@@ -349,16 +337,6 @@ gst_rtspsrc_finalize (GObject * object)
g_static_rec_mutex_free (rtspsrc->state_rec_lock);
g_free (rtspsrc->state_rec_lock);
-#if 0
- if (rtspsrc->extension) {
-#ifdef WITH_EXT_REAL
- rtsp_ext_real_free_context (rtspsrc->extension);
-#else
- rtsp_ext_wms_free_context (rtspsrc->extension);
-#endif
- }
-#endif
-
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -2917,6 +2895,14 @@ error_response:
}
}
+static GstRTSPResult
+gst_rtspsrc_send_cb (GstRTSPExtension * ext, GstRTSPMessage * request,
+ GstRTSPMessage * response, GstRTSPSrc * src)
+{
+ return gst_rtspsrc_send (src, request, response, NULL);
+}
+
+
/* parse the response and collect all the supported methods. We need this
* information so that we don't try to send an unsupported request to the
* server.