GstRtspServer.RTSPSessionPool¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new() | 
| cleanup() | |
| create() | |
| create_watch() | |
| filter(func, *user_data) | |
| find(sessionid) | |
| get_max_sessions() | |
| get_n_sessions() | |
| remove(sess) | |
| set_max_sessions(max) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| max-sessions | int | r/w | the maximum amount of sessions (0 = unlimited) | 
Class Details¶
- 
class GstRtspServer.RTSPSessionPool(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - Structure: - GstRtspServer.RTSPSessionPoolClass- An object that keeps track of the active sessions. This object is usually attached to a - GstRtspServer.RTSPServerobject to manage the sessions in that server.- 
classmethod new()[source]¶
- Returns: - A new - GstRtspServer.RTSPSessionPool.- GObject.Object.unref() after usage.- Return type: - GstRtspServer.RTSPSessionPool- Create a new - GstRtspServer.RTSPSessionPoolinstance.
 - 
cleanup()[source]¶
- Returns: - the amount of sessions that got removed. - Return type: - int- Inspect all the sessions in self and remove the sessions that are inactive for more than their timeout. 
 - 
create()[source]¶
- Returns: - a new - GstRtspServer.RTSPSession.- Return type: - GstRtspServer.RTSPSessionor- None- Create a new - GstRtspServer.RTSPSessionobject in self.
 - 
create_watch()[source]¶
- Returns: - a - GLib.Source- Return type: - GLib.Source- Create a - GLib.Sourcethat will be dispatched when the session should be cleaned up.
 - 
filter(func, *user_data)[source]¶
- Parameters: - func (GstRtspServer.RTSPSessionPoolFilterFuncorNone) – a callback
- user_data (objectorNone) – userGstRtsp.datapassed to func
 - Returns: - a - GLib.Listwith all sessions for which func returned- GstRtspServer.RTSPFilterResult.REF. After usage, each element in the- GLib.Listshould be unreffed before the list is freed.- Return type: - Call func for each session in self. The result value of func determines what happens to the session. func will be called with the session pool locked so no further actions on self can be performed from func. - If func returns - GstRtspServer.RTSPFilterResult.REMOVE, the session will be set to the expired state and removed from self.- If func returns - GstRtspServer.RTSPFilterResult.KEEP, the session will remain in self.- If func returns - GstRtspServer.RTSPFilterResult.REF, the session will remain in self but will also be added with an additional ref to the result- GLib.Listof this function..- When func is - None,- GstRtspServer.RTSPFilterResult.REFwill be assumed for all sessions.
- func (
 - 
find(sessionid)[source]¶
- Parameters: - sessionid ( - str) – the session id- Returns: - the - GstRtspServer.RTSPSessionwith sessionid or- Nonewhen the session did not exist.- GObject.Object.unref() after usage.- Return type: - GstRtspServer.RTSPSessionor- None- Find the session with sessionid in self. The access time of the session will be updated with - GstRtspServer.RTSPSession.touch().
 - 
get_max_sessions()[source]¶
- Returns: - the maximum allowed number of sessions. - Return type: - int- Get the maximum allowed number of sessions in self. 0 means an unlimited amount of sessions. 
 - 
get_n_sessions()[source]¶
- Returns: - the amount of active sessions in self. - Return type: - int- Get the amount of active sessions in self. 
 - 
remove(sess)[source]¶
- Parameters: - sess ( - GstRtspServer.RTSPSession) – a- GstRtspServer.RTSPSession- Returns: - Trueif the session was found and removed.- Return type: - bool- Remove sess from self, releasing the ref that the pool has on sess. 
 - 
set_max_sessions(max)[source]¶
- Parameters: - max ( - int) – the maximum number of sessions- Configure the maximum allowed number of sessions in self to max. A value of 0 means an unlimited amount of sessions. 
 - 
do_session_removed(session) virtual¶
- Parameters: - session ( - GstRtspServer.RTSPSession) –
 
- 
classmethod 
Signal Details¶
- 
GstRtspServer.RTSPSessionPool.signals.session_removed(r_t_s_p_session_pool, object)¶
- Signal Name: - session-removed- Flags: - Parameters: - r_t_s_p_session_pool (GstRtspServer.RTSPSessionPool) – The object which received the signal
- object (GstRtspServer.RTSPSession) –
 
- r_t_s_p_session_pool (