Trait gstreamer_rtsp_server::prelude::RTSPAddressPoolExt[][src]

pub trait RTSPAddressPoolExt: 'static {
    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; }

Trait containing all RTSPAddressPool methods.

Implementors

crate::RTSPAddressPool

Required methods

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

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 crate::RTSPAddress that should be freed with gst_rtsp_address_free after use or None when no address could be acquired.

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

Adds the addresses from min_addess to max_address (inclusive) to self. The valid port range for the addresses will be from min_port to max_port inclusive.

When ttl is 0, min_address and max_address should be unicast addresses. min_address and max_address can be set to GST_RTSP_ADDRESS_POOL_ANY_IPV4 or GST_RTSP_ADDRESS_POOL_ANY_IPV6 to bind to all available IPv4 or IPv6 addresses.

When ttl > 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.

fn clear(&self)[src]

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

fn dump(&self)[src]

Dump the free and allocated addresses to stdout.

fn has_unicast_addresses(&self) -> bool[src]

Used to know if the pool includes any unicast addresses.

Returns

true if the pool includes any unicast addresses, false otherwise

Loading content...

Implementors

impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O[src]

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

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

fn clear(&self)[src]

fn dump(&self)[src]

fn has_unicast_addresses(&self) -> bool[src]

Loading content...