Trait gstreamer_rtsp_server::prelude::RTSPSessionExt

source ·
pub trait RTSPSessionExt:
    IsA<RTSPSession>
    + Sealed
    + 'static {
Show 19 methods // Provided methods fn allow_expire(&self) { ... } fn filter( &self, func: Option<&mut dyn FnMut(&RTSPSession, &RTSPSessionMedia) -> RTSPFilterResult>, ) -> Vec<RTSPSessionMedia> { ... } fn header(&self) -> Option<GString> { ... } fn sessionid(&self) -> Option<GString> { ... } fn timeout(&self) -> u32 { ... } fn is_expired_usec(&self, now: i64) -> bool { ... } fn manage_media( &self, path: &str, media: impl IsA<RTSPMedia>, ) -> RTSPSessionMedia { ... } fn next_timeout_usec(&self, now: i64) -> i32 { ... } fn prevent_expire(&self) { ... } fn release_media(&self, media: &impl IsA<RTSPSessionMedia>) -> 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 { ... }
}
Expand description

Trait containing all RTSPSession methods.

§Implementors

RTSPSession

Provided Methods§

source

fn allow_expire(&self)

Allow self to expire. This method must be called an equal amount of time as prevent_expire().

source

fn filter( &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 RTSPFilterResult::Remove, the media will be removed from self.

If func returns RTSPFilterResult::Keep, the media will remain in self.

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

When func is None, RTSPFilterResult::Ref will be assumed for all media.

§func

a callback

§Returns

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

source

fn header(&self) -> Option<GString>

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

§Returns

the Session header of self. g_free() after usage.

source

fn sessionid(&self) -> Option<GString>

Get the sessionid of self.

§Returns

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

source

fn timeout(&self) -> u32

Get the timeout value of self.

§Returns

the timeout of self in seconds.

source

fn is_expired_usec(&self, now: i64) -> bool

Check if self timeout out.

§now

the current monotonic time

§Returns

true if self timed out

source

fn manage_media( &self, path: &str, media: impl IsA<RTSPMedia>, ) -> RTSPSessionMedia

Manage the media object obj in self. path will be used to retrieve this media from the session with RTSPSessionExtManual::media().

Ownership is taken from media.

§path

the path for the media

§media

a RTSPMedia

§Returns

a new RTSPSessionMedia object.

source

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.

source

fn prevent_expire(&self)

Prevent self from expiring.

source

fn release_media(&self, media: &impl IsA<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.

source

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

source

fn touch(&self)

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

source

fn extra_timeout(&self) -> u32

source

fn set_extra_timeout(&self, extra_timeout: u32)

source

fn is_timeout_always_visible(&self) -> bool

source

fn set_timeout_always_visible(&self, timeout_always_visible: bool)

source

fn connect_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_timeout_always_visible_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§