Trait gstreamer_rtsp_server::prelude::RTSPSessionExt [−][src]
pub trait RTSPSessionExt: 'static {}Show methods
fn allow_expire(&self); fn filter(
&self,
func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>
) -> Vec<RTSPSessionMedia>; fn header(&self) -> Option<GString>; fn media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32); fn sessionid(&self) -> Option<GString>; fn timeout(&self) -> u32; fn is_expired_usec(&self, now: i64) -> bool; fn manage_media<P: IsA<RTSPMedia>>(
&self,
path: &str,
media: &P
) -> Result<RTSPSessionMedia, BoolError>; fn next_timeout_usec(&self, now: i64) -> i32; fn prevent_expire(&self); fn release_media<P: IsA<RTSPSessionMedia>>(&self, media: &P) -> bool; fn set_timeout(&self, timeout: u32); fn touch(&self); fn extra_timeout(&self) -> u32; fn set_extra_timeout(&self, extra_timeout: u32); fn is_timeout_always_visible(&self) -> bool; fn set_timeout_always_visible(&self, timeout_always_visible: bool); fn connect_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn allow_expire(&self)
[src]
Allow self
to expire. This method must be called an equal
amount of time as Self::prevent_expire()
.
fn filter(
&self,
func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>
) -> Vec<RTSPSessionMedia>
[src]
&self,
func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>
) -> Vec<RTSPSessionMedia>
Call func
for each media in self
. The result value of func
determines
what happens to the media. func
will be called with self
locked so no further actions on self
can be performed from func
.
If func
returns crate::RTSPFilterResult::Remove
, the media will be removed from
self
.
If func
returns crate::RTSPFilterResult::Keep
, the media will remain in self
.
If func
returns crate::RTSPFilterResult::Ref
, the media will remain in self
but
will also be added with an additional ref to the result [crate::glib::List
] of this
function..
When func
is None
, crate::RTSPFilterResult::Ref
will be assumed for all media.
func
a callback
user_data
user data passed to func
Returns
a GList with all
media for which func
returned crate::RTSPFilterResult::Ref
. After usage, each
element in the [crate::glib::List
] should be unreffed before the list is freed.
fn header(&self) -> Option<GString>
[src]
Get the string that can be placed in the Session header field.
Returns
the Session header of self
.
g_free()
after usage.
fn media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32)
[src]
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 sessionid(&self) -> Option<GString>
[src]
Get the sessionid of self
.
Returns
the sessionid of self
.
The value remains valid as long as self
is alive.
fn timeout(&self) -> u32
[src]
fn is_expired_usec(&self, now: i64) -> bool
[src]
fn manage_media<P: IsA<RTSPMedia>>(
&self,
path: &str,
media: &P
) -> Result<RTSPSessionMedia, BoolError>
[src]
&self,
path: &str,
media: &P
) -> Result<RTSPSessionMedia, BoolError>
Manage the media object obj
in self
. path
will be used to retrieve this
media from the session with [Self::get_media()
].
Ownership is taken from media
.
path
the path for the media
media
Returns
a new crate::RTSPSessionMedia
(XXX: @-reference does not belong to RTSPSessionExt!) object.
fn next_timeout_usec(&self, now: i64) -> i32
[src]
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)
[src]
Prevent self
from expiring.
fn release_media<P: IsA<RTSPSessionMedia>>(&self, media: &P) -> bool
[src]
Release the managed media
in self
, freeing the memory allocated by it.
media
Returns
true
if there are more media session left in self
.
fn set_timeout(&self, timeout: u32)
[src]
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)
[src]
Update the last_access time of the session to the current time.
fn extra_timeout(&self) -> u32
[src]
fn set_extra_timeout(&self, extra_timeout: u32)
[src]
fn is_timeout_always_visible(&self) -> bool
[src]
fn set_timeout_always_visible(&self, timeout_always_visible: bool)
[src]
fn connect_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RTSPSession>> RTSPSessionExt for O
[src]
impl<O: IsA<RTSPSession>> RTSPSessionExt for O
[src]fn allow_expire(&self)
[src]
fn filter(
&self,
func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>
) -> Vec<RTSPSessionMedia>
[src]
&self,
func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>
) -> Vec<RTSPSessionMedia>
fn header(&self) -> Option<GString>
[src]
fn media(&self, path: &str) -> (Option<RTSPSessionMedia>, i32)
[src]
fn sessionid(&self) -> Option<GString>
[src]
fn timeout(&self) -> u32
[src]
fn is_expired_usec(&self, now: i64) -> bool
[src]
fn manage_media<P: IsA<RTSPMedia>>(
&self,
path: &str,
media: &P
) -> Result<RTSPSessionMedia, BoolError>
[src]
&self,
path: &str,
media: &P
) -> Result<RTSPSessionMedia, BoolError>
fn next_timeout_usec(&self, now: i64) -> i32
[src]
fn prevent_expire(&self)
[src]
fn release_media<P: IsA<RTSPSessionMedia>>(&self, media: &P) -> bool
[src]
fn set_timeout(&self, timeout: u32)
[src]
fn touch(&self)
[src]
fn extra_timeout(&self) -> u32
[src]
fn set_extra_timeout(&self, extra_timeout: u32)
[src]
fn is_timeout_always_visible(&self) -> bool
[src]
fn set_timeout_always_visible(&self, timeout_always_visible: bool)
[src]
fn connect_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId