2020-12-15 10:53:31 +00:00
|
|
|
// Take a look at the license at the top of the repository in the LICENSE file.
|
|
|
|
|
2023-01-03 18:58:25 +00:00
|
|
|
use glib::{prelude::*, source::SourceId, translate::*};
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
use crate::RTSPClient;
|
2018-02-09 02:30:08 +00:00
|
|
|
|
2018-12-08 09:22:42 +00:00
|
|
|
pub trait RTSPClientExtManual: 'static {
|
2021-05-19 20:35:47 +00:00
|
|
|
#[doc(alias = "gst_rtsp_client_attach")]
|
2019-05-23 18:19:24 +00:00
|
|
|
fn attach(&self, context: Option<&glib::MainContext>) -> SourceId;
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<O: IsA<RTSPClient>> RTSPClientExtManual for O {
|
2019-05-23 18:19:24 +00:00
|
|
|
fn attach(&self, context: Option<&glib::MainContext>) -> SourceId {
|
2018-02-09 02:30:08 +00:00
|
|
|
unsafe {
|
2020-11-22 10:45:51 +00:00
|
|
|
from_glib(ffi::gst_rtsp_client_attach(
|
2019-01-16 11:32:58 +00:00
|
|
|
self.as_ref().to_glib_none().0,
|
|
|
|
context.to_glib_none().0,
|
2018-02-22 10:18:37 +00:00
|
|
|
))
|
2018-02-09 02:30:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|