Trait gstreamer_rtsp_server::RTSPServerExt [−][src]
pub trait RTSPServerExt { fn create_socket<'a, P: Into<Option<&'a Cancellable>>>(
&self,
cancellable: P
) -> Result<Socket, Error>; fn create_source<'a, P: Into<Option<&'a Cancellable>>>(
&self,
cancellable: P
) -> Result<Source, Error>; fn get_address(&self) -> Option<String>; fn get_auth(&self) -> Option<RTSPAuth>; fn get_backlog(&self) -> i32; fn get_bound_port(&self) -> i32; fn get_mount_points(&self) -> Option<RTSPMountPoints>; fn get_service(&self) -> Option<String>; fn get_session_pool(&self) -> Option<RTSPSessionPool>; fn get_thread_pool(&self) -> Option<RTSPThreadPool>; fn set_address(&self, address: &str); fn set_auth<'a, P: Into<Option<&'a RTSPAuth>>>(&self, auth: P); fn set_backlog(&self, backlog: i32); fn set_mount_points<'a, P: Into<Option<&'a RTSPMountPoints>>>(
&self,
mounts: P
); fn set_service(&self, service: &str); fn set_session_pool<'a, P: Into<Option<&'a RTSPSessionPool>>>(
&self,
pool: P
); fn set_thread_pool<'a, P: Into<Option<&'a RTSPThreadPool>>>(&self, pool: P); fn transfer_connection<'a, P: Into<Option<&'a str>>>(
&self,
socket: &Socket,
ip: &str,
port: i32,
initial_buffer: P
) -> bool; fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_bound_port_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_service_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId; }
Required Methods
fn create_socket<'a, P: Into<Option<&'a Cancellable>>>(
&self,
cancellable: P
) -> Result<Socket, Error>
&self,
cancellable: P
) -> Result<Socket, Error>
Create a gio::Socket
for self
. The socket will listen on the
configured service.
cancellable
a gio::Cancellable
Returns
the gio::Socket
for self
or None
when an error
occurred.
fn create_source<'a, P: Into<Option<&'a Cancellable>>>(
&self,
cancellable: P
) -> Result<Source, Error>
&self,
cancellable: P
) -> Result<Source, Error>
Create a glib::Source
for self
. The new source will have a default
GSocketSourceFunc
of 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 gio::CancellableExt::is_cancelled
.
This takes a reference on self
until source
is destroyed.
cancellable
a gio::Cancellable
or None
.
Returns
the glib::Source
for self
or None
when an error
occurred. Free with g_source_unref ()
fn get_address(&self) -> Option<String>
Get the address on which the server will accept connections.
Returns
the server address. g_free
after usage.
fn get_auth(&self) -> Option<RTSPAuth>
Get the RTSPAuth
used as the authentication manager of self
.
Returns
the RTSPAuth
of self
. gobject::ObjectExt::unref
after
usage.
fn get_backlog(&self) -> i32
fn get_bound_port(&self) -> i32
fn get_mount_points(&self) -> Option<RTSPMountPoints>
Get the RTSPMountPoints
used as the mount points of self
.
Returns
the RTSPMountPoints
of self
. gobject::ObjectExt::unref
after
usage.
fn get_service(&self) -> Option<String>
Get the service on which the server will accept connections.
Returns
the service. use g_free
after usage.
fn get_session_pool(&self) -> Option<RTSPSessionPool>
Get the RTSPSessionPool
used as the session pool of self
.
Returns
the RTSPSessionPool
used for sessions. gobject::ObjectExt::unref
after
usage.
fn get_thread_pool(&self) -> Option<RTSPThreadPool>
Get the RTSPThreadPool
used as the thread pool of self
.
Returns
the RTSPThreadPool
of self
. gobject::ObjectExt::unref
after
usage.
fn set_address(&self, address: &str)
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<'a, P: Into<Option<&'a RTSPAuth>>>(&self, auth: P)
fn set_backlog(&self, backlog: i32)
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_mount_points<'a, P: Into<Option<&'a RTSPMountPoints>>>(&self, mounts: P)
fn set_service(&self, service: &str)
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
RTSPServerExt::get_bound_port
.
This function must be called before the server is bound.
service
the service
fn set_session_pool<'a, P: Into<Option<&'a RTSPSessionPool>>>(&self, pool: P)
fn set_thread_pool<'a, P: Into<Option<&'a RTSPThreadPool>>>(&self, pool: P)
fn transfer_connection<'a, P: Into<Option<&'a str>>>(
&self,
socket: &Socket,
ip: &str,
port: i32,
initial_buffer: P
) -> bool
&self,
socket: &Socket,
ip: &str,
port: i32,
initial_buffer: P
) -> bool
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 connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_address_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_backlog_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_bound_port_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_service_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<RTSPServer> + IsA<Object>> RTSPServerExt for O