gstreamer_rtsp_server/auto/
rtsp_onvif_client.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, RTSPClient};
7#[cfg(feature = "v1_18")]
8#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
9use glib::{prelude::*, translate::*};
10
11glib::wrapper! {
12    ///
13    ///
14    /// # Implements
15    ///
16    /// [`RTSPClientExt`][trait@crate::prelude::RTSPClientExt], [`trait@glib::ObjectExt`], [`RTSPClientExtManual`][trait@crate::prelude::RTSPClientExtManual]
17    #[doc(alias = "GstRTSPOnvifClient")]
18    pub struct RTSPOnvifClient(Object<ffi::GstRTSPOnvifClient, ffi::GstRTSPOnvifClientClass>) @extends RTSPClient;
19
20    match fn {
21        type_ => || ffi::gst_rtsp_onvif_client_get_type(),
22    }
23}
24
25impl RTSPOnvifClient {
26    pub const NONE: Option<&'static RTSPOnvifClient> = None;
27
28    /// Create a new [`RTSPOnvifClient`][crate::RTSPOnvifClient] instance.
29    ///
30    /// # Returns
31    ///
32    /// a new [`RTSPOnvifClient`][crate::RTSPOnvifClient]
33    #[cfg(feature = "v1_18")]
34    #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
35    #[doc(alias = "gst_rtsp_onvif_client_new")]
36    pub fn new() -> RTSPOnvifClient {
37        assert_initialized_main_thread!();
38        unsafe { RTSPClient::from_glib_full(ffi::gst_rtsp_onvif_client_new()).unsafe_cast() }
39    }
40}
41
42#[cfg(feature = "v1_18")]
43#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
44impl Default for RTSPOnvifClient {
45    fn default() -> Self {
46        Self::new()
47    }
48}
49
50unsafe impl Send for RTSPOnvifClient {}
51unsafe impl Sync for RTSPOnvifClient {}