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")]
21    fn attach(&self, context: Option<&glib::MainContext>) -> SourceId {
22        unsafe {
23            from_glib(ffi::gst_rtsp_client_attach(
24                self.as_ref().to_glib_none().0,
25                context.to_glib_none().0,
26            ))
27        }
28    }
29
30    #[doc(alias = "gst_rtsp_client_send_message")]
31    fn send_message(
32        &self,
33        message: &RTSPMessage,
34        session: Option<&RTSPSession>,
35    ) -> gst_rtsp::RTSPResult {
36        unsafe {
37            from_glib(ffi::gst_rtsp_client_send_message(
38                self.as_ref().to_glib_none().0,
39                session.to_glib_none().0,
40                message.to_glib_none().0,
41            ))
42        }
43    }
44}
45
46impl<O: IsA<RTSPClient>> RTSPClientExtManual for O {}