Trait gstreamer_rtsp_server::RTSPSessionPoolExt [−][src]
pub trait RTSPSessionPoolExt {
fn cleanup(&self) -> u32;
fn create(&self) -> Option<RTSPSession>;
fn find(&self, sessionid: &str) -> Option<RTSPSession>;
fn get_max_sessions(&self) -> u32;
fn get_n_sessions(&self) -> u32;
fn remove(&self, sess: &RTSPSession) -> Result<(), BoolError>;
fn set_max_sessions(&self, max: u32);
fn connect_session_removed<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_property_max_sessions_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Required Methods
fn cleanup(&self) -> u32
Inspect all the sessions in self and remove the sessions that are inactive
for more than their timeout.
Returns
the amount of sessions that got removed.
fn create(&self) -> Option<RTSPSession>
fn find(&self, sessionid: &str) -> Option<RTSPSession>
Find the session with sessionid in self. The access time of the session
will be updated with RTSPSessionExt::touch.
sessionid
the session id
Returns
the RTSPSession with sessionid
or None when the session did not exist. gobject::ObjectExt::unref after usage.
fn get_max_sessions(&self) -> u32
Get the maximum allowed number of sessions in self. 0 means an unlimited
amount of sessions.
Returns
the maximum allowed number of sessions.
fn get_n_sessions(&self) -> u32
fn remove(&self, sess: &RTSPSession) -> Result<(), BoolError>
Remove sess from self, releasing the ref that the pool has on sess.
sess
a RTSPSession
Returns
true if the session was found and removed.
fn set_max_sessions(&self, max: u32)
Configure the maximum allowed number of sessions in self to max.
A value of 0 means an unlimited amount of sessions.
max
the maximum number of sessions
fn connect_session_removed<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_max_sessions_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RTSPSessionPool> + IsA<Object>> RTSPSessionPoolExt for O