# rtsp session

The GstRTSPSession is identified by an id, unique in the GstRTSPSessionPool that created the session and manages media and its configuration.

A GstRTSPSession has a timeout that can be retrieved with gst_rtsp_session_get_timeout. You can check if the sessions is expired with gst_rtsp_session_is_expired. gst_rtsp_session_touch will reset the expiration counter of the session.

When a client configures a media with SETUP, a session will be created to keep track of the configuration of that media. With gst_rtsp_session_manage_media, the media is added to the managed media in the session. With gst_rtsp_session_release_media the media can be released again from the session. Managed media is identified in the sessions with a url. Use gst_rtsp_session_get_media to get the media that matches (part of) the given url.

The media in a session can be iterated with gst_rtsp_session_filter.

Last reviewed on 2013-07-11 (1.0.0)

## GstRTSPSession

    GObject
        ╰──GstRTSPSession

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 url of a media.

### Members

`parent` (GObject) –
No description available

### Class structure

#### GstRTSPSessionClass

##### Fields

`parent_class` (GObjectClass) –
No description available

### GstRtspServer.RTSPSessionClass

##### Attributes

`parent_class` (GObject.ObjectClass) –
No description available

### GstRtspServer.RTSPSessionClass

##### Attributes

`parent_class` (GObject.ObjectClass) –
No description available

## GstRtspServer.RTSPSession

    GObject.Object
        ╰──GstRtspServer.RTSPSession

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 url of a media.

### Members

`parent` (GObject.Object) –
No description available

## GstRtspServer.RTSPSession

    GObject.Object
        ╰──GstRtspServer.RTSPSession

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 url of a media.

### Members

`parent` (GObject.Object) –
No description available

### Constructors

#### gst_rtsp_session_new

    GstRTSPSession *
    gst_rtsp_session_new (const gchar * sessionid)

Create a new GstRTSPSession instance with sessionid.

Parameters:

`sessionid` –

a session id

Returns ( [transfer: full]) –

a new GstRTSPSession

#### GstRtspServer.RTSPSession.prototype.new

    function GstRtspServer.RTSPSession.prototype.new(sessionid: String): {
        // javascript wrapper for 'gst_rtsp_session_new'
    }

Create a new GstRtspServer.RTSPSession instance with sessionid.

Parameters:

`sessionid` (String) –

a session id

Returns (GstRtspServer.RTSPSession) –

a new GstRtspServer.RTSPSession

#### GstRtspServer.RTSPSession.new

    def GstRtspServer.RTSPSession.new (sessionid):
        #python wrapper for 'gst_rtsp_session_new'

Create a new GstRtspServer.RTSPSession instance with sessionid.

Parameters:

`sessionid` (str) –

a session id

Returns (GstRtspServer.RTSPSession) –

a new GstRtspServer.RTSPSession

### Methods

#### gst_rtsp_session_allow_expire

    gst_rtsp_session_allow_expire (GstRTSPSession * session)

Allow session to expire. This method must be called an equal amount of time as gst_rtsp_session_prevent_expire.

Parameters:

`session` –

a GstRTSPSession

#### GstRtspServer.RTSPSession.prototype.allow_expire

    function GstRtspServer.RTSPSession.prototype.allow_expire(): {
        // javascript wrapper for 'gst_rtsp_session_allow_expire'
    }

Allow session to expire. This method must be called an equal amount of time as GstRtspServer.RTSPSession.prototype.prevent_expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

#### GstRtspServer.RTSPSession.allow_expire

    def GstRtspServer.RTSPSession.allow_expire (self):
        #python wrapper for 'gst_rtsp_session_allow_expire'

Allow session to expire. This method must be called an equal amount of time as GstRtspServer.RTSPSession.prevent_expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

#### gst_rtsp_session_dup_media

    GstRTSPSessionMedia *
    gst_rtsp_session_dup_media (GstRTSPSession * sess,
                                const gchar * path,
                                gint * matched)

Gets the session media for path, increasing its reference count. matched will contain the number of matched characters of path.

Parameters:

`sess` –

a GstRTSPSession

`path` –

the path for the media

`matched` ( [out]) –

the amount of matched characters

Returns ( [transfer: full][nullable]) –

the configuration for path in sess, should be unreferenced when no longer needed.

Since : 1.20

#### GstRtspServer.RTSPSession.prototype.dup_media

    function GstRtspServer.RTSPSession.prototype.dup_media(path: String): {
        // javascript wrapper for 'gst_rtsp_session_dup_media'
    }

Gets the session media for path, increasing its reference count. matched will contain the number of matched characters of path.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (String) –

the path for the media

Returns a tuple made of:

(GstRtspServer.RTSPSessionMedia ) –

the configuration for path in sess, should be unreferenced when no longer needed.

`matched` (Number ) –

the configuration for path in sess, should be unreferenced when no longer needed.

Since : 1.20

#### GstRtspServer.RTSPSession.dup_media

    def GstRtspServer.RTSPSession.dup_media (self, path):
        #python wrapper for 'gst_rtsp_session_dup_media'

Gets the session media for path, increasing its reference count. matched will contain the number of matched characters of path.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (str) –

the path for the media

Returns a tuple made of:

(GstRtspServer.RTSPSessionMedia ) –

the configuration for path in sess, should be unreferenced when no longer needed.

`matched` (int ) –

the configuration for path in sess, should be unreferenced when no longer needed.

Since : 1.20

#### gst_rtsp_session_filter

    GList *
    gst_rtsp_session_filter (GstRTSPSession * sess,
                             GstRTSPSessionFilterFunc func,
                             gpointer user_data)

Call func for each media in sess. The result value of func determines what happens to the media. func will be called with sess locked so no further actions on sess can be performed from func.

If func returns GST_RTSP_FILTER_REMOVE, the media will be removed from sess.

If func returns GST_RTSP_FILTER_KEEP, the media will remain in sess.

If func returns GST_RTSP_FILTER_REF, the media will remain in sess but will also be added with an additional ref to the result GList of this function..

When func is NULL, GST_RTSP_FILTER_REF will be assumed for all media.

Parameters:

`sess` –

a GstRTSPSession

`func` ( [scope call][allow-none]) –

a callback

`user_data` ( [closure]) –

user data passed to func

Returns ( [element-typeGstRTSPSessionMedia][transfer: full]) –

a GList with all media for which func returned GST_RTSP_FILTER_REF. After usage, each element in the GList should be unreffed before the list is freed.

#### GstRtspServer.RTSPSession.prototype.filter

    function GstRtspServer.RTSPSession.prototype.filter(func: GstRtspServer.RTSPSessionFilterFunc, user_data: Object): {
        // javascript wrapper for 'gst_rtsp_session_filter'
    }

Call func for each media in sess. The result value of func determines what happens to the media. func will be called with sess locked so no further actions on sess can be performed from func.

If func returns GstRtspServer.RTSPFilterResult.REMOVE, the media will be removed from sess.

If func returns GstRtspServer.RTSPFilterResult.KEEP, the media will remain in sess.

If func returns GstRtspServer.RTSPFilterResult.REF, the media will remain in sess but will also be added with an additional ref to the result GLib.List of this function..

When func is null, GstRtspServer.RTSPFilterResult.REF will be assumed for all media.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`func` (GstRtspServer.RTSPSessionFilterFunc) –

a callback

`user_data` (Object) –

user data passed to func

Returns ([ GstRtspServer.RTSPSessionMedia ]) –

a GList with all media for which func returned GstRtspServer.RTSPFilterResult.REF. After usage, each element in the GLib.List should be unreffed before the list is freed.

#### GstRtspServer.RTSPSession.filter

    def GstRtspServer.RTSPSession.filter (self, func, *user_data):
        #python wrapper for 'gst_rtsp_session_filter'

Call func for each media in sess. The result value of func determines what happens to the media. func will be called with sess locked so no further actions on sess can be performed from func.

If func returns GstRtspServer.RTSPFilterResult.REMOVE, the media will be removed from sess.

If func returns GstRtspServer.RTSPFilterResult.KEEP, the media will remain in sess.

If func returns GstRtspServer.RTSPFilterResult.REF, the media will remain in sess but will also be added with an additional ref to the result GLib.List of this function..

When func is None, GstRtspServer.RTSPFilterResult.REF will be assumed for all media.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`func` (GstRtspServer.RTSPSessionFilterFunc) –

a callback

`user_data` (variadic) –

user data passed to func

Returns ([ GstRtspServer.RTSPSessionMedia ]) –

a GList with all media for which func returned GstRtspServer.RTSPFilterResult.REF. After usage, each element in the GLib.List should be unreffed before the list is freed.

#### gst_rtsp_session_get_header

    gchar *
    gst_rtsp_session_get_header (GstRTSPSession * session)

Get the string that can be placed in the Session header field.

Parameters:

`session` –

a GstRTSPSession

Returns ( [transfer: full][nullable]) –

the Session header of session. g_free after usage.

#### GstRtspServer.RTSPSession.prototype.get_header

    function GstRtspServer.RTSPSession.prototype.get_header(): {
        // javascript wrapper for 'gst_rtsp_session_get_header'
    }

Get the string that can be placed in the Session header field.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (String) –

the Session header of session. GLib.prototype.free after usage.

#### GstRtspServer.RTSPSession.get_header

    def GstRtspServer.RTSPSession.get_header (self):
        #python wrapper for 'gst_rtsp_session_get_header'

Get the string that can be placed in the Session header field.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (str) –

the Session header of session. GLib.free after usage.

#### gst_rtsp_session_get_media

    GstRTSPSessionMedia *
    gst_rtsp_session_get_media (GstRTSPSession * sess,
                                const gchar * path,
                                gint * matched)

Gets the session media for path. matched will contain the number of matched characters of path.

Parameters:

`sess` –

a GstRTSPSession

`path` –

the path for the media

`matched` ( [out]) –

the amount of matched characters

Returns ( [transfer: none][nullable]) –

the configuration for path in sess.

#### GstRtspServer.RTSPSession.prototype.get_media

    function GstRtspServer.RTSPSession.prototype.get_media(path: String): {
        // javascript wrapper for 'gst_rtsp_session_get_media'
    }

Gets the session media for path. matched will contain the number of matched characters of path.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (String) –

the path for the media

Returns a tuple made of:

(GstRtspServer.RTSPSessionMedia ) –

the configuration for path in sess.

`matched` (Number ) –

the configuration for path in sess.

#### GstRtspServer.RTSPSession.get_media

    def GstRtspServer.RTSPSession.get_media (self, path):
        #python wrapper for 'gst_rtsp_session_get_media'

Gets the session media for path. matched will contain the number of matched characters of path.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (str) –

the path for the media

Returns a tuple made of:

(GstRtspServer.RTSPSessionMedia ) –

the configuration for path in sess.

`matched` (int ) –

the configuration for path in sess.

#### gst_rtsp_session_get_sessionid

    const gchar *
    gst_rtsp_session_get_sessionid (GstRTSPSession * session)

Get the sessionid of session.

Parameters:

`session` –

a GstRTSPSession

Returns ( [transfer: none][nullable]) –

the sessionid of session. The value remains valid as long as session is alive.

#### GstRtspServer.RTSPSession.prototype.get_sessionid

    function GstRtspServer.RTSPSession.prototype.get_sessionid(): {
        // javascript wrapper for 'gst_rtsp_session_get_sessionid'
    }

Get the sessionid of session.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (String) –

the sessionid of session. The value remains valid as long as session is alive.

#### GstRtspServer.RTSPSession.get_sessionid

    def GstRtspServer.RTSPSession.get_sessionid (self):
        #python wrapper for 'gst_rtsp_session_get_sessionid'

Get the sessionid of session.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (str) –

the sessionid of session. The value remains valid as long as session is alive.

#### gst_rtsp_session_get_timeout

    guint
    gst_rtsp_session_get_timeout (GstRTSPSession * session)

Get the timeout value of session.

Parameters:

`session` –

a GstRTSPSession

Returns –

the timeout of session in seconds.

#### GstRtspServer.RTSPSession.prototype.get_timeout

    function GstRtspServer.RTSPSession.prototype.get_timeout(): {
        // javascript wrapper for 'gst_rtsp_session_get_timeout'
    }

Get the timeout value of session.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (Number) –

the timeout of session in seconds.

#### GstRtspServer.RTSPSession.get_timeout

    def GstRtspServer.RTSPSession.get_timeout (self):
        #python wrapper for 'gst_rtsp_session_get_timeout'

Get the timeout value of session.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

Returns (int) –

the timeout of session in seconds.

#### gst_rtsp_session_is_expired

    gboolean
    gst_rtsp_session_is_expired (GstRTSPSession * session,
                                 GTimeVal * now)

Check if session timeout out.

Parameters:

`session` –

a GstRTSPSession

`now` ( [transfer: none]) –

the current system time

Returns –

TRUE if session timed out

deprecated : Use gst_rtsp_session_is_expired_usec() instead.

#### GstRtspServer.RTSPSession.prototype.is_expired

    function GstRtspServer.RTSPSession.prototype.is_expired(now: GLib.TimeVal): {
        // javascript wrapper for 'gst_rtsp_session_is_expired'
    }

Check if session timeout out.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (GLib.TimeVal) –

the current system time

Returns (Number) –

true if session timed out

deprecated : Use gst_rtsp_session_is_expired_usec() instead.

#### GstRtspServer.RTSPSession.is_expired

    def GstRtspServer.RTSPSession.is_expired (self, now):
        #python wrapper for 'gst_rtsp_session_is_expired'

Check if session timeout out.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (GLib.TimeVal) –

the current system time

Returns (bool) –

True if session timed out

deprecated : Use gst_rtsp_session_is_expired_usec() instead.

#### gst_rtsp_session_is_expired_usec

    gboolean
    gst_rtsp_session_is_expired_usec (GstRTSPSession * session,
                                      gint64 now)

Check if session timeout out.

Parameters:

`session` –

a GstRTSPSession

`now` –

the current monotonic time

Returns –

TRUE if session timed out

#### GstRtspServer.RTSPSession.prototype.is_expired_usec

    function GstRtspServer.RTSPSession.prototype.is_expired_usec(now: Number): {
        // javascript wrapper for 'gst_rtsp_session_is_expired_usec'
    }

Check if session timeout out.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (Number) –

the current monotonic time

Returns (Number) –

true if session timed out

#### GstRtspServer.RTSPSession.is_expired_usec

    def GstRtspServer.RTSPSession.is_expired_usec (self, now):
        #python wrapper for 'gst_rtsp_session_is_expired_usec'

Check if session timeout out.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (int) –

the current monotonic time

Returns (bool) –

True if session timed out

#### gst_rtsp_session_manage_media

    GstRTSPSessionMedia *
    gst_rtsp_session_manage_media (GstRTSPSession * sess,
                                   const gchar * path,
                                   GstRTSPMedia * media)

Manage the media object obj in sess. path will be used to retrieve this media from the session with gst_rtsp_session_get_media.

Ownership is taken from media.

Parameters:

`sess` –

a GstRTSPSession

`path` –

the path for the media

`media` ( [transfer: full]) –

a GstRTSPMedia

Returns ( [transfer: none]) –

a new GstRTSPSessionMedia object.

#### GstRtspServer.RTSPSession.prototype.manage_media

    function GstRtspServer.RTSPSession.prototype.manage_media(path: String, media: GstRtspServer.RTSPMedia): {
        // javascript wrapper for 'gst_rtsp_session_manage_media'
    }

Manage the media object obj in sess. path will be used to retrieve this media from the session with GstRtspServer.RTSPSession.prototype.get_media.

Ownership is taken from media.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (String) –

the path for the media

`media` (GstRtspServer.RTSPMedia) –

a GstRtspServer.RTSPMedia

Returns (GstRtspServer.RTSPSessionMedia) –

a new GstRTSPSessionMedia object.

#### GstRtspServer.RTSPSession.manage_media

    def GstRtspServer.RTSPSession.manage_media (self, path, media):
        #python wrapper for 'gst_rtsp_session_manage_media'

Manage the media object obj in sess. path will be used to retrieve this media from the session with GstRtspServer.RTSPSession.get_media.

Ownership is taken from media.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`path` (str) –

the path for the media

`media` (GstRtspServer.RTSPMedia) –

a GstRtspServer.RTSPMedia

Returns (GstRtspServer.RTSPSessionMedia) –

a new GstRTSPSessionMedia object.

#### gst_rtsp_session_next_timeout

    gint
    gst_rtsp_session_next_timeout (GstRTSPSession * session,
                                   GTimeVal * now)

Get the amount of milliseconds till the session will expire.

Parameters:

`session` –

a GstRTSPSession

`now` ( [transfer: none]) –

the current system time

Returns –

the amount of milliseconds since the session will time out.

deprecated : Use gst_rtsp_session_next_timeout_usec() instead.

#### GstRtspServer.RTSPSession.prototype.next_timeout

    function GstRtspServer.RTSPSession.prototype.next_timeout(now: GLib.TimeVal): {
        // javascript wrapper for 'gst_rtsp_session_next_timeout'
    }

Get the amount of milliseconds till the session will expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (GLib.TimeVal) –

the current system time

Returns (Number) –

the amount of milliseconds since the session will time out.

deprecated : Use gst_rtsp_session_next_timeout_usec() instead.

#### GstRtspServer.RTSPSession.next_timeout

    def GstRtspServer.RTSPSession.next_timeout (self, now):
        #python wrapper for 'gst_rtsp_session_next_timeout'

Get the amount of milliseconds till the session will expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (GLib.TimeVal) –

the current system time

Returns (int) –

the amount of milliseconds since the session will time out.

deprecated : Use gst_rtsp_session_next_timeout_usec() instead.

#### gst_rtsp_session_next_timeout_usec

    gint
    gst_rtsp_session_next_timeout_usec (GstRTSPSession * session,
                                        gint64 now)

Get the amount of milliseconds till the session will expire.

Parameters:

`session` –

a GstRTSPSession

`now` –

the current monotonic time

Returns –

the amount of milliseconds since the session will time out.

#### GstRtspServer.RTSPSession.prototype.next_timeout_usec

    function GstRtspServer.RTSPSession.prototype.next_timeout_usec(now: Number): {
        // javascript wrapper for 'gst_rtsp_session_next_timeout_usec'
    }

Get the amount of milliseconds till the session will expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (Number) –

the current monotonic time

Returns (Number) –

the amount of milliseconds since the session will time out.

#### GstRtspServer.RTSPSession.next_timeout_usec

    def GstRtspServer.RTSPSession.next_timeout_usec (self, now):
        #python wrapper for 'gst_rtsp_session_next_timeout_usec'

Get the amount of milliseconds till the session will expire.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`now` (int) –

the current monotonic time

Returns (int) –

the amount of milliseconds since the session will time out.

#### gst_rtsp_session_prevent_expire

    gst_rtsp_session_prevent_expire (GstRTSPSession * session)

Prevent session from expiring.

Parameters:

`session` –

a GstRTSPSession

#### GstRtspServer.RTSPSession.prototype.prevent_expire

    function GstRtspServer.RTSPSession.prototype.prevent_expire(): {
        // javascript wrapper for 'gst_rtsp_session_prevent_expire'
    }

Prevent session from expiring.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

#### GstRtspServer.RTSPSession.prevent_expire

    def GstRtspServer.RTSPSession.prevent_expire (self):
        #python wrapper for 'gst_rtsp_session_prevent_expire'

Prevent session from expiring.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

#### gst_rtsp_session_release_media

    gboolean
    gst_rtsp_session_release_media (GstRTSPSession * sess,
                                    GstRTSPSessionMedia * media)

Release the managed media in sess, freeing the memory allocated by it.

Parameters:

`sess` –

a GstRTSPSession

`media` ( [transfer: none]) –

a GstRTSPMedia

Returns –

TRUE if there are more media session left in sess.

#### GstRtspServer.RTSPSession.prototype.release_media

    function GstRtspServer.RTSPSession.prototype.release_media(media: GstRtspServer.RTSPSessionMedia): {
        // javascript wrapper for 'gst_rtsp_session_release_media'
    }

Release the managed media in sess, freeing the memory allocated by it.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`media` (GstRtspServer.RTSPSessionMedia) –

a GstRtspServer.RTSPMedia

Returns (Number) –

true if there are more media session left in sess.

#### GstRtspServer.RTSPSession.release_media

    def GstRtspServer.RTSPSession.release_media (self, media):
        #python wrapper for 'gst_rtsp_session_release_media'

Release the managed media in sess, freeing the memory allocated by it.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`media` (GstRtspServer.RTSPSessionMedia) –

a GstRtspServer.RTSPMedia

Returns (bool) –

True if there are more media session left in sess.

#### gst_rtsp_session_set_timeout

    gst_rtsp_session_set_timeout (GstRTSPSession * session,
                                  guint timeout)

Configure session for a timeout of timeout seconds. The session will be cleaned up when there is no activity for timeout seconds.

Parameters:

`session` –

a GstRTSPSession

`timeout` –

the new timeout

#### GstRtspServer.RTSPSession.prototype.set_timeout

    function GstRtspServer.RTSPSession.prototype.set_timeout(timeout: Number): {
        // javascript wrapper for 'gst_rtsp_session_set_timeout'
    }

Configure session for a timeout of timeout seconds. The session will be cleaned up when there is no activity for timeout seconds.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`timeout` (Number) –

the new timeout

#### GstRtspServer.RTSPSession.set_timeout

    def GstRtspServer.RTSPSession.set_timeout (self, timeout):
        #python wrapper for 'gst_rtsp_session_set_timeout'

Configure session for a timeout of timeout seconds. The session will be cleaned up when there is no activity for timeout seconds.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

`timeout` (int) –

the new timeout

#### gst_rtsp_session_touch

    gst_rtsp_session_touch (GstRTSPSession * session)

Update the last_access time of the session to the current time.

Parameters:

`session` –

a GstRTSPSession

#### GstRtspServer.RTSPSession.prototype.touch

    function GstRtspServer.RTSPSession.prototype.touch(): {
        // javascript wrapper for 'gst_rtsp_session_touch'
    }

Update the last_access time of the session to the current time.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

#### GstRtspServer.RTSPSession.touch

    def GstRtspServer.RTSPSession.touch (self):
        #python wrapper for 'gst_rtsp_session_touch'

Update the last_access time of the session to the current time.

Parameters:

`session` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession

### Properties

#### extra-timeout

    “extra-timeout” guint

Flags : Read / Write

#### extra-timeout

    “extra-timeout” Number

Flags : Read / Write

#### extra_timeout

    “self.props.extra_timeout” int

Flags : Read / Write

#### sessionid

    “sessionid” gchar *

Flags : Read / Write / Construct Only

#### sessionid

    “sessionid” String

Flags : Read / Write / Construct Only

#### sessionid

    “self.props.sessionid” str

Flags : Read / Write / Construct Only

#### timeout

    “timeout” guint

Flags : Read / Write

#### timeout

    “timeout” Number

Flags : Read / Write

#### timeout

    “self.props.timeout” int

Flags : Read / Write

#### timeout-always-visible

    “timeout-always-visible” gboolean

Flags : Read / Write

#### timeout-always-visible

    “timeout-always-visible” Number

Flags : Read / Write

#### timeout_always_visible

    “self.props.timeout_always_visible” bool

Flags : Read / Write

## Function Macros

### GST_RTSP_SESSION_CAST

    #define GST_RTSP_SESSION_CAST(obj)         ((GstRTSPSession*)(obj))

### GST_RTSP_SESSION_CLASS_CAST

    #define GST_RTSP_SESSION_CLASS_CAST(klass) ((GstRTSPSessionClass*)(klass))

## Enumerations

### GstRTSPFilterResult

Possible return values for gst_rtsp_session_pool_filter.

##### Members

`GST_RTSP_FILTER_REMOVE` (0) –

Remove session

`GST_RTSP_FILTER_KEEP` (1) –

Keep session in the pool

`GST_RTSP_FILTER_REF` (2) –

Ref session in the result list

### GstRtspServer.RTSPFilterResult

Possible return values for GstRtspServer.RTSPSessionPool.prototype.filter.

##### Members

`GstRtspServer.RTSPFilterResult.REMOVE` (0) –

Remove session

`GstRtspServer.RTSPFilterResult.KEEP` (1) –

Keep session in the pool

`GstRtspServer.RTSPFilterResult.REF` (2) –

Ref session in the result list

### GstRtspServer.RTSPFilterResult

Possible return values for GstRtspServer.RTSPSessionPool.filter.

##### Members

`GstRtspServer.RTSPFilterResult.REMOVE` (0) –

Remove session

`GstRtspServer.RTSPFilterResult.KEEP` (1) –

Keep session in the pool

`GstRtspServer.RTSPFilterResult.REF` (2) –

Ref session in the result list

## Callbacks

### GstRTSPSessionFilterFunc

    GstRTSPFilterResult
    (*GstRTSPSessionFilterFunc) (GstRTSPSession * sess,
                                 GstRTSPSessionMedia * media,
                                 gpointer user_data)

This function will be called by the gst_rtsp_session_filter. An implementation should return a value of GstRTSPFilterResult.

When this function returns GST_RTSP_FILTER_REMOVE, media will be removed from sess.

A return value of GST_RTSP_FILTER_KEEP will leave media untouched in sess.

A value of GST_RTSP_FILTER_REF will add media to the result GList of gst_rtsp_session_filter.

Parameters:

`sess` –

a GstRTSPSession object

`media` –

a GstRTSPSessionMedia in sess

`user_data` –

user data that has been given to gst_rtsp_session_filter

Returns –

a GstRTSPFilterResult.

### GstRtspServer.RTSPSessionFilterFunc

    function GstRtspServer.RTSPSessionFilterFunc(sess: GstRtspServer.RTSPSession, media: GstRtspServer.RTSPSessionMedia, user_data: Object): {
        // javascript wrapper for 'GstRTSPSessionFilterFunc'
    }

This function will be called by the GstRtspServer.RTSPSession.prototype.filter. An implementation should return a value of GstRtspServer.RTSPFilterResult.

When this function returns GstRtspServer.RTSPFilterResult.REMOVE, media will be removed from sess.

A return value of GstRtspServer.RTSPFilterResult.KEEP will leave media untouched in sess.

A value of GST_RTSP_FILTER_REF will add media to the result GLib.List of GstRtspServer.RTSPSession.prototype.filter.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession object

`media` (GstRtspServer.RTSPSessionMedia) –

a GstRtspServer.RTSPSessionMedia in sess

`user_data` (Object) –

user data that has been given to GstRtspServer.RTSPSession.prototype.filter

Returns (GstRtspServer.RTSPFilterResult) –

a GstRtspServer.RTSPFilterResult.

### GstRtspServer.RTSPSessionFilterFunc

    def GstRtspServer.RTSPSessionFilterFunc (sess, media, *user_data):
        #python wrapper for 'GstRTSPSessionFilterFunc'

This function will be called by the GstRtspServer.RTSPSession.filter. An implementation should return a value of GstRtspServer.RTSPFilterResult.

When this function returns GstRtspServer.RTSPFilterResult.REMOVE, media will be removed from sess.

A return value of GstRtspServer.RTSPFilterResult.KEEP will leave media untouched in sess.

A value of GST_RTSP_FILTER_REF will add media to the result GLib.List of GstRtspServer.RTSPSession.filter.

Parameters:

`sess` (GstRtspServer.RTSPSession) –

a GstRtspServer.RTSPSession object

`media` (GstRtspServer.RTSPSessionMedia) –

a GstRtspServer.RTSPSessionMedia in sess

`user_data` (variadic) –

user data that has been given to GstRtspServer.RTSPSession.filter

Returns (GstRtspServer.RTSPFilterResult) –

a GstRtspServer.RTSPFilterResult.

The results of the search are