gstreamer-rs/gstreamer-rtsp-server/src/rtsp_onvif_media_factory.rs
Bilal Elmoussaoui 4ebec84f5e Adapt to no longer renamed ffi crates
Allows us to set all the crates in the main workspace file, so changing
their versions or branch is much simpler and reduce the amount of noise
in the diff

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1450>
2024-06-02 11:20:55 +02:00

31 lines
953 B
Rust

// Take a look at the license at the top of the repository in the LICENSE file.
use glib::{prelude::*, translate::*};
use crate::{ffi, RTSPContext, RTSPOnvifMediaFactory};
mod sealed {
pub trait Sealed {}
impl<T: super::IsA<super::RTSPOnvifMediaFactory>> Sealed for T {}
}
pub trait RTSPOnvifMediaFactoryExtManual:
sealed::Sealed + IsA<RTSPOnvifMediaFactory> + 'static
{
#[doc(alias = "gst_rtsp_onvif_media_factory_requires_backchannel")]
fn requires_backchannel(&self, ctx: &RTSPContext) -> bool {
skip_assert_initialized!();
unsafe {
from_glib(ffi::gst_rtsp_onvif_media_factory_requires_backchannel(
self.as_ref()
.upcast_ref::<crate::RTSPMediaFactory>()
.to_glib_none()
.0,
ctx.to_glib_none().0,
))
}
}
}
impl<O: IsA<RTSPOnvifMediaFactory>> RTSPOnvifMediaFactoryExtManual for O {}