summaryrefslogtreecommitdiffstats
path: root/gst/rtsp/gstrtspsrc.h
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-08-17 17:08:11 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-08-17 17:08:11 +0000
commit0dcafb0635b6d435dde431f89285fff8d8a6b9e3 (patch)
tree989adf71fcaecfb5a6a33b706b8e0f6a42919c74 /gst/rtsp/gstrtspsrc.h
parent4d581cb6062e8f0248303840b6be30b342cf900c (diff)
gst/rtsp/gstrtspsrc.*: Protect connection activity with a new lock, avoids deadlocks when going to PAUSED. Fixes #455...
Original commit message from CVS: * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_finalize), (gst_rtspsrc_connection_send), (gst_rtspsrc_connection_receive), (gst_rtspsrc_sink_chain), (gst_rtspsrc_handle_request), (gst_rtspsrc_send_keep_alive), (gst_rtspsrc_loop_interleaved), (gst_rtspsrc_loop_udp), (gst_rtspsrc_try_send), (gst_rtspsrc_pause): * gst/rtsp/gstrtspsrc.h: Protect connection activity with a new lock, avoids deadlocks when going to PAUSED. Fixes #455808.
Diffstat (limited to 'gst/rtsp/gstrtspsrc.h')
-rw-r--r--gst/rtsp/gstrtspsrc.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h
index 8ee865ce..e3eaf6e8 100644
--- a/gst/rtsp/gstrtspsrc.h
+++ b/gst/rtsp/gstrtspsrc.h
@@ -74,9 +74,13 @@ typedef struct _GstRTSPSrcClass GstRTSPSrcClass;
#define GST_RTSP_STATE_LOCK(rtsp) (g_static_rec_mutex_lock (GST_RTSP_STATE_GET_LOCK(rtsp)))
#define GST_RTSP_STATE_UNLOCK(rtsp) (g_static_rec_mutex_unlock (GST_RTSP_STATE_GET_LOCK(rtsp)))
-#define GST_RTSP_STREAM_GET_LOCK(rtsp) (GST_RTSPSRC_CAST(rtsp)->stream_rec_lock)
-#define GST_RTSP_STREAM_LOCK(rtsp) (g_static_rec_mutex_lock (GST_RTSP_STREAM_GET_LOCK(rtsp)))
-#define GST_RTSP_STREAM_UNLOCK(rtsp) (g_static_rec_mutex_unlock (GST_RTSP_STREAM_GET_LOCK(rtsp)))
+#define GST_RTSP_STREAM_GET_LOCK(rtsp) (GST_RTSPSRC_CAST(rtsp)->stream_rec_lock)
+#define GST_RTSP_STREAM_LOCK(rtsp) (g_static_rec_mutex_lock (GST_RTSP_STREAM_GET_LOCK(rtsp)))
+#define GST_RTSP_STREAM_UNLOCK(rtsp) (g_static_rec_mutex_unlock (GST_RTSP_STREAM_GET_LOCK(rtsp)))
+
+#define GST_RTSP_CONN_GET_LOCK(rtsp) (GST_RTSPSRC_CAST(rtsp)->conn_rec_lock)
+#define GST_RTSP_CONN_LOCK(rtsp) (g_static_rec_mutex_lock (GST_RTSP_CONN_GET_LOCK(rtsp)))
+#define GST_RTSP_CONN_UNLOCK(rtsp) (g_static_rec_mutex_unlock (GST_RTSP_CONN_GET_LOCK(rtsp)))
typedef struct _GstRTSPStream GstRTSPStream;
@@ -138,6 +142,9 @@ struct _GstRTSPSrc {
/* mutex for protecting state changes */
GStaticRecMutex *state_rec_lock;
+ /* mutex for protecting the connection */
+ GStaticRecMutex *conn_rec_lock;
+
gint numstreams;
GList *streams;
GstStructure *props;