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

28 lines
944 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 crate::RTSPMediaFactory;
2018-03-15 08:21:53 +00:00
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
use glib::translate::*;
2018-03-15 08:46:49 +00:00
use glib::IsA;
2018-03-15 08:21:53 +00:00
pub trait RTSPMediaFactoryExtManual: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
2018-03-15 08:21:53 +00:00
fn add_role_from_structure(&self, structure: &gst::StructureRef);
}
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExtManual for O {
#[cfg(any(feature = "v1_14", feature = "dox"))]
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
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
}
}
}