gstreamer-rs/gstreamer-rtsp-server/src/rtsp_media_factory.rs

25 lines
753 B
Rust
Raw Normal View History

2020-12-15 10:53:31 +00:00
// Take a look at the license at the top of the repository in the LICENSE file.
2018-03-15 08:21:53 +00:00
use glib::{prelude::*, translate::*};
2018-03-15 08:21:53 +00:00
use crate::RTSPMediaFactory;
2018-03-15 08:21:53 +00:00
mod sealed {
pub trait Sealed {}
impl<T: super::IsA<super::RTSPMediaFactory>> Sealed for T {}
2018-03-15 08:21:53 +00:00
}
pub trait RTSPMediaFactoryExtManual: sealed::Sealed + IsA<RTSPMediaFactory> + 'static {
#[doc(alias = "gst_rtsp_media_factory_add_role_from_structure")]
2018-03-15 08:21:53 +00:00
fn add_role_from_structure(&self, structure: &gst::StructureRef) {
unsafe {
ffi::gst_rtsp_media_factory_add_role_from_structure(
self.as_ref().to_glib_none().0,
2018-04-01 08:30:03 +00:00
structure.as_mut_ptr(),
);
2018-03-15 08:21:53 +00:00
}
}
}
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O {}