Trait gstreamer_rtsp_server::prelude::RTSPServerExt[][src]

pub trait RTSPServerExt: 'static {
Show methods fn client_filter(
        &self,
        func: Option<&mut dyn FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult>
    ) -> Vec<RTSPClient>;
fn create_socket<P: IsA<Cancellable>>(
        &self,
        cancellable: Option<&P>
    ) -> Result<Socket, Error>;
fn create_source<P: IsA<Cancellable>>(
        &self,
        cancellable: Option<&P>
    ) -> Result<Source, Error>;
fn address(&self) -> Option<GString>;
fn auth(&self) -> Option<RTSPAuth>;
fn backlog(&self) -> i32;
fn bound_port(&self) -> i32;
fn content_length_limit(&self) -> u32;
fn mount_points(&self) -> Option<RTSPMountPoints>;
fn service(&self) -> Option<GString>;
fn session_pool(&self) -> Option<RTSPSessionPool>;
fn thread_pool(&self) -> Option<RTSPThreadPool>;
fn set_address(&self, address: &str);
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>);
fn set_backlog(&self, backlog: i32);
fn set_content_length_limit(&self, limit: u32);
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>);
fn set_service(&self, service: &str);
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>);
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>);
fn transfer_connection<P: IsA<Socket>>(
        &self,
        socket: &P,
        ip: &str,
        port: i32,
        initial_buffer: Option<&str>
    ) -> Result<(), BoolError>;
fn get_property_content_length_limit(&self) -> u32;
fn set_property_content_length_limit(&self, content_length_limit: u32);
fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_bound_port_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_content_length_limit_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_service_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}

Trait containing all RTSPServer methods.

Implementors

crate::RTSPServer

Required methods

fn client_filter(
    &self,
    func: Option<&mut dyn FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult>
) -> Vec<RTSPClient>
[src]

Call func for each client managed by self. The result value of func determines what happens to the client. func will be called with self locked so no further actions on self can be performed from func.

If func returns crate::RTSPFilterResult::Remove, the client will be removed from self.

If func returns crate::RTSPFilterResult::Keep, the client will remain in self.

If func returns crate::RTSPFilterResult::Ref, the client will remain in self but will also be added with an additional ref to the result [crate::glib::List] of this function..

When func is None, crate::RTSPFilterResult::Ref will be assumed for each client.

func

a callback

user_data

user data passed to func

Returns

a [crate::glib::List] with all clients for which func returned crate::RTSPFilterResult::Ref. After usage, each element in the [crate::glib::List] should be unreffed before the list is freed.

fn create_socket<P: IsA<Cancellable>>(
    &self,
    cancellable: Option<&P>
) -> Result<Socket, Error>
[src]

Create a crate::gio::Socket for self. The socket will listen on the configured service.

cancellable

a crate::gio::Cancellable

Returns

the crate::gio::Socket for self or None when an error occurred.

fn create_source<P: IsA<Cancellable>>(
    &self,
    cancellable: Option<&P>
) -> Result<Source, Error>
[src]

Create a crate::glib::Source for self. The new source will have a default GSocketSourceFunc of crate::RTSPServer::io_func().

cancellable if not None can be used to cancel the source, which will cause the source to trigger, reporting the current condition (which is likely 0 unless cancellation happened at the same time as a condition change). You can check for this in the callback using crate::gio::prelude::CancellableExt::is_cancelled().

This takes a reference on self until source is destroyed.

cancellable

a crate::gio::Cancellable or None.

Returns

the crate::glib::Source for self or None when an error occurred. Free with g_source_unref ()

fn address(&self) -> Option<GString>[src]

Get the address on which the server will accept connections.

Returns

the server address. g_free() after usage.

fn auth(&self) -> Option<RTSPAuth>[src]

Get the crate::RTSPAuth used as the authentication manager of self.

Returns

the crate::RTSPAuth of self. [crate::glib::object::ObjectExt::unref()] after usage.

fn backlog(&self) -> i32[src]

The maximum amount of queued requests for the server.

Returns

the server backlog.

fn bound_port(&self) -> i32[src]

Get the port number where the server was bound to.

Returns

the port number

fn content_length_limit(&self) -> u32[src]

This is supported on crate feature v1_18 only.

Get the Content-Length limit of self.

Returns

the Content-Length limit.

fn mount_points(&self) -> Option<RTSPMountPoints>[src]

Get the crate::RTSPMountPoints used as the mount points of self.

Returns

the crate::RTSPMountPoints of self. [crate::glib::object::ObjectExt::unref()] after usage.

fn service(&self) -> Option<GString>[src]

Get the service on which the server will accept connections.

Returns

the service. use g_free() after usage.

fn session_pool(&self) -> Option<RTSPSessionPool>[src]

Get the crate::RTSPSessionPool used as the session pool of self.

Returns

the crate::RTSPSessionPool used for sessions. [crate::glib::object::ObjectExt::unref()] after usage.

fn thread_pool(&self) -> Option<RTSPThreadPool>[src]

Get the crate::RTSPThreadPool used as the thread pool of self.

Returns

the crate::RTSPThreadPool of self. [crate::glib::object::ObjectExt::unref()] after usage.

fn set_address(&self, address: &str)[src]

Configure self to accept connections on the given address.

This function must be called before the server is bound.

address

the address

fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>)[src]

configure auth to be used as the authentication manager of self.

auth

a crate::RTSPAuth

fn set_backlog(&self, backlog: i32)[src]

configure the maximum amount of requests that may be queued for the server.

This function must be called before the server is bound.

backlog

the backlog

fn set_content_length_limit(&self, limit: u32)[src]

This is supported on crate feature v1_18 only.

Define an appropriate request size limit and reject requests exceeding the limit.

fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>)[src]

configure mounts to be used as the mount points of self.

mounts

a crate::RTSPMountPoints

fn set_service(&self, service: &str)[src]

Configure self to accept connections on the given service. service should be a string containing the service name (see services(5)) or a string containing a port number between 1 and 65535.

When service is set to “0”, the server will listen on a random free port. The actual used port can be retrieved with [Self::get_bound_port()].

This function must be called before the server is bound.

service

the service

fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>)[src]

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

pool

a crate::RTSPSessionPool

fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>)[src]

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

pool

a crate::RTSPThreadPool

fn transfer_connection<P: IsA<Socket>>(
    &self,
    socket: &P,
    ip: &str,
    port: i32,
    initial_buffer: Option<&str>
) -> Result<(), BoolError>
[src]

Take an existing network socket and use it for an RTSP connection. This is used when transferring a socket from an HTTP server which should be used as an RTSP over HTTP tunnel. The initial_buffer contains any remaining data that the HTTP server read from the socket while parsing the HTTP header.

socket

a network socket

ip

the IP address of the remote client

port

the port used by the other end

initial_buffer

any initial data that was already read from the socket

Returns

TRUE if all was ok, FALSE if an error occurred.

fn get_property_content_length_limit(&self) -> u32[src]

fn set_property_content_length_limit(&self, content_length_limit: u32)[src]

fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

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

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

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

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

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

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

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

Loading content...

Implementors

impl<O: IsA<RTSPServer>> RTSPServerExt for O[src]

fn client_filter(
    &self,
    func: Option<&mut dyn FnMut(&RTSPServer, &RTSPClient) -> RTSPFilterResult>
) -> Vec<RTSPClient>
[src]

fn create_socket<P: IsA<Cancellable>>(
    &self,
    cancellable: Option<&P>
) -> Result<Socket, Error>
[src]

fn create_source<P: IsA<Cancellable>>(
    &self,
    cancellable: Option<&P>
) -> Result<Source, Error>
[src]

fn address(&self) -> Option<GString>[src]

fn auth(&self) -> Option<RTSPAuth>[src]

fn backlog(&self) -> i32[src]

fn bound_port(&self) -> i32[src]

fn content_length_limit(&self) -> u32[src]

This is supported on crate feature v1_18 only.

fn mount_points(&self) -> Option<RTSPMountPoints>[src]

fn service(&self) -> Option<GString>[src]

fn session_pool(&self) -> Option<RTSPSessionPool>[src]

fn thread_pool(&self) -> Option<RTSPThreadPool>[src]

fn set_address(&self, address: &str)[src]

fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>)[src]

fn set_backlog(&self, backlog: i32)[src]

fn set_content_length_limit(&self, limit: u32)[src]

This is supported on crate feature v1_18 only.

fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>)[src]

fn set_service(&self, service: &str)[src]

fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>)[src]

fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>)[src]

fn transfer_connection<P: IsA<Socket>>(
    &self,
    socket: &P,
    ip: &str,
    port: i32,
    initial_buffer: Option<&str>
) -> Result<(), BoolError>
[src]

fn get_property_content_length_limit(&self) -> u32[src]

fn set_property_content_length_limit(&self, content_length_limit: u32)[src]

fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

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

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

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

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

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

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

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

Loading content...