2020-02-23 08:00:48 +00:00
|
|
|
// Copyright (C) 2020 Sebastian Dröge <sebastian@centricular.com>
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
use glib::prelude::*;
|
|
|
|
use glib::subclass::prelude::*;
|
2020-02-23 08:00:48 +00:00
|
|
|
use glib::translate::*;
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
use crate::RTSPMediaFactory;
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-04-13 16:18:57 +00:00
|
|
|
use std::mem::transmute;
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
pub trait RTSPMediaFactoryImpl: RTSPMediaFactoryImplExt + ObjectImpl + Send + Sync {
|
2020-11-14 16:31:21 +00:00
|
|
|
fn gen_key(&self, factory: &Self::Type, url: &gst_rtsp::RTSPUrl) -> Option<glib::GString> {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_gen_key(factory, url)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn create_element(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
|
|
|
) -> Option<gst::Element> {
|
|
|
|
self.parent_create_element(factory, url)
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn construct(&self, factory: &Self::Type, url: &gst_rtsp::RTSPUrl) -> Option<crate::RTSPMedia> {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_construct(factory, url)
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn create_pipeline(
|
|
|
|
&self,
|
|
|
|
factory: &Self::Type,
|
|
|
|
media: &crate::RTSPMedia,
|
|
|
|
) -> Option<gst::Pipeline> {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_create_pipeline(factory, media)
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_configure(factory, media)
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn media_constructed(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_media_constructed(factory, media)
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn media_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
self.parent_media_configure(factory, media)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
pub trait RTSPMediaFactoryImplExt: ObjectSubclass {
|
2020-02-23 08:00:48 +00:00
|
|
|
fn parent_gen_key(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
|
|
|
) -> Option<glib::GString>;
|
|
|
|
|
|
|
|
fn parent_create_element(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
|
|
|
) -> Option<gst::Element>;
|
|
|
|
|
|
|
|
fn parent_construct(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
2020-11-22 10:45:51 +00:00
|
|
|
) -> Option<crate::RTSPMedia>;
|
2020-02-23 08:00:48 +00:00
|
|
|
|
|
|
|
fn parent_create_pipeline(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-11-22 10:45:51 +00:00
|
|
|
media: &crate::RTSPMedia,
|
2020-02-23 08:00:48 +00:00
|
|
|
) -> Option<gst::Pipeline>;
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn parent_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn parent_media_constructed(&self, factory: &Self::Type, media: &crate::RTSPMedia);
|
|
|
|
fn parent_media_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
impl<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
2020-02-23 08:00:48 +00:00
|
|
|
fn parent_gen_key(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
|
|
|
) -> Option<glib::GString> {
|
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
(*parent_class)
|
|
|
|
.gen_key
|
2020-11-14 16:31:21 +00:00
|
|
|
.map(|f| {
|
|
|
|
from_glib_full(f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
url.to_glib_none().0,
|
|
|
|
))
|
|
|
|
})
|
2020-02-23 08:00:48 +00:00
|
|
|
.unwrap_or(None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn parent_create_element(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
|
|
|
) -> Option<gst::Element> {
|
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
(*parent_class)
|
|
|
|
.create_element
|
2020-11-14 16:31:21 +00:00
|
|
|
.map(|f| {
|
|
|
|
from_glib_none(f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
url.to_glib_none().0,
|
|
|
|
))
|
|
|
|
})
|
2020-02-23 08:00:48 +00:00
|
|
|
.unwrap_or(None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn parent_construct(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-02-23 08:00:48 +00:00
|
|
|
url: &gst_rtsp::RTSPUrl,
|
2020-11-22 10:45:51 +00:00
|
|
|
) -> Option<crate::RTSPMedia> {
|
2020-02-23 08:00:48 +00:00
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
(*parent_class)
|
|
|
|
.construct
|
2020-11-14 16:31:21 +00:00
|
|
|
.map(|f| {
|
|
|
|
from_glib_full(f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
url.to_glib_none().0,
|
|
|
|
))
|
|
|
|
})
|
2020-02-23 08:00:48 +00:00
|
|
|
.unwrap_or(None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn parent_create_pipeline(
|
|
|
|
&self,
|
2020-11-14 16:31:21 +00:00
|
|
|
factory: &Self::Type,
|
2020-11-22 10:45:51 +00:00
|
|
|
media: &crate::RTSPMedia,
|
2020-02-23 08:00:48 +00:00
|
|
|
) -> Option<gst::Pipeline> {
|
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
(*parent_class)
|
|
|
|
.create_pipeline
|
|
|
|
.map(|f| {
|
2020-11-14 16:31:21 +00:00
|
|
|
let ptr = f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
media.to_glib_none().0,
|
2020-11-22 10:45:51 +00:00
|
|
|
) as *mut gst::ffi::GstPipeline;
|
2020-02-23 08:00:48 +00:00
|
|
|
|
|
|
|
// See https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/merge_requests/109
|
2020-11-22 10:45:51 +00:00
|
|
|
if glib::gobject_ffi::g_object_is_floating(ptr as *mut _) != glib::ffi::GFALSE {
|
|
|
|
glib::gobject_ffi::g_object_ref_sink(ptr as *mut _);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
from_glib_none(ptr)
|
|
|
|
})
|
|
|
|
.unwrap_or(None)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn parent_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
if let Some(f) = (*parent_class).configure {
|
2020-11-14 16:31:21 +00:00
|
|
|
f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
media.to_glib_none().0,
|
|
|
|
);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn parent_media_constructed(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
if let Some(f) = (*parent_class).media_constructed {
|
2020-11-14 16:31:21 +00:00
|
|
|
f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
media.to_glib_none().0,
|
|
|
|
);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
fn parent_media_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) {
|
2020-02-23 08:00:48 +00:00
|
|
|
unsafe {
|
2020-07-25 08:02:04 +00:00
|
|
|
let data = T::type_data();
|
2020-11-22 10:45:51 +00:00
|
|
|
let parent_class =
|
|
|
|
data.as_ref().get_parent_class() as *mut ffi::GstRTSPMediaFactoryClass;
|
2020-02-23 08:00:48 +00:00
|
|
|
if let Some(f) = (*parent_class).media_configure {
|
2020-11-14 16:31:21 +00:00
|
|
|
f(
|
|
|
|
factory
|
|
|
|
.unsafe_cast_ref::<RTSPMediaFactory>()
|
|
|
|
.to_glib_none()
|
|
|
|
.0,
|
|
|
|
media.to_glib_none().0,
|
|
|
|
);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-05 13:18:19 +00:00
|
|
|
unsafe impl<T: RTSPMediaFactoryImpl> IsSubclassable<T> for RTSPMediaFactory {
|
2020-11-05 16:48:17 +00:00
|
|
|
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
2020-11-05 13:18:19 +00:00
|
|
|
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
2020-11-05 17:07:31 +00:00
|
|
|
let klass = klass.as_mut();
|
|
|
|
klass.gen_key = Some(factory_gen_key::<T>);
|
|
|
|
klass.create_element = Some(factory_create_element::<T>);
|
|
|
|
klass.construct = Some(factory_construct::<T>);
|
|
|
|
klass.create_pipeline = Some(factory_create_pipeline::<T>);
|
|
|
|
klass.configure = Some(factory_configure::<T>);
|
|
|
|
klass.media_constructed = Some(factory_media_constructed::<T>);
|
|
|
|
klass.media_configure = Some(factory_media_configure::<T>);
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_gen_key<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
url: *const gst_rtsp::ffi::GstRTSPUrl,
|
2020-07-25 08:02:04 +00:00
|
|
|
) -> *mut std::os::raw::c_char {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
imp.gen_key(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
|
|
|
|
.to_glib_full()
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_create_element<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
url: *const gst_rtsp::ffi::GstRTSPUrl,
|
|
|
|
) -> *mut gst::ffi::GstElement {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
|
|
|
let element = imp
|
2020-11-14 16:31:21 +00:00
|
|
|
.create_element(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
|
2020-02-23 08:00:48 +00:00
|
|
|
.to_glib_full();
|
2020-11-22 10:45:51 +00:00
|
|
|
glib::gobject_ffi::g_object_force_floating(element as *mut _);
|
2020-02-23 08:00:48 +00:00
|
|
|
element
|
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_construct<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
url: *const gst_rtsp::ffi::GstRTSPUrl,
|
|
|
|
) -> *mut ffi::GstRTSPMedia {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
imp.construct(wrap.unsafe_cast_ref(), &from_glib_borrow(url))
|
|
|
|
.to_glib_full()
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_create_pipeline<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
media: *mut ffi::GstRTSPMedia,
|
|
|
|
) -> *mut gst::ffi::GstElement {
|
2020-02-23 08:00:48 +00:00
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
|
|
|
static PIPELINE_QUARK: Lazy<glib::Quark> =
|
|
|
|
Lazy::new(|| glib::Quark::from_string("gstreamer-rs-rtsp-media-pipeline"));
|
|
|
|
|
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-22 10:45:51 +00:00
|
|
|
let pipeline: *mut gst::ffi::GstPipeline = imp
|
2020-11-14 16:31:21 +00:00
|
|
|
.create_pipeline(wrap.unsafe_cast_ref(), &from_glib_borrow(media))
|
2020-02-23 10:53:33 +00:00
|
|
|
.to_glib_full();
|
2020-02-23 08:00:48 +00:00
|
|
|
|
|
|
|
// FIXME We somehow need to ensure the pipeline actually stays alive...
|
2020-11-22 10:45:51 +00:00
|
|
|
glib::gobject_ffi::g_object_set_qdata_full(
|
2020-02-23 08:00:48 +00:00
|
|
|
media as *mut _,
|
|
|
|
PIPELINE_QUARK.to_glib(),
|
|
|
|
pipeline as *mut _,
|
2020-11-22 10:45:51 +00:00
|
|
|
Some(transmute::<_, unsafe extern "C" fn(glib::ffi::gpointer)>(
|
|
|
|
glib::gobject_ffi::g_object_unref as *const (),
|
2020-04-13 16:18:57 +00:00
|
|
|
)),
|
2020-02-23 08:00:48 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
pipeline as *mut _
|
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_configure<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
media: *mut ffi::GstRTSPMedia,
|
2020-07-25 08:02:04 +00:00
|
|
|
) {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
imp.configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media));
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_media_constructed<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
media: *mut ffi::GstRTSPMedia,
|
2020-07-25 08:02:04 +00:00
|
|
|
) {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
imp.media_constructed(wrap.unsafe_cast_ref(), &from_glib_borrow(media));
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-25 08:02:04 +00:00
|
|
|
unsafe extern "C" fn factory_media_configure<T: RTSPMediaFactoryImpl>(
|
2020-11-22 10:45:51 +00:00
|
|
|
ptr: *mut ffi::GstRTSPMediaFactory,
|
|
|
|
media: *mut ffi::GstRTSPMedia,
|
2020-07-25 08:02:04 +00:00
|
|
|
) {
|
2020-02-23 08:00:48 +00:00
|
|
|
let instance = &*(ptr as *mut T::Instance);
|
|
|
|
let imp = instance.get_impl();
|
2020-04-05 14:52:56 +00:00
|
|
|
let wrap: Borrowed<RTSPMediaFactory> = from_glib_borrow(ptr);
|
2020-02-23 08:00:48 +00:00
|
|
|
|
2020-11-14 16:31:21 +00:00
|
|
|
imp.media_configure(wrap.unsafe_cast_ref(), &from_glib_borrow(media));
|
2020-02-23 08:00:48 +00:00
|
|
|
}
|