Trait gstreamer_rtsp_server::prelude::RTSPClientExt
source · pub trait RTSPClientExt:
IsA<RTSPClient>
+ Sealed
+ 'static {
Show 44 methods
// Provided methods
fn close(&self) { ... }
fn auth(&self) -> Option<RTSPAuth> { ... }
fn content_length_limit(&self) -> u32 { ... }
fn mount_points(&self) -> Option<RTSPMountPoints> { ... }
fn session_pool(&self) -> Option<RTSPSessionPool> { ... }
fn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> { ... }
fn thread_pool(&self) -> Option<RTSPThreadPool> { ... }
fn session_filter(
&self,
func: Option<&mut dyn FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult>,
) -> Vec<RTSPSession> { ... }
fn set_auth(&self, auth: Option<&impl IsA<RTSPAuth>>) { ... }
fn set_content_length_limit(&self, limit: u32) { ... }
fn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>) { ... }
fn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>) { ... }
fn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>) { ... }
fn is_drop_backlog(&self) -> bool { ... }
fn set_drop_backlog(&self, drop_backlog: bool) { ... }
fn post_session_timeout(&self) -> i32 { ... }
fn set_post_session_timeout(&self, post_session_timeout: i32) { ... }
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_announce_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_describe_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_get_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_options_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_pause_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_play_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_record_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_set_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_setup_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_pre_teardown_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_record_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_set_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_setup_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_teardown_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_drop_backlog_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_post_session_timeout_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 { ... }
}
Expand description
Provided Methods§
sourcefn content_length_limit(&self) -> u32
fn content_length_limit(&self) -> u32
sourcefn mount_points(&self) -> Option<RTSPMountPoints>
fn mount_points(&self) -> Option<RTSPMountPoints>
Get the RTSPMountPoints
object that self
uses to manage its sessions.
§Returns
a RTSPMountPoints
, unref after usage.
sourcefn session_pool(&self) -> Option<RTSPSessionPool>
fn session_pool(&self) -> Option<RTSPSessionPool>
Get the RTSPSessionPool
object that self
uses to manage its sessions.
§Returns
a RTSPSessionPool
, unref after usage.
sourcefn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport>
fn stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport>
This is useful when providing a send function through
gst_rtsp_client_set_send_func()
when doing RTSP over TCP:
the send function must call gst_rtsp_stream_transport_message_sent ()
on the appropriate transport when data has been received for streaming
to continue.
§Returns
the RTSPStreamTransport
associated with channel
.
sourcefn thread_pool(&self) -> Option<RTSPThreadPool>
fn thread_pool(&self) -> Option<RTSPThreadPool>
Get the RTSPThreadPool
used as the thread pool of self
.
§Returns
the RTSPThreadPool
of self
. g_object_unref()
after
usage.
sourcefn session_filter(
&self,
func: Option<&mut dyn FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult>,
) -> Vec<RTSPSession>
fn session_filter( &self, func: Option<&mut dyn FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult>, ) -> Vec<RTSPSession>
Call func
for each session managed by self
. The result value of func
determines what happens to the session. func
will be called with self
locked so no further actions on self
can be performed from func
.
If func
returns RTSPFilterResult::Remove
, the session will be removed from
self
.
If func
returns RTSPFilterResult::Keep
, the session will remain in self
.
If func
returns RTSPFilterResult::Ref
, the session will remain in self
but
will also be added with an additional ref to the result GList
of this
function..
When func
is None
, RTSPFilterResult::Ref
will be assumed for each session.
§func
a callback
§Returns
a GList
with all
sessions for which func
returned RTSPFilterResult::Ref
. After usage, each
element in the GList
should be unreffed before the list is freed.
sourcefn set_content_length_limit(&self, limit: u32)
fn set_content_length_limit(&self, limit: u32)
Configure self
to use the specified Content-Length limit.
Define an appropriate request size limit and reject requests exceeding the limit with response status 413 Request Entity Too Large
§limit
Content-Length limit
sourcefn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>)
fn set_mount_points(&self, mounts: Option<&impl IsA<RTSPMountPoints>>)
Set mounts
as the mount points for self
which it will use to map urls
to media streams. These mount points are usually inherited from the server that
created the client but can be overriden later.
§mounts
sourcefn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>)
fn set_session_pool(&self, pool: Option<&impl IsA<RTSPSessionPool>>)
Set pool
as the sessionpool for self
which it will use to find
or allocate sessions. the sessionpool is usually inherited from the server
that created the client but can be overridden later.
§pool
sourcefn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>)
fn set_thread_pool(&self, pool: Option<&impl IsA<RTSPThreadPool>>)
fn is_drop_backlog(&self) -> bool
fn set_drop_backlog(&self, drop_backlog: bool)
fn post_session_timeout(&self) -> i32
fn set_post_session_timeout(&self, post_session_timeout: i32)
sourcefn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
fn connect_closed<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
sourcefn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_describe_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
sourcefn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_get_parameter_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
sourcefn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_handle_response<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
fn connect_new_session<F: Fn(&Self, &RTSPSession) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
sourcefn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_options_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
sourcefn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pause_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
sourcefn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_play_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
sourcefn connect_pre_announce_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_announce_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_describe_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_describe_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_get_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_get_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_options_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_options_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_pause_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_pause_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_play_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_play_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_record_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_record_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_set_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_set_parameter_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_setup_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_setup_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code
sourcefn connect_pre_teardown_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_pre_teardown_request<F: Fn(&Self, &RTSPContext) -> RTSPStatusCode + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
§ctx
§Returns
a gst_rtsp::RTSPStatusCode
, GST_RTSP_STS_OK in case of success,
otherwise an appropriate return code