gstreamer_rtsp_server/
rtsp_media_factory.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::{prelude::*, translate::*};
4
5use crate::{ffi, RTSPMediaFactory};
6
7pub trait RTSPMediaFactoryExtManual: IsA<RTSPMediaFactory> + 'static {
8    /// A convenience wrapper around `gst_rtsp_permissions_add_role_from_structure()`.
9    /// If `self` had no permissions, new permissions will be created and the
10    /// role will be added to it.
11    #[doc(alias = "gst_rtsp_media_factory_add_role_from_structure")]
12    fn add_role_from_structure(&self, structure: &gst::StructureRef) {
13        unsafe {
14            ffi::gst_rtsp_media_factory_add_role_from_structure(
15                self.as_ref().to_glib_none().0,
16                structure.as_mut_ptr(),
17            );
18        }
19    }
20}
21
22impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O {}