gstreamer_rtsp_server::prelude

Trait RTSPStreamTransportExt

Source
pub trait RTSPStreamTransportExt: IsA<RTSPStreamTransport> + 'static {
Show 16 methods // Provided methods fn rtpinfo( &self, start_time: impl Into<Option<ClockTime>>, ) -> Option<GString> { ... } fn stream(&self) -> Option<RTSPStream> { ... } fn url(&self) -> Option<RTSPUrl> { ... } fn is_timed_out(&self) -> bool { ... } fn keep_alive(&self) { ... } fn message_sent(&self) { ... } fn recv_data( &self, channel: u32, buffer: Buffer, ) -> Result<FlowSuccess, FlowError> { ... } fn send_rtcp(&self, buffer: &Buffer) -> Result<(), BoolError> { ... } fn send_rtp(&self, buffer: &Buffer) -> Result<(), BoolError> { ... } fn set_active(&self, active: bool) -> Result<(), BoolError> { ... } fn set_callbacks<P: Fn(&Buffer, u8) -> bool + 'static, Q: Fn(&Buffer, u8) -> bool + 'static>( &self, send_rtp: P, send_rtcp: Q, ) { ... } fn set_keepalive<P: Fn() + 'static>(&self, keep_alive: P) { ... } fn set_message_sent<P: Fn() + 'static>(&self, message_sent: P) { ... } fn set_message_sent_full<P: Fn(&RTSPStreamTransport) + 'static>( &self, message_sent: P, ) { ... } fn set_timed_out(&self, timedout: bool) { ... } fn set_url(&self, url: Option<&RTSPUrl>) { ... }
}
Expand description

Trait containing all RTSPStreamTransport methods.

§Implementors

RTSPStreamTransport

Provided Methods§

Source

fn rtpinfo(&self, start_time: impl Into<Option<ClockTime>>) -> Option<GString>

Get the RTP-Info string for self and start_time.

§start_time

a star time

§Returns

the RTPInfo string for self and start_time or None when the RTP-Info could not be determined. g_free() after usage.

Source

fn stream(&self) -> Option<RTSPStream>

Get the RTSPStream used when constructing self.

§Returns

the stream used when constructing self.

Source

fn url(&self) -> Option<RTSPUrl>

Get the url configured in self.

§Returns

the url configured in self. It remains valid for as long as self is valid.

Source

fn is_timed_out(&self) -> bool

Check if self is timed out.

§Returns

true if self timed out.

Source

fn keep_alive(&self)

Signal the installed keep_alive callback for self.

Source

fn message_sent(&self)

Signal the installed message_sent / message_sent_full callback for self.

Source

fn recv_data( &self, channel: u32, buffer: Buffer, ) -> Result<FlowSuccess, FlowError>

Receive buffer on channel self.

§channel

a channel

§buffer

a gst::Buffer

§Returns

a gst::FlowReturn. Returns GST_FLOW_NOT_LINKED when channel is not configured in the transport of self.

Source

fn send_rtcp(&self, buffer: &Buffer) -> Result<(), BoolError>

Send buffer to the installed RTCP callback for self.

§buffer

a gst::Buffer

§Returns

true on success

Source

fn send_rtp(&self, buffer: &Buffer) -> Result<(), BoolError>

Send buffer to the installed RTP callback for self.

§buffer

a gst::Buffer

§Returns

true on success

Source

fn set_active(&self, active: bool) -> Result<(), BoolError>

Activate or deactivate datatransfer configured in self.

§active

new state of self

§Returns

true when the state was changed.

Source

fn set_callbacks<P: Fn(&Buffer, u8) -> bool + 'static, Q: Fn(&Buffer, u8) -> bool + 'static>( &self, send_rtp: P, send_rtcp: Q, )

Install callbacks that will be called when data for a stream should be sent to a client. This is usually used when sending RTP/RTCP over TCP.

§send_rtp

a callback called when RTP should be sent

§send_rtcp

a callback called when RTCP should be sent

§notify

called with the user_data when no longer needed.

Source

fn set_keepalive<P: Fn() + 'static>(&self, keep_alive: P)

Install callbacks that will be called when RTCP packets are received from the receiver of self.

§keep_alive

a callback called when the receiver is active

§notify

called with the user_data when no longer needed.

Source

fn set_message_sent<P: Fn() + 'static>(&self, message_sent: P)

Install a callback that will be called when a message has been sent on self.

§message_sent

a callback called when a message has been sent

§notify

called with the user_data when no longer needed

Source

fn set_message_sent_full<P: Fn(&RTSPStreamTransport) + 'static>( &self, message_sent: P, )

Install a callback that will be called when a message has been sent on self.

§message_sent

a callback called when a message has been sent

§notify

called with the user_data when no longer needed

Source

fn set_timed_out(&self, timedout: bool)

Set the timed out state of self to timedout

§timedout

timed out value

Source

fn set_url(&self, url: Option<&RTSPUrl>)

Set url as the client url.

§url

a client gst_rtsp::RTSPUrl

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§