gstreamer_rtsp_server::subclass::prelude

Trait RTSPMediaImpl

Source
pub trait RTSPMediaImpl:
    ObjectImpl
    + ObjectSubclass<Type: IsA<RTSPMedia>>
    + Send
    + Sync {
Show 17 methods // Provided methods fn handle_message(&self, message: &MessageRef) -> bool { ... } fn prepare(&self, thread: &RTSPThread) -> Result<(), LoggableError> { ... } fn unprepare(&self) -> Result<(), LoggableError> { ... } fn suspend(&self) -> Result<(), LoggableError> { ... } fn unsuspend(&self) -> Result<(), LoggableError> { ... } fn query_position(&self) -> Option<ClockTime> { ... } fn query_stop(&self) -> Option<ClockTime> { ... } fn create_rtpbin(&self) -> Option<Element> { ... } fn setup_rtpbin(&self, rtpbin: &Element) -> Result<(), LoggableError> { ... } fn setup_sdp( &self, sdp: &mut SDPMessageRef, info: &SDPInfo, ) -> Result<(), LoggableError> { ... } fn new_stream(&self, stream: &RTSPStream) { ... } fn removed_stream(&self, stream: &RTSPStream) { ... } fn prepared(&self) { ... } fn unprepared(&self) { ... } fn target_state(&self, state: State) { ... } fn new_state(&self, state: State) { ... } fn handle_sdp(&self, sdp: &SDPMessageRef) -> Result<(), LoggableError> { ... }
}

Provided Methods§

Source

fn handle_message(&self, message: &MessageRef) -> bool

handle a message

Source

fn prepare(&self, thread: &RTSPThread) -> Result<(), LoggableError>

Prepare self for streaming. This function will create the objects to manage the streaming. A pipeline must have been set on self with RTSPMediaExtManual::take_pipeline().

It will preroll the pipeline and collect vital information about the streams such as the duration.

§thread

a RTSPThread to run the bus handler or None

§Returns

true on success.

Source

fn unprepare(&self) -> Result<(), LoggableError>

Unprepare self. After this call, the media should be prepared again before it can be used again. If the media is set to be non-reusable, a new instance must be created.

§Returns

true on success.

Source

fn suspend(&self) -> Result<(), LoggableError>

Suspend self. The state of the pipeline managed by self is set to GST_STATE_NULL but all streams are kept. self can be prepared again with RTSPMediaExt::unsuspend()

self must be prepared with RTSPMediaExt::prepare();

§Returns

true on success.

Source

fn unsuspend(&self) -> Result<(), LoggableError>

Unsuspend self if it was in a suspended state. This method does nothing when the media was not in the suspended state.

§Returns

true on success.

Source

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

query the current position in the pipeline

Source

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

query when playback will stop

Source

fn create_rtpbin(&self) -> Option<Element>

Source

fn setup_rtpbin(&self, rtpbin: &Element) -> Result<(), LoggableError>

Source

fn setup_sdp( &self, sdp: &mut SDPMessageRef, info: &SDPInfo, ) -> Result<(), LoggableError>

Add self specific info to sdp. info is used to configure the connection information in the SDP.

§sdp

a GstSDPMessage

§info

a GstSDPInfo

§Returns

TRUE on success.

Source

fn new_stream(&self, stream: &RTSPStream)

Source

fn removed_stream(&self, stream: &RTSPStream)

Source

fn prepared(&self)

Source

fn unprepared(&self)

Source

fn target_state(&self, state: State)

Source

fn new_state(&self, state: State)

Source

fn handle_sdp(&self, sdp: &SDPMessageRef) -> Result<(), LoggableError>

Configure an SDP on self for receiving streams

§sdp

a GstSDPMessage

§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§