gstreamer_rtsp_server::prelude

Trait RTSPSessionMediaExt

Source
pub trait RTSPSessionMediaExt: IsA<RTSPSessionMedia> + 'static {
    // Provided methods
    fn base_time(&self) -> Option<ClockTime> { ... }
    fn media(&self) -> Option<RTSPMedia> { ... }
    fn rtpinfo(&self) -> Option<GString> { ... }
    fn transport(&self, idx: u32) -> Option<RTSPStreamTransport> { ... }
    fn transports(&self) -> Vec<RTSPStreamTransport> { ... }
    fn matches(&self, path: &str) -> Option<i32> { ... }
    fn set_state(&self, state: State) -> Result<(), BoolError> { ... }
}
Expand description

Trait containing all RTSPSessionMedia methods.

§Implementors

RTSPSessionMedia

Provided Methods§

Source

fn base_time(&self) -> Option<ClockTime>

Get the base_time of the RTSPMedia in self

§Returns

the base_time of the media.

Source

fn media(&self) -> Option<RTSPMedia>

Get the RTSPMedia that was used when constructing self

§Returns

the RTSPMedia of self. Remains valid as long as self is valid.

Source

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

Retrieve the RTP-Info header string for all streams in self with configured transports.

§Returns

The RTP-Info as a string or None when no RTP-Info could be generated, g_free() after usage.

Source

fn transport(&self, idx: u32) -> Option<RTSPStreamTransport>

Get a previously created RTSPStreamTransport for the stream at idx.

§idx

the stream index

§Returns

a RTSPStreamTransport that is valid until the session of self is unreffed.

Source

fn transports(&self) -> Vec<RTSPStreamTransport>

Get a list of all available RTSPStreamTransport in this session.

§Returns

a list of RTSPStreamTransport, g_ptr_array_unref () after usage.

Source

fn matches(&self, path: &str) -> Option<i32>

Check if the path of self matches path. It path matches, the amount of matched characters is returned in matched.

§path

a path

§Returns

true when path matches the path of self.

§matched

the amount of matched characters of path

Source

fn set_state(&self, state: State) -> Result<(), BoolError>

Tell the media object self to change to state.

§state

the new state

§Returns

true on success.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§