Skip to main content

RTSPAddressPoolExt

Trait RTSPAddressPoolExt 

Source
pub trait RTSPAddressPoolExt: IsA<RTSPAddressPool> + 'static {
    // Provided methods
    fn acquire_address(
        &self,
        flags: RTSPAddressFlags,
        n_ports: i32,
    ) -> Result<RTSPAddress, BoolError> { ... }
    fn add_range(
        &self,
        min_address: &str,
        max_address: &str,
        min_port: u16,
        max_port: u16,
        ttl: u8,
    ) -> Result<(), BoolError> { ... }
    fn clear(&self) { ... }
    fn dump(&self) { ... }
    fn has_unicast_addresses(&self) -> bool { ... }
}
Expand description

Trait containing all RTSPAddressPool methods.

§Implementors

RTSPAddressPool

Provided Methods§

Source

fn acquire_address( &self, flags: RTSPAddressFlags, n_ports: i32, ) -> Result<RTSPAddress, BoolError>

Take an address and ports from self. flags can be used to control the allocation. n_ports consecutive ports will be allocated of which the first one can be found in port.

§flags

flags

§n_ports

the amount of ports

§Returns

a RTSPAddress that should be freed with gst_rtsp_address_free after use or None when no address could be acquired.

Source

fn add_range( &self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8, ) -> Result<(), BoolError>

0, min_address and max_address should be multicast addresses.

§min_address

a minimum address to add

§max_address

a maximum address to add

§min_port

the minimum port

§max_port

the maximum port

§ttl

a TTL or 0 for unicast addresses

§Returns

true if the addresses could be added.

Source

fn clear(&self)

Clear all addresses in self. There should be no outstanding allocations.

Source

fn dump(&self)

Dump the free and allocated addresses to stdout.

Source

fn has_unicast_addresses(&self) -> bool

Used to know if the pool includes any unicast addresses.

§Returns

true if the pool includes any unicast addresses, false otherwise

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§