Trait gstreamer_rtsp_server::prelude::RTSPStreamExt
source · pub trait RTSPStreamExt: IsA<RTSPStream> + Sealed + 'static {
Show 86 methods
// Provided methods
fn add_multicast_client_address(
&self,
destination: &str,
rtp_port: u32,
rtcp_port: u32,
family: SocketFamily,
) -> bool { ... }
fn add_transport(
&self,
trans: &impl IsA<RTSPStreamTransport>,
) -> Result<(), BoolError> { ... }
fn address_pool(&self) -> Option<RTSPAddressPool> { ... }
fn buffer_size(&self) -> u32 { ... }
fn caps(&self) -> Option<Caps> { ... }
fn control(&self) -> Option<GString> { ... }
fn current_seqnum(&self) -> u16 { ... }
fn dscp_qos(&self) -> i32 { ... }
fn index(&self) -> u32 { ... }
fn joined_bin(&self) -> Option<Bin> { ... }
fn max_mcast_ttl(&self) -> u32 { ... }
fn mtu(&self) -> u32 { ... }
fn multicast_address(&self, family: SocketFamily) -> Option<RTSPAddress> { ... }
fn multicast_client_addresses(&self) -> GString { ... }
fn multicast_iface(&self) -> Option<GString> { ... }
fn profiles(&self) -> RTSPProfile { ... }
fn protocols(&self) -> RTSPLowerTrans { ... }
fn pt(&self) -> u32 { ... }
fn publish_clock_mode(&self) -> RTSPPublishClockMode { ... }
fn is_rate_control(&self) -> bool { ... }
fn rates(&self) -> Option<(f64, f64)> { ... }
fn retransmission_pt(&self) -> u32 { ... }
fn retransmission_time(&self) -> Option<ClockTime> { ... }
fn rtcp_multicast_socket(&self, family: SocketFamily) -> Option<Socket> { ... }
fn rtcp_socket(&self, family: SocketFamily) -> Option<Socket> { ... }
fn rtp_multicast_socket(&self, family: SocketFamily) -> Option<Socket> { ... }
fn rtp_socket(&self, family: SocketFamily) -> Option<Socket> { ... }
fn rtpinfo(&self) -> Option<(u32, u32, u32, Option<ClockTime>)> { ... }
fn rtpsession(&self) -> Option<Object> { ... }
fn sinkpad(&self) -> Option<Pad> { ... }
fn srcpad(&self) -> Option<Pad> { ... }
fn srtp_encoder(&self) -> Option<Element> { ... }
fn ssrc(&self) -> u32 { ... }
fn is_ulpfec_enabled(&self) -> bool { ... }
fn ulpfec_percentage(&self) -> u32 { ... }
fn ulpfec_pt(&self) -> u32 { ... }
fn handle_keymgmt(&self, keymgmt: &str) -> bool { ... }
fn has_control(&self, control: Option<&str>) -> bool { ... }
fn is_bind_mcast_address(&self) -> bool { ... }
fn is_blocking(&self) -> bool { ... }
fn is_client_side(&self) -> bool { ... }
fn is_complete(&self) -> bool { ... }
fn is_receiver(&self) -> bool { ... }
fn is_sender(&self) -> bool { ... }
fn join_bin(
&self,
bin: &impl IsA<Bin>,
rtpbin: &impl IsA<Element>,
state: State,
) -> Result<(), BoolError> { ... }
fn leave_bin(
&self,
bin: &impl IsA<Bin>,
rtpbin: &impl IsA<Element>,
) -> Result<(), BoolError> { ... }
fn recv_rtcp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> { ... }
fn recv_rtp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> { ... }
fn remove_transport(
&self,
trans: &impl IsA<RTSPStreamTransport>,
) -> Result<(), BoolError> { ... }
fn request_aux_receiver(&self, sessid: u32) -> Option<Element> { ... }
fn request_aux_sender(&self, sessid: u32) -> Option<Element> { ... }
fn request_ulpfec_decoder(
&self,
rtpbin: &impl IsA<Element>,
sessid: u32,
) -> Option<Element> { ... }
fn request_ulpfec_encoder(&self, sessid: u32) -> Option<Element> { ... }
fn reserve_address(
&self,
address: &str,
port: u32,
n_ports: u32,
ttl: u32,
) -> Option<RTSPAddress> { ... }
fn seekable(&self) -> bool { ... }
fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>) { ... }
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) { ... }
fn set_blocked(&self, blocked: bool) -> Result<(), BoolError> { ... }
fn set_buffer_size(&self, size: u32) { ... }
fn set_client_side(&self, client_side: bool) { ... }
fn set_control(&self, control: Option<&str>) { ... }
fn set_dscp_qos(&self, dscp_qos: i32) { ... }
fn set_max_mcast_ttl(&self, ttl: u32) -> bool { ... }
fn set_mtu(&self, mtu: u32) { ... }
fn set_multicast_iface(&self, multicast_iface: Option<&str>) { ... }
fn set_profiles(&self, profiles: RTSPProfile) { ... }
fn set_protocols(&self, protocols: RTSPLowerTrans) { ... }
fn set_pt_map(&self, pt: u32, caps: &Caps) { ... }
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) { ... }
fn set_rate_control(&self, enabled: bool) { ... }
fn set_retransmission_pt(&self, rtx_pt: u32) { ... }
fn set_retransmission_time(&self, time: impl Into<Option<ClockTime>>) { ... }
fn set_seqnum_offset(&self, seqnum: u16) { ... }
fn set_ulpfec_percentage(&self, percentage: u32) { ... }
fn set_ulpfec_pt(&self, pt: u32) { ... }
fn transport_filter(
&self,
func: Option<&mut dyn FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult>,
) -> Vec<RTSPStreamTransport> { ... }
fn unblock_linked(&self) -> Result<(), BoolError> { ... }
fn unblock_rtcp(&self) { ... }
fn update_crypto(
&self,
ssrc: u32,
crypto: Option<&Caps>,
) -> Result<(), BoolError> { ... }
fn verify_mcast_ttl(&self, ttl: u32) -> bool { ... }
fn connect_new_rtcp_encoder<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_new_rtp_encoder<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_new_rtp_rtcp_decoder<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_control_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn add_multicast_client_address(
&self,
destination: &str,
rtp_port: u32,
rtcp_port: u32,
family: SocketFamily,
) -> bool
fn add_multicast_client_address( &self, destination: &str, rtp_port: u32, rtcp_port: u32, family: SocketFamily, ) -> bool
Add multicast client address to stream. At this point, the sockets that
will stream RTP and RTCP data to destination
are supposed to be
allocated.
§destination
a multicast address to add
§rtp_port
RTP port
§rtcp_port
RTCP port
§family
socket family
§Returns
true
if destination
can be addedd and handled by self
.
sourcefn add_transport(
&self,
trans: &impl IsA<RTSPStreamTransport>,
) -> Result<(), BoolError>
fn add_transport( &self, trans: &impl IsA<RTSPStreamTransport>, ) -> Result<(), BoolError>
sourcefn address_pool(&self) -> Option<RTSPAddressPool>
fn address_pool(&self) -> Option<RTSPAddressPool>
Get the RTSPAddressPool
used as the address pool of self
.
§Returns
the RTSPAddressPool
of self
.
g_object_unref()
after usage.
sourcefn buffer_size(&self) -> u32
fn buffer_size(&self) -> u32
fn current_seqnum(&self) -> u16
sourcefn dscp_qos(&self) -> i32
fn dscp_qos(&self) -> i32
Get the configured DSCP QoS in of the outgoing sockets.
§Returns
the DSCP QoS value of the outgoing sockets, or -1 if disbled.
sourcefn joined_bin(&self) -> Option<Bin>
fn joined_bin(&self) -> Option<Bin>
sourcefn max_mcast_ttl(&self) -> u32
fn max_mcast_ttl(&self) -> u32
Get the the maximum time-to-live value of outgoing multicast packets.
§Returns
the maximum time-to-live value of outgoing multicast packets.
sourcefn multicast_address(&self, family: SocketFamily) -> Option<RTSPAddress>
fn multicast_address(&self, family: SocketFamily) -> Option<RTSPAddress>
Get the multicast address of self
for family
. The original
RTSPAddress
is cached and copy is returned, so freeing the return value
won’t release the address from the pool.
§family
§Returns
the RTSPAddress
of self
or None
when no address could be allocated. gst_rtsp_address_free()
after usage.
sourcefn multicast_client_addresses(&self) -> GString
fn multicast_client_addresses(&self) -> GString
Get all multicast client addresses that RTP data will be sent to
§Returns
A comma separated list of host:port pairs with destinations
sourcefn multicast_iface(&self) -> Option<GString>
fn multicast_iface(&self) -> Option<GString>
Get the multicast interface used for self
.
§Returns
the multicast interface for self
.
g_free()
after usage.
sourcefn profiles(&self) -> RTSPProfile
fn profiles(&self) -> RTSPProfile
sourcefn protocols(&self) -> RTSPLowerTrans
fn protocols(&self) -> RTSPLowerTrans
sourcefn publish_clock_mode(&self) -> RTSPPublishClockMode
fn publish_clock_mode(&self) -> RTSPPublishClockMode
Gets if and how the stream clock should be published according to RFC7273.
§Returns
The GstRTSPPublishClockMode
sourcefn is_rate_control(&self) -> bool
fn is_rate_control(&self) -> bool
§Returns
whether self
will follow the Rate-Control=no behaviour as specified
in the ONVIF replay spec.
sourcefn retransmission_pt(&self) -> u32
fn retransmission_pt(&self) -> u32
sourcefn retransmission_time(&self) -> Option<ClockTime>
fn retransmission_time(&self) -> Option<ClockTime>
Get the amount of time to store retransmission data.
§Returns
the amount of time to store retransmission data.
sourcefn rtcp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
fn rtcp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
sourcefn rtcp_socket(&self, family: SocketFamily) -> Option<Socket>
fn rtcp_socket(&self, family: SocketFamily) -> Option<Socket>
sourcefn rtp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
fn rtp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
sourcefn rtp_socket(&self, family: SocketFamily) -> Option<Socket>
fn rtp_socket(&self, family: SocketFamily) -> Option<Socket>
sourcefn rtpsession(&self) -> Option<Object>
fn rtpsession(&self) -> Option<Object>
sourcefn srtp_encoder(&self) -> Option<Element>
fn srtp_encoder(&self) -> Option<Element>
fn is_ulpfec_enabled(&self) -> bool
sourcefn ulpfec_percentage(&self) -> u32
fn ulpfec_percentage(&self) -> u32
§Returns
the amount of redundancy applied when creating ULPFEC protection packets.
sourcefn handle_keymgmt(&self, keymgmt: &str) -> bool
fn handle_keymgmt(&self, keymgmt: &str) -> bool
sourcefn has_control(&self, control: Option<&str>) -> bool
fn has_control(&self, control: Option<&str>) -> bool
sourcefn is_bind_mcast_address(&self) -> bool
fn is_bind_mcast_address(&self) -> bool
sourcefn is_blocking(&self) -> bool
fn is_blocking(&self) -> bool
sourcefn is_client_side(&self) -> bool
fn is_client_side(&self) -> bool
sourcefn is_complete(&self) -> bool
fn is_complete(&self) -> bool
sourcefn is_receiver(&self) -> bool
fn is_receiver(&self) -> bool
sourcefn join_bin(
&self,
bin: &impl IsA<Bin>,
rtpbin: &impl IsA<Element>,
state: State,
) -> Result<(), BoolError>
fn join_bin( &self, bin: &impl IsA<Bin>, rtpbin: &impl IsA<Element>, state: State, ) -> Result<(), BoolError>
Join the gst::Bin
bin
that contains the element rtpbin
.
self
will link to rtpbin
, which must be inside bin
. The elements
added to bin
will be set to the state given in state
.
§bin
a gst::Bin
to join
§rtpbin
a rtpbin element in bin
§state
the target state of the new elements
§Returns
true
on success.
sourcefn leave_bin(
&self,
bin: &impl IsA<Bin>,
rtpbin: &impl IsA<Element>,
) -> Result<(), BoolError>
fn leave_bin( &self, bin: &impl IsA<Bin>, rtpbin: &impl IsA<Element>, ) -> Result<(), BoolError>
sourcefn recv_rtcp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
fn recv_rtcp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
sourcefn recv_rtp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
fn recv_rtp(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
sourcefn remove_transport(
&self,
trans: &impl IsA<RTSPStreamTransport>,
) -> Result<(), BoolError>
fn remove_transport( &self, trans: &impl IsA<RTSPStreamTransport>, ) -> Result<(), BoolError>
sourcefn request_aux_receiver(&self, sessid: u32) -> Option<Element>
fn request_aux_receiver(&self, sessid: u32) -> Option<Element>
sourcefn request_aux_sender(&self, sessid: u32) -> Option<Element>
fn request_aux_sender(&self, sessid: u32) -> Option<Element>
sourcefn request_ulpfec_decoder(
&self,
rtpbin: &impl IsA<Element>,
sessid: u32,
) -> Option<Element>
fn request_ulpfec_decoder( &self, rtpbin: &impl IsA<Element>, sessid: u32, ) -> Option<Element>
sourcefn request_ulpfec_encoder(&self, sessid: u32) -> Option<Element>
fn request_ulpfec_encoder(&self, sessid: u32) -> Option<Element>
sourcefn reserve_address(
&self,
address: &str,
port: u32,
n_ports: u32,
ttl: u32,
) -> Option<RTSPAddress>
fn reserve_address( &self, address: &str, port: u32, n_ports: u32, ttl: u32, ) -> Option<RTSPAddress>
Reserve address
and port
as the address and port of self
. The original
RTSPAddress
is cached and copy is returned, so freeing the return value
won’t release the address from the pool.
§address
an address
§port
a port
§n_ports
n_ports
§ttl
a TTL
§Returns
the RTSPAddress
of self
or None
when
the address could not be reserved. gst_rtsp_address_free()
after
usage.
sourcefn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>)
fn set_address_pool(&self, pool: Option<&impl IsA<RTSPAddressPool>>)
sourcefn set_bind_mcast_address(&self, bind_mcast_addr: bool)
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.
§bind_mcast_addr
the new value
sourcefn set_buffer_size(&self, size: u32)
fn set_buffer_size(&self, size: u32)
Set the size of the UDP transmission buffer (in bytes) Needs to be set before the stream is joined to a bin.
§size
the buffer size
sourcefn set_client_side(&self, client_side: bool)
fn set_client_side(&self, client_side: bool)
Sets the RTSPStream
as a ‘client side’ stream - used for sending
streams to an RTSP server via RECORD. This has the practical effect
of changing which UDP port numbers are used when setting up the local
side of the stream sending to be either the ‘server’ or ‘client’ pair
of a configured UDP transport.
§client_side
TRUE if this RTSPStream
is running on the ‘client’ side of
an RTSP connection.
sourcefn set_control(&self, control: Option<&str>)
fn set_control(&self, control: Option<&str>)
sourcefn set_dscp_qos(&self, dscp_qos: i32)
fn set_dscp_qos(&self, dscp_qos: i32)
Configure the dscp qos of the outgoing sockets to dscp_qos
.
§dscp_qos
a new dscp qos value (0-63, or -1 to disable)
sourcefn set_max_mcast_ttl(&self, ttl: u32) -> bool
fn set_max_mcast_ttl(&self, ttl: u32) -> bool
sourcefn set_multicast_iface(&self, multicast_iface: Option<&str>)
fn set_multicast_iface(&self, multicast_iface: Option<&str>)
sourcefn set_profiles(&self, profiles: RTSPProfile)
fn set_profiles(&self, profiles: RTSPProfile)
sourcefn set_protocols(&self, protocols: RTSPLowerTrans)
fn set_protocols(&self, protocols: RTSPLowerTrans)
sourcefn set_pt_map(&self, pt: u32, caps: &Caps)
fn set_pt_map(&self, pt: u32, caps: &Caps)
sourcefn set_publish_clock_mode(&self, mode: RTSPPublishClockMode)
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode)
Sets if and how the stream clock should be published according to RFC7273.
§mode
the clock publish mode
sourcefn set_rate_control(&self, enabled: bool)
fn set_rate_control(&self, enabled: bool)
Define whether self
will follow the Rate-Control=no behaviour as specified
in the ONVIF replay spec.
sourcefn set_retransmission_pt(&self, rtx_pt: u32)
fn set_retransmission_pt(&self, rtx_pt: u32)
sourcefn set_retransmission_time(&self, time: impl Into<Option<ClockTime>>)
fn set_retransmission_time(&self, time: impl Into<Option<ClockTime>>)
fn set_seqnum_offset(&self, seqnum: u16)
sourcefn set_ulpfec_percentage(&self, percentage: u32)
fn set_ulpfec_percentage(&self, percentage: u32)
Sets the amount of redundancy to apply when creating ULPFEC protection packets.
sourcefn set_ulpfec_pt(&self, pt: u32)
fn set_ulpfec_pt(&self, pt: u32)
Set the payload type to be used for ULPFEC protection packets
sourcefn transport_filter(
&self,
func: Option<&mut dyn FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult>,
) -> Vec<RTSPStreamTransport>
fn transport_filter( &self, func: Option<&mut dyn FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult>, ) -> Vec<RTSPStreamTransport>
Call func
for each transport managed by self
. The result value of func
determines what happens to the transport. func
will be called with self
locked so no further actions on self
can be performed from func
.
If func
returns RTSPFilterResult::Remove
, the transport will be removed from
self
.
If func
returns RTSPFilterResult::Keep
, the transport will remain in self
.
If func
returns RTSPFilterResult::Ref
, the transport 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 each transport.
§func
a callback
§Returns
a GList
with all
transports for which func
returned RTSPFilterResult::Ref
. After usage, each
element in the GList
should be unreffed before the list is freed.
fn unblock_linked(&self) -> Result<(), BoolError>
sourcefn unblock_rtcp(&self)
fn unblock_rtcp(&self)
Remove blocking probe from the RTCP source. When creating an UDP source for RTCP it is initially blocked until this function is called. This functions should be called once the pipeline is ready for handling RTCP packets.
sourcefn update_crypto(
&self,
ssrc: u32,
crypto: Option<&Caps>,
) -> Result<(), BoolError>
fn update_crypto( &self, ssrc: u32, crypto: Option<&Caps>, ) -> Result<(), BoolError>
Update the new crypto information for ssrc
in self
. If information
for ssrc
did not exist, it will be added. If information
for ssrc
existed, it will be replaced. If crypto
is None
, it will
be removed from self
.
§ssrc
the SSRC
§crypto
a gst::Caps
with crypto info
§Returns
true
if crypto
could be updated