gstreamer_rtsp_server/
rtsp_client.rs1use crate::{ffi, RTSPClient, RTSPSession};
4use glib::{prelude::*, source::SourceId, translate::*};
5use gst_rtsp::rtsp_message::RTSPMessage;
6
7pub trait RTSPClientExtManual: IsA<RTSPClient> + 'static {
8 #[doc(alias = "gst_rtsp_client_attach")]
9 fn attach(&self, context: Option<&glib::MainContext>) -> SourceId {
10 unsafe {
11 from_glib(ffi::gst_rtsp_client_attach(
12 self.as_ref().to_glib_none().0,
13 context.to_glib_none().0,
14 ))
15 }
16 }
17
18 #[doc(alias = "gst_rtsp_client_send_message")]
19 fn send_message(
20 &self,
21 message: &RTSPMessage,
22 session: Option<&RTSPSession>,
23 ) -> gst_rtsp::RTSPResult {
24 unsafe {
25 from_glib(ffi::gst_rtsp_client_send_message(
26 self.as_ref().to_glib_none().0,
27 session.to_glib_none().0,
28 message.to_glib_none().0,
29 ))
30 }
31 }
32}
33
34impl<O: IsA<RTSPClient>> RTSPClientExtManual for O {}