diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-04-26 10:08:27 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-04-26 10:08:27 +0000 |
commit | 530f214bd57cfd8fa9e001d957808211a28df06a (patch) | |
tree | 8944590d331da0b46e33872ca750442bb9999533 /gst/rtsp/gstrtspsrc.h | |
parent | 45b77c57b4d71ac737e31a28688065c15c6f68f0 (diff) |
gst/rtsp/gstrtspsrc.*: Protect state changes with a lock.
Original commit message from CVS:
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
(gst_rtspsrc_finalize), (gst_rtspsrc_stream_configure_transport),
(gst_rtspsrc_open), (gst_rtspsrc_close),
(gst_rtspsrc_parse_rtpinfo), (gst_rtspsrc_play),
(gst_rtspsrc_pause):
* gst/rtsp/gstrtspsrc.h:
Protect state changes with a lock.
* gst/rtsp/rtspconnection.c: (rtsp_connection_create),
(parse_line):
* gst/rtsp/rtspconnection.h:
Remove some unused stuff.
Diffstat (limited to 'gst/rtsp/gstrtspsrc.h')
-rw-r--r-- | gst/rtsp/gstrtspsrc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h index 82582cf3..7d595f69 100644 --- a/gst/rtsp/gstrtspsrc.h +++ b/gst/rtsp/gstrtspsrc.h @@ -67,6 +67,10 @@ G_BEGIN_DECLS typedef struct _GstRTSPSrc GstRTSPSrc; typedef struct _GstRTSPSrcClass GstRTSPSrcClass; +#define GST_RTSP_STATE_GET_LOCK(rtsp) (GST_RTSPSRC_CAST(rtsp)->state_lock) +#define GST_RTSP_STATE_LOCK(rtsp) (g_mutex_lock (GST_RTSP_STATE_GET_LOCK(rtsp))) +#define GST_RTSP_STATE_UNLOCK(rtsp) (g_mutex_unlock (GST_RTSP_STATE_GET_LOCK(rtsp))) + #define GST_RTSP_LOOP_GET_COND(rtsp) (GST_RTSPSRC_CAST(rtsp)->loop_cond) #define GST_RTSP_LOOP_WAIT(rtsp) (g_cond_wait(GST_RTSP_LOOP_GET_COND (rtsp), GST_OBJECT_GET_LOCK (rtsp))) #define GST_RTSP_LOOP_SIGNAL(rtsp) (g_cond_signal(GST_RTSP_LOOP_GET_COND (rtsp))) @@ -124,6 +128,7 @@ struct _GstRTSPSrc { /* cond to signal loop */ GCond *loop_cond; gint loop_cmd; + GMutex *state_lock; gint numstreams; GList *streams; @@ -141,6 +146,7 @@ struct _GstRTSPSrc { guint latency; /* state */ + RTSPState state; gchar *content_base; RTSPLowerTrans cur_protocols; gboolean tried_url_auth; |