summaryrefslogtreecommitdiff
path: root/gst/rtsp-server/rtsp-session.h
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-02-04 19:52:50 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2009-02-04 19:52:50 +0100
commitaedd4652f386747efc65c6d230600e7422c8cc4a (patch)
treec462587055dfea39f0cc697b71ab299039140d6a /gst/rtsp-server/rtsp-session.h
parente789a8fdf31aeae4234a2fb7a7e4b251b47edfa5 (diff)
Add beginnings of session timeouts and limits
Add the timeout value to the Session header for unusual timeout values. Allow us to configure a limit to the amount of active sessions in a pool. Set a limit on the amount of retry we do after a sessionid collision. Add properties to the sessionid and the timeout of a session. Keep track of creation time and last access time for sessions.
Diffstat (limited to 'gst/rtsp-server/rtsp-session.h')
-rw-r--r--gst/rtsp-server/rtsp-session.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gst/rtsp-server/rtsp-session.h b/gst/rtsp-server/rtsp-session.h
index 08104f1..d87922b 100644
--- a/gst/rtsp-server/rtsp-session.h
+++ b/gst/rtsp-server/rtsp-session.h
@@ -81,16 +81,25 @@ struct _GstRTSPSessionMedia
/**
* GstRTSPSession:
+ * @sessionid: the session id of the session
+ * @timeout: the timeout of the session
+ * @create_time: the time when the session was created
+ * @last_access: the time the session was last accessed
+ * @media: a list of #GstRTSPSessionMedia managed in this session
*
* Session information kept by the server for a specific client.
* One client session, identified with a session id, can handle multiple medias
- * identified with the media object.
+ * identified with the url of a media.
*/
struct _GstRTSPSession {
GObject parent;
gchar *sessionid;
+ guint timeout;
+ GTimeVal create_time;
+ GTimeVal last_access;
+
GList *medias;
};
@@ -103,6 +112,14 @@ GType gst_rtsp_session_get_type (void);
/* create a new session */
GstRTSPSession * gst_rtsp_session_new (const gchar *sessionid);
+const gchar * gst_rtsp_session_get_sessionid (GstRTSPSession *session);
+
+void gst_rtsp_session_set_timeout (GstRTSPSession *session, guint timeout);
+guint gst_rtsp_session_get_timeout (GstRTSPSession *session);
+
+/* touch the session, update last_access */
+void gst_rtsp_session_touch (GstRTSPSession *session);
+
/* handle media in a session */
GstRTSPSessionMedia * gst_rtsp_session_manage_media (GstRTSPSession *sess,
const GstRTSPUrl *uri,