Trait gstreamer_rtsp_server::RTSPSessionExt [−][src]
pub trait RTSPSessionExt {
fn allow_expire(&self);
fn get_header(&self) -> Option<String>;
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32);
fn get_sessionid(&self) -> Option<String>;
fn get_timeout(&self) -> u32;
fn is_expired_usec(&self, now: i64) -> bool;
fn manage_media<P: IsA<RTSPMedia>>(
&self,
path: &str,
media: &P
) -> Option<RTSPSessionMedia>;
fn next_timeout_usec(&self, now: i64) -> i32;
fn prevent_expire(&self);
fn release_media(&self, media: &RTSPSessionMedia) -> bool;
fn set_timeout(&self, timeout: u32);
fn touch(&self);
fn get_property_timeout_always_visible(&self) -> bool;
fn set_property_timeout_always_visible(&self, timeout_always_visible: bool);
fn connect_property_sessionid_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_property_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
}Required Methods
fn allow_expire(&self)
Allow self to expire. This method must be called an equal
amount of time as RTSPSessionExt::prevent_expire.
fn get_header(&self) -> Option<String>
Get the string that can be placed in the Session header field.
Returns
the Session header of self.
g_free after usage.
fn get_media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32)
Get the session media for path. matched will contain the number of matched
characters of path.
path
the path for the media
matched
the amount of matched characters
Returns
the configuration for path in self.
fn get_sessionid(&self) -> Option<String>
Get the sessionid of self.
Returns
the sessionid of self.
The value remains valid as long as self is alive.
fn get_timeout(&self) -> u32
fn is_expired_usec(&self, now: i64) -> bool
fn manage_media<P: IsA<RTSPMedia>>(
&self,
path: &str,
media: &P
) -> Option<RTSPSessionMedia>
&self,
path: &str,
media: &P
) -> Option<RTSPSessionMedia>
Manage the media object obj in self. path will be used to retrieve this
media from the session with RTSPSessionExt::get_media.
Ownership is taken from media.
path
the path for the media
media
a RTSPMedia
Returns
a new RTSPSessionMedia object.
fn next_timeout_usec(&self, now: i64) -> i32
Get the amount of milliseconds till the session will expire.
now
the current monotonic time
Returns
the amount of milliseconds since the session will time out.
fn prevent_expire(&self)
Prevent self from expiring.
fn release_media(&self, media: &RTSPSessionMedia) -> bool
Release the managed media in self, freeing the memory allocated by it.
media
a RTSPMedia
Returns
true if there are more media session left in self.
fn set_timeout(&self, timeout: u32)
Configure self for a timeout of timeout seconds. The session will be
cleaned up when there is no activity for timeout seconds.
timeout
the new timeout
fn touch(&self)
Update the last_access time of the session to the current time.
fn get_property_timeout_always_visible(&self) -> bool
fn set_property_timeout_always_visible(&self, timeout_always_visible: bool)
fn connect_property_sessionid_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RTSPSession> + IsA<Object>> RTSPSessionExt for O