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
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
use crate::RTSPMediaFactory;
|
2018-03-15 08:21:53 +00:00
|
|
|
|
2021-04-26 12:15:53 +00:00
|
|
|
use glib::prelude::*;
|
2020-11-27 13:37:49 +00:00
|
|
|
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14")))]
|
2019-01-16 11:32:58 +00:00
|
|
|
use glib::translate::*;
|
2018-03-15 08:21:53 +00:00
|
|
|
|
2018-12-08 09:22:42 +00:00
|
|
|
pub trait RTSPMediaFactoryExtManual: 'static {
|
2020-11-27 13:37:49 +00:00
|
|
|
#[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 {
|
2020-11-27 13:37:49 +00:00
|
|
|
#[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 {
|
2020-11-22 10:45:51 +00:00
|
|
|
ffi::gst_rtsp_media_factory_add_role_from_structure(
|
2019-01-16 11:32:58 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|