[][src]Trait gstreamer_rtsp_server::RTSPMediaExt

pub trait RTSPMediaExt: 'static {
    fn collect_streams(&self);
fn create_stream<P: IsA<Element>, Q: IsA<Pad>>(
        &self,
        payloader: &P,
        pad: &Q
    ) -> Option<RTSPStream>;
fn find_stream(&self, control: &str) -> Option<RTSPStream>;
fn get_address_pool(&self) -> Option<RTSPAddressPool>;
fn get_base_time(&self) -> ClockTime;
fn get_buffer_size(&self) -> u32;
fn get_clock(&self) -> Option<Clock>;
fn get_do_retransmission(&self) -> bool;
fn get_element(&self) -> Option<Element>;
fn get_latency(&self) -> u32;
fn get_max_mcast_ttl(&self) -> u32;
fn get_multicast_iface(&self) -> Option<GString>;
fn get_profiles(&self) -> RTSPProfile;
fn get_protocols(&self) -> RTSPLowerTrans;
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode;
fn get_range_string(
        &self,
        play: bool,
        unit: RTSPRangeUnit
    ) -> Option<GString>;
fn get_retransmission_time(&self) -> ClockTime;
fn get_status(&self) -> RTSPMediaStatus;
fn get_stream(&self, idx: u32) -> Option<RTSPStream>;
fn get_suspend_mode(&self) -> RTSPSuspendMode;
fn get_transport_mode(&self) -> RTSPTransportMode;
fn is_bind_mcast_address(&self) -> bool;
fn is_eos_shutdown(&self) -> bool;
fn is_reusable(&self) -> bool;
fn is_shared(&self) -> bool;
fn is_stop_on_disconnect(&self) -> bool;
fn is_time_provider(&self) -> bool;
fn n_streams(&self) -> u32;
fn prepare(&self, thread: Option<&RTSPThread>) -> Result<(), BoolError>;
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
fn set_bind_mcast_address(&self, bind_mcast_addr: bool);
fn set_buffer_size(&self, size: u32);
fn set_clock<P: IsA<Clock>>(&self, clock: Option<&P>);
fn set_do_retransmission(&self, do_retransmission: bool);
fn set_eos_shutdown(&self, eos_shutdown: bool);
fn set_latency(&self, latency: u32);
fn set_max_mcast_ttl(&self, ttl: u32) -> bool;
fn set_multicast_iface(&self, multicast_iface: Option<&str>);
fn set_pipeline_state(&self, state: State);
fn set_profiles(&self, profiles: RTSPProfile);
fn set_protocols(&self, protocols: RTSPLowerTrans);
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode);
fn set_retransmission_time(&self, time: ClockTime);
fn set_reusable(&self, reusable: bool);
fn set_shared(&self, shared: bool);
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool);
fn set_suspend_mode(&self, mode: RTSPSuspendMode);
fn set_transport_mode(&self, mode: RTSPTransportMode);
fn suspend(&self) -> Result<(), BoolError>;
fn unprepare(&self) -> Result<(), BoolError>;
fn unsuspend(&self) -> Result<(), BoolError>;
fn use_time_provider(&self, time_provider: bool);
fn get_property_bind_mcast_address(&self) -> bool;
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool);
fn get_property_eos_shutdown(&self) -> bool;
fn get_property_max_mcast_ttl(&self) -> u32;
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32);
fn get_property_reusable(&self) -> bool;
fn get_property_shared(&self) -> bool;
fn get_property_stop_on_disconnect(&self) -> bool;
fn set_property_time_provider(&self, time_provider: bool);
fn connect_new_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_new_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_prepared<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_removed_stream<F: Fn(&Self, &RTSPStream) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_target_state<F: Fn(&Self, i32) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_eos_shutdown_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_reusable_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_shared_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_stop_on_disconnect_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_suspend_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_time_provider_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_transport_mode_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all RTSPMedia methods.

Implementors

RTSPMedia

Required methods

fn collect_streams(&self)

Find all payloader elements, they should be named pay%d in the element of self, and create GstRTSPStreams for them.

Collect all dynamic elements, named dynpay%d, and add them to the list of dynamic elements.

Find all depayloader elements, they should be named depay%d in the element of self, and create GstRTSPStreams for them.

fn create_stream<P: IsA<Element>, Q: IsA<Pad>>(
    &self,
    payloader: &P,
    pad: &Q
) -> Option<RTSPStream>

Create a new stream in self that provides RTP data on pad. pad should be a pad of an element inside self->element.

payloader

a gst::Element

pad

a gst::Pad

Returns

a new RTSPStream that remains valid for as long as self exists.

fn find_stream(&self, control: &str) -> Option<RTSPStream>

Find a stream in self with control as the control uri.

control

the control of the stream

Returns

the RTSPStream with control uri control or None when a stream with that control did not exist.

fn get_address_pool(&self) -> Option<RTSPAddressPool>

Get the RTSPAddressPool used as the address pool of self.

Returns

the RTSPAddressPool of self. gobject::ObjectExt::unref after usage.

fn get_base_time(&self) -> ClockTime

Get the base_time that is used by the pipeline in self.

self must be prepared before this method returns a valid base_time.

Returns

the base_time used by self.

fn get_buffer_size(&self) -> u32

Get the kernel UDP buffer size.

Returns

the kernel UDP buffer size.

fn get_clock(&self) -> Option<Clock>

Get the clock that is used by the pipeline in self.

self must be prepared before this method returns a valid clock object.

Returns

the gst::Clock used by self. unref after usage.

fn get_do_retransmission(&self) -> bool

Feature: v1_16

Returns

Whether retransmission requests will be sent

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

Get the element that was used when constructing self.

Returns

a gst::Element. Unref after usage.

fn get_latency(&self) -> u32

Get the latency that is used for receiving media.

Returns

latency in milliseconds

fn get_max_mcast_ttl(&self) -> u32

Get the the maximum time-to-live value of outgoing multicast packets.

Feature: v1_16

Returns

the maximum time-to-live value of outgoing multicast packets.

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

Get the multicast interface used for self.

Returns

the multicast interface for self. g_free after usage.

fn get_profiles(&self) -> RTSPProfile

Get the allowed profiles of self.

Returns

a gst_rtsp::RTSPProfile

fn get_protocols(&self) -> RTSPLowerTrans

Get the allowed protocols of self.

Returns

a gst_rtsp::RTSPLowerTrans

fn get_publish_clock_mode(&self) -> RTSPPublishClockMode

Gets if and how the media clock should be published according to RFC7273.

Returns

The GstRTSPPublishClockMode

fn get_range_string(&self, play: bool, unit: RTSPRangeUnit) -> Option<GString>

Get the current range as a string. self must be prepared with gst_rtsp_media_prepare ().

play

for the PLAY request

unit

the unit to use for the string

Returns

The range as a string, g_free after usage.

fn get_retransmission_time(&self) -> ClockTime

Get the amount of time to store retransmission data.

Returns

the amount of time to store retransmission data.

fn get_status(&self) -> RTSPMediaStatus

Get the status of self. When self is busy preparing, this function waits until self is prepared or in error.

Returns

the status of self.

fn get_stream(&self, idx: u32) -> Option<RTSPStream>

Retrieve the stream with index idx from self.

idx

the stream index

Returns

the RTSPStream at index idx or None when a stream with that index did not exist.

fn get_suspend_mode(&self) -> RTSPSuspendMode

Get how self will be suspended.

Returns

RTSPSuspendMode.

fn get_transport_mode(&self) -> RTSPTransportMode

Check if the pipeline for self can be used for PLAY or RECORD methods.

Returns

The transport mode.

fn is_bind_mcast_address(&self) -> bool

Check if multicast sockets are configured to be bound to multicast addresses.

Feature: v1_16

Returns

true if multicast sockets are configured to be bound to multicast addresses.

fn is_eos_shutdown(&self) -> bool

Check if the pipeline for self will send an EOS down the pipeline before unpreparing.

Returns

true if the media will send EOS before unpreparing.

fn is_reusable(&self) -> bool

Check if the pipeline for self can be reused after an unprepare.

Returns

true if the media can be reused

fn is_shared(&self) -> bool

Check if the pipeline for self can be shared between multiple clients.

Returns

true if the media can be shared between clients.

fn is_stop_on_disconnect(&self) -> bool

Check if the pipeline for self will be stopped when a client disconnects without sending TEARDOWN.

Returns

true if the media will be stopped when a client disconnects without sending TEARDOWN.

fn is_time_provider(&self) -> bool

Check if self can provide a gst_net::NetTimeProvider for its pipeline clock.

Use RTSPMediaExt::get_time_provider to get the network clock.

Returns

true if self can provide a gst_net::NetTimeProvider.

fn n_streams(&self) -> u32

Get the number of streams in this media.

Returns

The number of streams.

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

Prepare self for streaming. This function will create the objects to manage the streaming. A pipeline must have been set on self with RTSPMediaExt::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.

fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>)

configure pool to be used as the address pool of self.

pool

a RTSPAddressPool

fn set_bind_mcast_address(&self, bind_mcast_addr: bool)

Decide whether the multicast socket should be bound to a multicast address or INADDR_ANY.

Feature: v1_16

bind_mcast_addr

the new value

fn set_buffer_size(&self, size: u32)

Set the kernel UDP buffer size.

size

the new value

fn set_clock<P: IsA<Clock>>(&self, clock: Option<&P>)

Configure the clock used for the media.

clock

gst::Clock to be used

fn set_do_retransmission(&self, do_retransmission: bool)

Set whether retransmission requests will be sent

Feature: v1_16

fn set_eos_shutdown(&self, eos_shutdown: bool)

Set or unset if an EOS event will be sent to the pipeline for self before it is unprepared.

eos_shutdown

the new value

fn set_latency(&self, latency: u32)

Configure the latency used for receiving media.

latency

latency in milliseconds

fn set_max_mcast_ttl(&self, ttl: u32) -> bool

Set the maximum time-to-live value of outgoing multicast packets.

Feature: v1_16

ttl

the new multicast ttl value

Returns

true if the requested ttl has been set successfully.

fn set_multicast_iface(&self, multicast_iface: Option<&str>)

configure multicast_iface to be used for self.

multicast_iface

a multicast interface name

fn set_pipeline_state(&self, state: State)

Set the state of the pipeline managed by self to state

state

the target state of the pipeline

fn set_profiles(&self, profiles: RTSPProfile)

Configure the allowed lower transport for self.

profiles

the new flags

fn set_protocols(&self, protocols: RTSPLowerTrans)

Configure the allowed lower transport for self.

protocols

the new flags

fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode)

Sets if and how the media clock should be published according to RFC7273.

mode

the clock publish mode

fn set_retransmission_time(&self, time: ClockTime)

Set the amount of time to store retransmission packets.

time

the new value

fn set_reusable(&self, reusable: bool)

Set or unset if the pipeline for self can be reused after the pipeline has been unprepared.

reusable

the new value

fn set_shared(&self, shared: bool)

Set or unset if the pipeline for self can be shared will multiple clients. When shared is true, client requests for this media will share the media pipeline.

shared

the new value

fn set_stop_on_disconnect(&self, stop_on_disconnect: bool)

Set or unset if the pipeline for self should be stopped when a client disconnects without sending TEARDOWN.

stop_on_disconnect

the new value

fn set_suspend_mode(&self, mode: RTSPSuspendMode)

Control how @ media will be suspended after the SDP has been generated and after a PAUSE request has been performed.

Media must be unprepared when setting the suspend mode.

mode

the new RTSPSuspendMode

fn set_transport_mode(&self, mode: RTSPTransportMode)

Sets if the media pipeline can work in PLAY or RECORD mode

mode

the new value

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

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.

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

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.

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

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.

fn use_time_provider(&self, time_provider: bool)

Set self to provide a gst_net::NetTimeProvider.

time_provider

if a gst_net::NetTimeProvider should be used

fn get_property_bind_mcast_address(&self) -> bool

fn set_property_bind_mcast_address(&self, bind_mcast_address: bool)

fn get_property_eos_shutdown(&self) -> bool

fn get_property_max_mcast_ttl(&self) -> u32

fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32)

fn get_property_reusable(&self) -> bool

fn get_property_shared(&self) -> bool

fn get_property_stop_on_disconnect(&self) -> bool

fn set_property_time_provider(&self, time_provider: bool)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading content...

Implementors

impl<O: IsA<RTSPMedia>> RTSPMediaExt for O[src]

Loading content...