Trait gstreamer_rtsp_server::RTSPStreamExt [−][src]
pub trait RTSPStreamExt { fn add_transport(
&self,
trans: &RTSPStreamTransport
) -> Result<(), BoolError>; fn get_address_pool(&self) -> Option<RTSPAddressPool>; fn get_buffer_size(&self) -> u32; fn get_caps(&self) -> Option<Caps>; fn get_control(&self) -> Option<String>; fn get_current_seqnum(&self) -> u16; fn get_dscp_qos(&self) -> i32; fn get_index(&self) -> u32; fn get_joined_bin(&self) -> Option<Bin>; fn get_mtu(&self) -> u32; fn get_multicast_address(&self, family: SocketFamily) -> Option<RTSPAddress>; fn get_multicast_iface(&self) -> Option<String>; fn get_profiles(&self) -> RTSPProfile; fn get_protocols(&self) -> RTSPLowerTrans; fn get_pt(&self) -> u32; fn get_publish_clock_mode(&self) -> RTSPPublishClockMode; fn get_retransmission_pt(&self) -> u32; fn get_retransmission_time(&self) -> ClockTime; fn get_rtcp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>; fn get_rtcp_socket(&self, family: SocketFamily) -> Option<Socket>; fn get_rtp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>; fn get_rtp_socket(&self, family: SocketFamily) -> Option<Socket>; fn get_rtpinfo(&self) -> Option<(u32, u32, u32, ClockTime)>; fn get_rtpsession(&self) -> Option<Object>; fn get_sinkpad(&self) -> Option<Pad>; fn get_srcpad(&self) -> Option<Pad>; fn get_srtp_encoder(&self) -> Option<Element>; fn get_ssrc(&self) -> u32; fn has_control<'a, P: Into<Option<&'a str>>>(&self, control: P) -> 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<P: IsA<Bin>, Q: IsA<Element>>(
&self,
bin: &P,
rtpbin: &Q,
state: State
) -> Result<(), BoolError>; fn leave_bin<P: IsA<Bin>, Q: IsA<Element>>(
&self,
bin: &P,
rtpbin: &Q
) -> Result<(), BoolError>; fn recv_rtcp(&self, buffer: &Buffer) -> FlowReturn; fn recv_rtp(&self, buffer: &Buffer) -> FlowReturn; fn remove_transport(
&self,
trans: &RTSPStreamTransport
) -> Result<(), BoolError>; fn request_aux_sender(&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<'a, P: Into<Option<&'a RTSPAddressPool>>>(
&self,
pool: P
); fn set_blocked(&self, blocked: bool) -> bool; fn set_buffer_size(&self, size: u32); fn set_client_side(&self, client_side: bool); fn set_control<'a, P: Into<Option<&'a str>>>(&self, control: P); fn set_dscp_qos(&self, dscp_qos: i32); fn set_mtu(&self, mtu: u32); fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(
&self,
multicast_iface: P
); 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_retransmission_pt(&self, rtx_pt: u32); fn set_retransmission_time(&self, time: ClockTime); fn set_seqnum_offset(&self, seqnum: u16); fn unblock_linked(&self) -> bool; fn update_crypto<'a, P: Into<Option<&'a Caps>>>(
&self,
ssrc: u32,
crypto: P
) -> 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_property_control_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; }
Required Methods
fn add_transport(&self, trans: &RTSPStreamTransport) -> Result<(), BoolError>
Add the transport in trans
to self
. The media of self
will
then also be send to the values configured in trans
.
self
must be joined to a bin.
trans
must contain a valid gst_rtsp::RTSPTransport
.
trans
a RTSPStreamTransport
Returns
true
if trans
was added
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_buffer_size(&self) -> u32
fn get_caps(&self) -> Option<Caps>
fn get_control(&self) -> Option<String>
fn get_current_seqnum(&self) -> u16
fn get_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.
fn get_index(&self) -> u32
fn get_joined_bin(&self) -> Option<Bin>
fn get_mtu(&self) -> u32
fn get_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
the gio::SocketFamily
Returns
the RTSPAddress
of self
or None
when no address could be allocated. RTSPAddress::free
after usage.
fn get_multicast_iface(&self) -> Option<String>
Get the multicast interface used for self
.
Returns
the multicast interface for self
.
g_free
after usage.
fn get_profiles(&self) -> RTSPProfile
fn get_protocols(&self) -> RTSPLowerTrans
fn get_pt(&self) -> u32
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode
Gets if and how the stream clock should be published according to RFC7273.
Returns
The GstRTSPPublishClockMode
fn get_retransmission_pt(&self) -> u32
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_rtcp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
Get the multicast RTCP socket from self
for a family
.
family
the socket family
Returns
the multicast RTCP socket or None
if no
socket could be allocated for family
. Unref after usage
fn get_rtcp_socket(&self, family: SocketFamily) -> Option<Socket>
Get the RTCP socket from self
for a family
.
self
must be joined to a bin.
family
the socket family
Returns
the RTCP socket or None
if no
socket could be allocated for family
. Unref after usage
fn get_rtp_multicast_socket(&self, family: SocketFamily) -> Option<Socket>
Get the multicast RTP socket from self
for a family
.
family
the socket family
Returns
the multicast RTP socket or None
if no
socket could be allocated for family
. Unref after usage
fn get_rtp_socket(&self, family: SocketFamily) -> Option<Socket>
Get the RTP socket from self
for a family
.
self
must be joined to a bin.
family
the socket family
Returns
the RTP socket or None
if no
socket could be allocated for family
. Unref after usage
fn get_rtpinfo(&self) -> Option<(u32, u32, u32, ClockTime)>
Retrieve the current rtptime, seq and running-time. This is used to construct a RTPInfo reply header.
rtptime
result RTP timestamp
seq
result RTP seqnum
clock_rate
the clock rate
running_time
result running-time
Returns
true
when rtptime, seq and running-time could be determined.
fn get_rtpsession(&self) -> Option<Object>
fn get_sinkpad(&self) -> Option<Pad>
fn get_srcpad(&self) -> Option<Pad>
fn get_srtp_encoder(&self) -> Option<Element>
fn get_ssrc(&self) -> u32
Get the SSRC used by the RTP session of this stream. This function can only
be called when self
has been joined.
ssrc
result ssrc
fn has_control<'a, P: Into<Option<&'a str>>>(&self, control: P) -> bool
Check if self
has the control string control
.
control
a control string
Returns
true
is self
has control
as the control string
fn is_blocking(&self) -> bool
fn is_client_side(&self) -> bool
fn is_complete(&self) -> bool
Checks whether the stream is complete, contains the receiver and the sender parts. As the stream contains sink(s) element(s), it's possible to perform seek operations on it.
Returns
true
if the stream contains at least one sink element.
fn is_receiver(&self) -> bool
Checks whether the stream is a receiver.
Returns
true
if the stream is a receiver and false
otherwise.
fn is_sender(&self) -> bool
fn join_bin<P: IsA<Bin>, Q: IsA<Element>>(
&self,
bin: &P,
rtpbin: &Q,
state: State
) -> Result<(), BoolError>
&self,
bin: &P,
rtpbin: &Q,
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.
fn leave_bin<P: IsA<Bin>, Q: IsA<Element>>(
&self,
bin: &P,
rtpbin: &Q
) -> Result<(), BoolError>
&self,
bin: &P,
rtpbin: &Q
) -> Result<(), BoolError>
Remove the elements of self
from bin
.
bin
a gst::Bin
rtpbin
a rtpbin gst::Element
Returns
true
on success.
fn recv_rtcp(&self, buffer: &Buffer) -> FlowReturn
Handle an RTCP buffer for the stream. This method is usually called when a message has been received from a client using the TCP transport.
This function takes ownership of buffer
.
buffer
a gst::Buffer
Returns
a GstFlowReturn.
fn recv_rtp(&self, buffer: &Buffer) -> FlowReturn
Handle an RTP buffer for the stream. This method is usually called when a message has been received from a client using the TCP transport.
This function takes ownership of buffer
.
buffer
a gst::Buffer
Returns
a GstFlowReturn.
fn remove_transport(&self, trans: &RTSPStreamTransport) -> Result<(), BoolError>
Remove the transport in trans
from self
. The media of self
will
not be sent to the values configured in trans
.
self
must be joined to a bin.
trans
must contain a valid gst_rtsp::RTSPTransport
.
trans
a RTSPStreamTransport
Returns
true
if trans
was removed
fn request_aux_sender(&self, sessid: u32) -> Option<Element>
fn reserve_address(
&self,
address: &str,
port: u32,
n_ports: u32,
ttl: u32
) -> Option<RTSPAddress>
&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 be reserved. RTSPAddress::free
after usage.
fn seekable(&self) -> bool
fn set_address_pool<'a, P: Into<Option<&'a RTSPAddressPool>>>(&self, pool: P)
fn set_blocked(&self, blocked: bool) -> bool
Blocks or unblocks the dataflow on self
.
blocked
boolean indicating we should block or unblock
Returns
true
on success
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
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.
fn set_control<'a, P: Into<Option<&'a str>>>(&self, control: P)
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)
fn set_mtu(&self, mtu: u32)
fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(&self, multicast_iface: P)
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)
Sets if and how the stream clock should be published according to RFC7273.
mode
the clock publish mode
fn set_retransmission_pt(&self, rtx_pt: u32)
fn set_retransmission_time(&self, time: ClockTime)
fn set_seqnum_offset(&self, seqnum: u16)
fn unblock_linked(&self) -> bool
fn update_crypto<'a, P: Into<Option<&'a Caps>>>(
&self,
ssrc: u32,
crypto: P
) -> bool
&self,
ssrc: u32,
crypto: P
) -> bool
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
fn connect_new_rtcp_encoder<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_new_rtp_encoder<F: Fn(&Self, &Element) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_control_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RTSPStream> + IsA<Object>> RTSPStreamExt for O