Regenerate everything for 1.16.0

This commit is contained in:
Sebastian Dröge 2019-04-23 17:32:09 +03:00
parent 5c32a0d1d3
commit 88dcb82c8d
44 changed files with 1290 additions and 11 deletions

View file

@ -33,6 +33,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base/v1_10", "gstreamer-app-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base/v1_10", "gstreamer-app-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base/v1_12", "gstreamer-app-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base/v1_14", "gstreamer-app-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-base/v1_16", "gstreamer-app-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"] dox = ["gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"]

View file

@ -31,6 +31,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-audio-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-audio-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-audio-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-audio-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -32,6 +32,7 @@ v1_10 = ["gstreamer-sys/v1_10", "gstreamer-base-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-base-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14", "v1_12"]
v1_14_1 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"] v1_14_1 = ["gstreamer-sys/v1_14", "gstreamer-base-sys/v1_14_1", "v1_14"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -45,6 +45,9 @@ pub trait AggregatorExt: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
fn set_src_caps(&self, caps: &gst::Caps); fn set_src_caps(&self, caps: &gst::Caps);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn simple_get_next_time(&self) -> gst::ClockTime;
fn get_property_start_time(&self) -> u64; fn get_property_start_time(&self) -> u64;
fn set_property_start_time(&self, start_time: u64); fn set_property_start_time(&self, start_time: u64);
@ -89,6 +92,13 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn simple_get_next_time(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_aggregator_simple_get_next_time(self.as_ref().to_glib_none().0))
}
}
fn get_property_start_time(&self) -> u64 { fn get_property_start_time(&self) -> u64 {
unsafe { unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type()); let mut value = Value::from_type(<u64 as StaticType>::static_type());

View file

@ -2,10 +2,23 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::StaticType;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::Value;
use glib::object::Cast;
use glib::object::IsA; use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect_raw;
use glib::translate::*; use glib::translate::*;
use glib_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use gobject_sys;
use gst; use gst;
use gst_base_sys; use gst_base_sys;
use gst_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! { glib_wrapper! {
pub struct AggregatorPad(Object<gst_base_sys::GstAggregatorPad, gst_base_sys::GstAggregatorPadClass, AggregatorPadClass>) @extends gst::Pad, gst::Object; pub struct AggregatorPad(Object<gst_base_sys::GstAggregatorPad, gst_base_sys::GstAggregatorPadClass, AggregatorPadClass>) @extends gst::Pad, gst::Object;
@ -35,6 +48,17 @@ pub trait AggregatorPadExt: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
fn pop_buffer(&self) -> Option<gst::Buffer>; fn pop_buffer(&self) -> Option<gst::Buffer>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_property_emit_signals(&self) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_property_emit_signals(&self, emit_signals: bool);
fn connect_buffer_consumed<F: Fn(&Self, &gst::Buffer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn connect_property_emit_signals_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
} }
impl<O: IsA<AggregatorPad>> AggregatorPadExt for O { impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
@ -72,4 +96,50 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
from_glib_full(gst_base_sys::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0)) from_glib_full(gst_base_sys::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0))
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_property_emit_signals(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"emit-signals\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_property_emit_signals(&self, emit_signals: bool) {
unsafe {
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"emit-signals\0".as_ptr() as *const _, Value::from(&emit_signals).to_glib_none().0);
}
}
fn connect_buffer_consumed<F: Fn(&Self, &gst::Buffer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"buffer-consumed\0".as_ptr() as *const _,
Some(transmute(buffer_consumed_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn connect_property_emit_signals_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::emit-signals\0".as_ptr() as *const _,
Some(transmute(notify_emit_signals_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
}
unsafe extern "C" fn buffer_consumed_trampoline<P, F: Fn(&P, &gst::Buffer) + Send + Sync + 'static>(this: *mut gst_base_sys::GstAggregatorPad, object: *mut gst_sys::GstBuffer, f: glib_sys::gpointer)
where P: IsA<AggregatorPad> {
let f: &F = &*(f as *const F);
f(&AggregatorPad::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
unsafe extern "C" fn notify_emit_signals_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstAggregatorPad, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<AggregatorPad> {
let f: &F = &*(f as *const F);
f(&AggregatorPad::from_glib_borrow(this).unsafe_cast())
} }

View file

@ -46,6 +46,9 @@ pub trait BaseSinkExt: 'static {
fn get_max_lateness(&self) -> i64; fn get_max_lateness(&self) -> i64;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_processing_deadline(&self) -> gst::ClockTime;
fn get_render_delay(&self) -> gst::ClockTime; fn get_render_delay(&self) -> gst::ClockTime;
fn get_sync(&self) -> bool; fn get_sync(&self) -> bool;
@ -75,6 +78,9 @@ pub trait BaseSinkExt: 'static {
fn set_max_lateness(&self, max_lateness: i64); fn set_max_lateness(&self, max_lateness: i64);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_processing_deadline(&self, processing_deadline: gst::ClockTime);
fn set_qos_enabled(&self, enabled: bool); fn set_qos_enabled(&self, enabled: bool);
fn set_render_delay(&self, delay: gst::ClockTime); fn set_render_delay(&self, delay: gst::ClockTime);
@ -111,6 +117,9 @@ pub trait BaseSinkExt: 'static {
fn connect_property_max_lateness_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_max_lateness_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn connect_property_processing_deadline_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_render_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_render_delay_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -164,6 +173,13 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_processing_deadline(&self) -> gst::ClockTime {
unsafe {
from_glib(gst_base_sys::gst_base_sink_get_processing_deadline(self.as_ref().to_glib_none().0))
}
}
fn get_render_delay(&self) -> gst::ClockTime { fn get_render_delay(&self) -> gst::ClockTime {
unsafe { unsafe {
from_glib(gst_base_sys::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0)) from_glib(gst_base_sys::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0))
@ -254,6 +270,13 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_processing_deadline(&self, processing_deadline: gst::ClockTime) {
unsafe {
gst_base_sys::gst_base_sink_set_processing_deadline(self.as_ref().to_glib_none().0, processing_deadline.to_glib());
}
}
fn set_qos_enabled(&self, enabled: bool) { fn set_qos_enabled(&self, enabled: bool) {
unsafe { unsafe {
gst_base_sys::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib()); gst_base_sys::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
@ -382,6 +405,15 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn connect_property_processing_deadline_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::processing-deadline\0".as_ptr() as *const _,
Some(transmute(notify_processing_deadline_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -459,6 +491,13 @@ where P: IsA<BaseSink> {
f(&BaseSink::from_glib_borrow(this).unsafe_cast()) f(&BaseSink::from_glib_borrow(this).unsafe_cast())
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
unsafe extern "C" fn notify_processing_deadline_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<BaseSink> {
let f: &F = &*(f as *const F);
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<BaseSink> { where P: IsA<BaseSink> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);

View file

@ -25,6 +25,27 @@ pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(obj: Option<&P>, buf: &g
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn type_find_helper_for_buffer_with_extension<P: IsA<gst::Object>>(obj: Option<&P>, buf: &gst::Buffer, extension: Option<&str>) -> (Option<gst::Caps>, gst::TypeFindProbability) {
assert_initialized_main_thread!();
unsafe {
let mut prob = mem::uninitialized();
let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_buffer_with_extension(obj.map(|p| p.as_ref()).to_glib_none().0, buf.to_glib_none().0, extension.to_glib_none().0, &mut prob));
(ret, from_glib(prob))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn type_find_helper_for_data_with_extension<P: IsA<gst::Object>>(obj: Option<&P>, data: &[u8], extension: Option<&str>) -> (Option<gst::Caps>, gst::TypeFindProbability) {
assert_initialized_main_thread!();
let size = data.len() as usize;
unsafe {
let mut prob = mem::uninitialized();
let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_data_with_extension(obj.map(|p| p.as_ref()).to_glib_none().0, data.to_glib_none().0, size, extension.to_glib_none().0, &mut prob));
(ret, from_glib(prob))
}
}
pub fn type_find_helper_for_extension<P: IsA<gst::Object>>(obj: Option<&P>, extension: &str) -> Option<gst::Caps> { pub fn type_find_helper_for_extension<P: IsA<gst::Object>>(obj: Option<&P>, extension: &str) -> Option<gst::Caps> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
@ -32,7 +53,7 @@ pub fn type_find_helper_for_extension<P: IsA<gst::Object>>(obj: Option<&P>, exte
} }
} }
//pub fn type_find_helper_get_range<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, &Option<gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: &str) -> (Option<gst::Caps>, gst::TypeFindProbability) { //pub fn type_find_helper_get_range<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, &Option<gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: Option<&str>) -> (Option<gst::Caps>, gst::TypeFindProbability) {
// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range() } // unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range() }
//} //}

View file

@ -30,7 +30,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-check-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-check-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-check-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-check-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-check-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-check-sys/v1_14", "v1_12"]
#v1_16 = ["gstreamer-sys/v1_16", "gstreamer-check-sys/v1_16", "v1_14"] v1_16 = ["gstreamer-sys/v1_16", "gstreamer-check-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -85,6 +85,11 @@ impl TestClock {
} }
} }
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//pub fn timed_wait_for_multiple_pending_ids(&self, count: u32, timeout_ms: u32, pending_list: /*Unimplemented*/Vec<gst::ClockID>) -> bool {
// unsafe { TODO: call gst_check_sys:gst_test_clock_timed_wait_for_multiple_pending_ids() }
//}
//pub fn wait_for_multiple_pending_ids(&self, count: u32, pending_list: /*Unimplemented*/Vec<gst::ClockID>) { //pub fn wait_for_multiple_pending_ids(&self, count: u32, pending_list: /*Unimplemented*/Vec<gst::ClockID>) {
// unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_multiple_pending_ids() } // unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_multiple_pending_ids() }
//} //}

View file

@ -41,3 +41,4 @@ x11 = ["gstreamer-gl-sys/x11"]
wayland = ["gstreamer-gl-sys/wayland"] wayland = ["gstreamer-gl-sys/wayland"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-video-sys/v1_16", "gstreamer-gl-sys/v1_16"]

View file

@ -84,6 +84,30 @@ impl ErrorDomain for GLContextError {
} }
} }
impl StaticType for GLContextError {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_context_error_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLContextError {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLContextError {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLContextError {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLFormat { pub enum GLFormat {
@ -97,8 +121,10 @@ pub enum GLFormat {
Rgb, Rgb,
Rgb8, Rgb8,
Rgb565, Rgb565,
Rgb16,
Rgba, Rgba,
Rgba8, Rgba8,
Rgba16,
DepthComponent16, DepthComponent16,
Depth24Stencil8, Depth24Stencil8,
#[doc(hidden)] #[doc(hidden)]
@ -121,8 +147,10 @@ impl ToGlib for GLFormat {
GLFormat::Rgb => gst_gl_sys::GST_GL_RGB, GLFormat::Rgb => gst_gl_sys::GST_GL_RGB,
GLFormat::Rgb8 => gst_gl_sys::GST_GL_RGB8, GLFormat::Rgb8 => gst_gl_sys::GST_GL_RGB8,
GLFormat::Rgb565 => gst_gl_sys::GST_GL_RGB565, GLFormat::Rgb565 => gst_gl_sys::GST_GL_RGB565,
GLFormat::Rgb16 => gst_gl_sys::GST_GL_RGB16,
GLFormat::Rgba => gst_gl_sys::GST_GL_RGBA, GLFormat::Rgba => gst_gl_sys::GST_GL_RGBA,
GLFormat::Rgba8 => gst_gl_sys::GST_GL_RGBA8, GLFormat::Rgba8 => gst_gl_sys::GST_GL_RGBA8,
GLFormat::Rgba16 => gst_gl_sys::GST_GL_RGBA16,
GLFormat::DepthComponent16 => gst_gl_sys::GST_GL_DEPTH_COMPONENT16, GLFormat::DepthComponent16 => gst_gl_sys::GST_GL_DEPTH_COMPONENT16,
GLFormat::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8, GLFormat::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8,
GLFormat::__Unknown(value) => value GLFormat::__Unknown(value) => value
@ -145,8 +173,10 @@ impl FromGlib<gst_gl_sys::GstGLFormat> for GLFormat {
6407 => GLFormat::Rgb, 6407 => GLFormat::Rgb,
32849 => GLFormat::Rgb8, 32849 => GLFormat::Rgb8,
36194 => GLFormat::Rgb565, 36194 => GLFormat::Rgb565,
32852 => GLFormat::Rgb16,
6408 => GLFormat::Rgba, 6408 => GLFormat::Rgba,
32856 => GLFormat::Rgba8, 32856 => GLFormat::Rgba8,
32859 => GLFormat::Rgba16,
33189 => GLFormat::DepthComponent16, 33189 => GLFormat::DepthComponent16,
35056 => GLFormat::Depth24Stencil8, 35056 => GLFormat::Depth24Stencil8,
value => GLFormat::__Unknown(value), value => GLFormat::__Unknown(value),
@ -154,6 +184,30 @@ impl FromGlib<gst_gl_sys::GstGLFormat> for GLFormat {
} }
} }
impl StaticType for GLFormat {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_format_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLFormat {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLFormat {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLFormat {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLQueryType { pub enum GLQueryType {
@ -191,6 +245,30 @@ impl FromGlib<gst_gl_sys::GstGLQueryType> for GLQueryType {
} }
} }
impl StaticType for GLQueryType {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_query_type_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLQueryType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLQueryType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLQueryType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLSLError { pub enum GLSLError {
@ -249,6 +327,30 @@ impl ErrorDomain for GLSLError {
} }
} }
impl StaticType for GLSLError {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_glsl_error_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLSLError {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLSLError {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLSLError {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLSLVersion { pub enum GLSLVersion {
@ -328,6 +430,30 @@ impl FromGlib<gst_gl_sys::GstGLSLVersion> for GLSLVersion {
} }
} }
impl StaticType for GLSLVersion {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_glsl_version_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLSLVersion {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLSLVersion {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLSLVersion {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLStereoDownmix { pub enum GLStereoDownmix {
@ -367,7 +493,7 @@ impl FromGlib<gst_gl_sys::GstGLStereoDownmix> for GLStereoDownmix {
impl StaticType for GLStereoDownmix { impl StaticType for GLStereoDownmix {
fn static_type() -> Type { fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_stereo_downmix_mode_get_type()) } unsafe { from_glib(gst_gl_sys::gst_gl_stereo_downmix_get_type()) }
} }
} }
@ -429,6 +555,30 @@ impl FromGlib<gst_gl_sys::GstGLTextureTarget> for GLTextureTarget {
} }
} }
impl StaticType for GLTextureTarget {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_texture_target_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLTextureTarget {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLTextureTarget {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLTextureTarget {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLUploadReturn { pub enum GLUploadReturn {
@ -436,6 +586,7 @@ pub enum GLUploadReturn {
Error, Error,
Unsupported, Unsupported,
Reconfigure, Reconfigure,
UnsharedGlContext,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
} }
@ -450,6 +601,7 @@ impl ToGlib for GLUploadReturn {
GLUploadReturn::Error => gst_gl_sys::GST_GL_UPLOAD_ERROR, GLUploadReturn::Error => gst_gl_sys::GST_GL_UPLOAD_ERROR,
GLUploadReturn::Unsupported => gst_gl_sys::GST_GL_UPLOAD_UNSUPPORTED, GLUploadReturn::Unsupported => gst_gl_sys::GST_GL_UPLOAD_UNSUPPORTED,
GLUploadReturn::Reconfigure => gst_gl_sys::GST_GL_UPLOAD_RECONFIGURE, GLUploadReturn::Reconfigure => gst_gl_sys::GST_GL_UPLOAD_RECONFIGURE,
GLUploadReturn::UnsharedGlContext => gst_gl_sys::GST_GL_UPLOAD_UNSHARED_GL_CONTEXT,
GLUploadReturn::__Unknown(value) => value GLUploadReturn::__Unknown(value) => value
} }
} }
@ -464,11 +616,36 @@ impl FromGlib<gst_gl_sys::GstGLUploadReturn> for GLUploadReturn {
-1 => GLUploadReturn::Error, -1 => GLUploadReturn::Error,
-2 => GLUploadReturn::Unsupported, -2 => GLUploadReturn::Unsupported,
-3 => GLUploadReturn::Reconfigure, -3 => GLUploadReturn::Reconfigure,
-100 => GLUploadReturn::UnsharedGlContext,
value => GLUploadReturn::__Unknown(value), value => GLUploadReturn::__Unknown(value),
} }
} }
} }
impl StaticType for GLUploadReturn {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_upload_return_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLUploadReturn {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLUploadReturn {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLUploadReturn {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)] #[derive(Clone, Copy)]
pub enum GLWindowError { pub enum GLWindowError {
@ -527,3 +704,27 @@ impl ErrorDomain for GLWindowError {
} }
} }
impl StaticType for GLWindowError {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_window_error_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLWindowError {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLWindowError {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for GLWindowError {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}

View file

@ -2,7 +2,14 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
use glib::StaticType;
use glib::Type;
use glib::translate::*; use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use gobject_sys;
use gst_gl_sys; use gst_gl_sys;
bitflags! { bitflags! {
@ -33,6 +40,30 @@ impl FromGlib<gst_gl_sys::GstGLAPI> for GLAPI {
} }
} }
impl StaticType for GLAPI {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_api_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLAPI {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLAPI {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for GLAPI {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
bitflags! { bitflags! {
pub struct GLDisplayType: u32 { pub struct GLDisplayType: u32 {
const NONE = 0; const NONE = 0;
@ -65,6 +96,30 @@ impl FromGlib<gst_gl_sys::GstGLDisplayType> for GLDisplayType {
} }
} }
impl StaticType for GLDisplayType {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_display_type_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLDisplayType {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLDisplayType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for GLDisplayType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
bitflags! { bitflags! {
pub struct GLPlatform: u32 { pub struct GLPlatform: u32 {
const NONE = 0; const NONE = 0;
@ -94,6 +149,30 @@ impl FromGlib<gst_gl_sys::GstGLPlatform> for GLPlatform {
} }
} }
impl StaticType for GLPlatform {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_gl_platform_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLPlatform {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLPlatform {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for GLPlatform {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
bitflags! { bitflags! {
pub struct GLSLProfile: u32 { pub struct GLSLProfile: u32 {
const NONE = 0; const NONE = 0;
@ -121,3 +200,27 @@ impl FromGlib<gst_gl_sys::GstGLSLProfile> for GLSLProfile {
} }
} }
impl StaticType for GLSLProfile {
fn static_type() -> Type {
unsafe { from_glib(gst_gl_sys::gst_glsl_profile_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for GLSLProfile {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for GLSLProfile {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for GLSLProfile {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}

View file

@ -31,12 +31,22 @@ unsafe impl Sync for GLBaseFilter {}
pub const NONE_GL_BASE_FILTER: Option<&GLBaseFilter> = None; pub const NONE_GL_BASE_FILTER: Option<&GLBaseFilter> = None;
pub trait GLBaseFilterExt: 'static { pub trait GLBaseFilterExt: 'static {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn find_gl_context(&self) -> bool;
fn get_property_context(&self) -> Option<GLContext>; fn get_property_context(&self) -> Option<GLContext>;
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
} }
impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O { impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn find_gl_context(&self) -> bool {
unsafe {
from_glib(gst_gl_sys::gst_gl_base_filter_find_gl_context(self.as_ref().to_glib_none().0))
}
}
fn get_property_context(&self) -> Option<GLContext> { fn get_property_context(&self) -> Option<GLContext> {
unsafe { unsafe {
let mut value = Value::from_type(<GLContext as StaticType>::static_type()); let mut value = Value::from_type(<GLContext as StaticType>::static_type());

View file

@ -97,6 +97,12 @@ pub trait GLContextExt: 'static {
fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool; fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn supports_precision(&self, version: GLSLVersion, profile: GLSLProfile) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn supports_precision_highp(&self, version: GLSLVersion, profile: GLSLProfile) -> bool;
fn swap_buffers(&self); fn swap_buffers(&self);
} }
@ -231,6 +237,20 @@ impl<O: IsA<GLContext>> GLContextExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn supports_precision(&self, version: GLSLVersion, profile: GLSLProfile) -> bool {
unsafe {
from_glib(gst_gl_sys::gst_gl_context_supports_precision(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn supports_precision_highp(&self, version: GLSLVersion, profile: GLSLProfile) -> bool {
unsafe {
from_glib(gst_gl_sys::gst_gl_context_supports_precision_highp(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
}
}
fn swap_buffers(&self) { fn swap_buffers(&self) {
unsafe { unsafe {
gst_gl_sys::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0); gst_gl_sys::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0);

View file

@ -3,10 +3,28 @@
// DO NOT EDIT // DO NOT EDIT
use GLContext; use GLContext;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::StaticType;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::Value;
use glib::object::IsA; use glib::object::IsA;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::object::ObjectType;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::signal::SignalHandlerId;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::signal::connect_raw;
use glib::translate::*; use glib::translate::*;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use gobject_sys;
use gst; use gst;
use gst_gl_sys; use gst_gl_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use std::boxed::Box as Box_;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use std::mem::transmute;
glib_wrapper! { glib_wrapper! {
pub struct GLOverlayCompositor(Object<gst_gl_sys::GstGLOverlayCompositor, gst_gl_sys::GstGLOverlayCompositorClass, GLOverlayCompositorClass>) @extends gst::Object; pub struct GLOverlayCompositor(Object<gst_gl_sys::GstGLOverlayCompositor, gst_gl_sys::GstGLOverlayCompositorClass, GLOverlayCompositorClass>) @extends gst::Object;
@ -36,13 +54,44 @@ impl GLOverlayCompositor {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn get_property_yinvert(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"yinvert\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn set_property_yinvert(&self, yinvert: bool) {
unsafe {
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"yinvert\0".as_ptr() as *const _, Value::from(&yinvert).to_glib_none().0);
}
}
pub fn add_caps(caps: &gst::Caps) -> Option<gst::Caps> { pub fn add_caps(caps: &gst::Caps) -> Option<gst::Caps> {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {
from_glib_full(gst_gl_sys::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0)) from_glib_full(gst_gl_sys::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0))
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn connect_property_yinvert_notify<F: Fn(&GLOverlayCompositor) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::yinvert\0".as_ptr() as *const _,
Some(transmute(notify_yinvert_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
} }
unsafe impl Send for GLOverlayCompositor {} unsafe impl Send for GLOverlayCompositor {}
unsafe impl Sync for GLOverlayCompositor {} unsafe impl Sync for GLOverlayCompositor {}
#[cfg(any(feature = "v1_16", feature = "dox"))]
unsafe extern "C" fn notify_yinvert_trampoline<F: Fn(&GLOverlayCompositor) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLOverlayCompositor, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}

View file

@ -4,8 +4,14 @@
use Error; use Error;
use GLContext; use GLContext;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use GLSLProfile;
use GLSLStage; use GLSLStage;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use GLSLVersion;
use glib; use glib;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::GString;
use glib::StaticType; use glib::StaticType;
use glib::Value; use glib::Value;
use glib::object::IsA; use glib::object::IsA;
@ -254,6 +260,30 @@ impl GLShader {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn string_fragment_external_oes_get_default<P: IsA<GLContext>>(context: &P, version: GLSLVersion, profile: GLSLProfile) -> Option<GString> {
skip_assert_initialized!();
unsafe {
from_glib_full(gst_gl_sys::gst_gl_shader_string_fragment_external_oes_get_default(context.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn string_fragment_get_default<P: IsA<GLContext>>(context: &P, version: GLSLVersion, profile: GLSLProfile) -> Option<GString> {
skip_assert_initialized!();
unsafe {
from_glib_full(gst_gl_sys::gst_gl_shader_string_fragment_get_default(context.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn string_get_highest_precision<P: IsA<GLContext>>(context: &P, version: GLSLVersion, profile: GLSLProfile) -> Option<GString> {
skip_assert_initialized!();
unsafe {
from_glib_none(gst_gl_sys::gst_gl_shader_string_get_highest_precision(context.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
}
}
pub fn connect_property_linked_notify<F: Fn(&GLShader) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { pub fn connect_property_linked_notify<F: Fn(&GLShader) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);

View file

@ -42,6 +42,9 @@ unsafe impl Sync for GLWindow {}
pub const NONE_GL_WINDOW: Option<&GLWindow> = None; pub const NONE_GL_WINDOW: Option<&GLWindow> = None;
pub trait GLWindowExt: 'static { pub trait GLWindowExt: 'static {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn controls_viewport(&self) -> bool;
fn draw(&self); fn draw(&self);
fn get_context(&self) -> Option<GLContext>; fn get_context(&self) -> Option<GLContext>;
@ -74,6 +77,13 @@ pub trait GLWindowExt: 'static {
} }
impl<O: IsA<GLWindow>> GLWindowExt for O { impl<O: IsA<GLWindow>> GLWindowExt for O {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn controls_viewport(&self) -> bool {
unsafe {
from_glib(gst_gl_sys::gst_gl_window_controls_viewport(self.as_ref().to_glib_none().0))
}
}
fn draw(&self) { fn draw(&self) {
unsafe { unsafe {
gst_gl_sys::gst_gl_window_draw(self.as_ref().to_glib_none().0); gst_gl_sys::gst_gl_window_draw(self.as_ref().to_glib_none().0);

View file

@ -2,8 +2,11 @@
// from gir-files (https://github.com/gtk-rs/gir-files) // from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT // DO NOT EDIT
#[cfg(any(feature = "v1_16", feature = "dox"))]
mod gl_base_filter; mod gl_base_filter;
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub use self::gl_base_filter::{GLBaseFilter, GLBaseFilterClass, NONE_GL_BASE_FILTER}; pub use self::gl_base_filter::{GLBaseFilter, GLBaseFilterClass, NONE_GL_BASE_FILTER};
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub use self::gl_base_filter::GLBaseFilterExt; pub use self::gl_base_filter::GLBaseFilterExt;
mod gl_color_convert; mod gl_color_convert;
@ -74,6 +77,7 @@ pub use self::flags::GLSLProfile;
#[doc(hidden)] #[doc(hidden)]
pub mod traits { pub mod traits {
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub use super::GLBaseFilterExt; pub use super::GLBaseFilterExt;
pub use super::GLContextExt; pub use super::GLContextExt;
pub use super::GLDisplayExt; pub use super::GLDisplayExt;

View file

@ -30,6 +30,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-net-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-net-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-net-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-net-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-net-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-net-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-net-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -31,6 +31,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-pbutils-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-pbutils-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-pbutils-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-pbutils-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-pbutils-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-pbutils-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-pbutils-sys/dox"] dox = ["gstreamer-pbutils-sys/dox"]

View file

@ -5,11 +5,17 @@
use DiscovererInfo; use DiscovererInfo;
use Error; use Error;
use glib; use glib;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::StaticType;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use glib::Value;
use glib::object::ObjectType; use glib::object::ObjectType;
use glib::signal::SignalHandlerId; use glib::signal::SignalHandlerId;
use glib::signal::connect_raw; use glib::signal::connect_raw;
use glib::translate::*; use glib::translate::*;
use glib_sys; use glib_sys;
#[cfg(any(feature = "v1_16", feature = "dox"))]
use gobject_sys;
use gst; use gst;
use gst_pbutils_sys; use gst_pbutils_sys;
use gst_sys; use gst_sys;
@ -61,6 +67,22 @@ impl Discoverer {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn get_property_use_cache(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"use-cache\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn set_property_use_cache(&self, use_cache: bool) {
unsafe {
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"use-cache\0".as_ptr() as *const _, Value::from(&use_cache).to_glib_none().0);
}
}
pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { pub fn connect_discovered<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -92,6 +114,15 @@ impl Discoverer {
Some(transmute(starting_trampoline::<F> as usize)), Box_::into_raw(f)) Some(transmute(starting_trampoline::<F> as usize)), Box_::into_raw(f))
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn connect_property_use_cache_notify<F: Fn(&Discoverer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::use-cache\0".as_ptr() as *const _,
Some(transmute(notify_use_cache_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
} }
unsafe impl Send for Discoverer {} unsafe impl Send for Discoverer {}
@ -116,3 +147,9 @@ unsafe extern "C" fn starting_trampoline<F: Fn(&Discoverer) + Send + Sync + 'sta
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);
f(&from_glib_borrow(this)) f(&from_glib_borrow(this))
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
unsafe extern "C" fn notify_use_cache_trampoline<F: Fn(&Discoverer) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}

View file

@ -39,6 +39,7 @@ unsafe impl Sync for EncodingProfile {}
pub const NONE_ENCODING_PROFILE: Option<&EncodingProfile> = None; pub const NONE_ENCODING_PROFILE: Option<&EncodingProfile> = None;
pub trait EncodingProfileExt: 'static { pub trait EncodingProfileExt: 'static {
#[cfg(any(feature = "v1_12", feature = "dox"))]
fn copy(&self) -> EncodingProfile; fn copy(&self) -> EncodingProfile;
fn get_allow_dynamic_output(&self) -> bool; fn get_allow_dynamic_output(&self) -> bool;
@ -69,6 +70,7 @@ pub trait EncodingProfileExt: 'static {
} }
impl<O: IsA<EncodingProfile>> EncodingProfileExt for O { impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
#[cfg(any(feature = "v1_12", feature = "dox"))]
fn copy(&self) -> EncodingProfile { fn copy(&self) -> EncodingProfile {
unsafe { unsafe {
from_glib_full(gst_pbutils_sys::gst_encoding_profile_copy(self.as_ref().to_glib_none().0)) from_glib_full(gst_pbutils_sys::gst_encoding_profile_copy(self.as_ref().to_glib_none().0))

View file

@ -30,6 +30,7 @@ optional = true
[features] [features]
default = [] default = []
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-player-sys/v1_14"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-player-sys/v1_14"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-player-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -127,6 +127,13 @@ impl Player {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn get_subtitle_video_offset(&self) -> i64 {
unsafe {
gst_player_sys::gst_player_get_subtitle_video_offset(self.to_glib_none().0)
}
}
pub fn get_uri(&self) -> Option<GString> { pub fn get_uri(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(gst_player_sys::gst_player_get_uri(self.to_glib_none().0)) from_glib_full(gst_player_sys::gst_player_get_uri(self.to_glib_none().0))
@ -235,6 +242,13 @@ impl Player {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn set_subtitle_video_offset(&self, offset: i64) {
unsafe {
gst_player_sys::gst_player_set_subtitle_video_offset(self.to_glib_none().0, offset);
}
}
pub fn set_uri(&self, uri: &str) { pub fn set_uri(&self, uri: &str) {
unsafe { unsafe {
gst_player_sys::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0); gst_player_sys::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0);
@ -507,6 +521,15 @@ impl Player {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
pub fn connect_property_subtitle_video_offset_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::subtitle-video-offset\0".as_ptr() as *const _,
Some(transmute(notify_subtitle_video_offset_trampoline::<F> as usize)), Box_::into_raw(f))
}
}
pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { pub fn connect_property_suburi_notify<F: Fn(&Player) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -651,6 +674,12 @@ unsafe extern "C" fn notify_rate_trampoline<F: Fn(&Player) + Send + Sync + 'stat
f(&from_glib_borrow(this)) f(&from_glib_borrow(this))
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
unsafe extern "C" fn notify_subtitle_video_offset_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe extern "C" fn notify_suburi_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) { unsafe extern "C" fn notify_suburi_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);
f(&from_glib_borrow(this)) f(&from_glib_borrow(this))

View file

@ -38,6 +38,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-net-sys/v1_10", "gstreamer-rtsp-server-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-net-sys/v1_10", "gstreamer-rtsp-server-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-net-sys/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-net-sys/v1_12", "gstreamer-rtsp-server-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-net-sys/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-net-sys/v1_14", "gstreamer-rtsp-server-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-rtsp-sys/v1_16", "gstreamer-net-sys/v1_16", "gstreamer-rtsp-server-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -16,6 +16,7 @@ use glib_sys;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
use gst_rtsp; use gst_rtsp;
use gst_rtsp_server_sys; use gst_rtsp_server_sys;
use std;
use std::boxed::Box as Box_; use std::boxed::Box as Box_;
use std::mem::transmute; use std::mem::transmute;
@ -69,6 +70,9 @@ pub trait RTSPAuthExt: 'static {
fn get_default_token(&self) -> Option<RTSPToken>; fn get_default_token(&self) -> Option<RTSPToken>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_realm(&self) -> Option<GString>;
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod; fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod;
@ -78,11 +82,17 @@ pub trait RTSPAuthExt: 'static {
fn get_tls_database(&self) -> Option<gio::TlsDatabase>; fn get_tls_database(&self) -> Option<gio::TlsDatabase>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn parse_htdigest<P: AsRef<std::path::Path>>(&self, path: P, token: &RTSPToken) -> bool;
fn remove_basic(&self, basic: &str); fn remove_basic(&self, basic: &str);
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn remove_digest(&self, user: &str); fn remove_digest(&self, user: &str);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_realm(&self, realm: &str);
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod); fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod);
@ -115,6 +125,13 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_realm(&self) -> Option<GString> {
unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_realm(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod { fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod {
unsafe { unsafe {
@ -140,6 +157,13 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn parse_htdigest<P: AsRef<std::path::Path>>(&self, path: P, token: &RTSPToken) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_auth_parse_htdigest(self.as_ref().to_glib_none().0, path.as_ref().to_glib_none().0, token.to_glib_none().0))
}
}
fn remove_basic(&self, basic: &str) { fn remove_basic(&self, basic: &str) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0); gst_rtsp_server_sys::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0);
@ -153,6 +177,13 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_realm(&self, realm: &str) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_auth_set_realm(self.as_ref().to_glib_none().0, realm.to_glib_none().0);
}
}
#[cfg(any(feature = "v1_12", feature = "dox"))] #[cfg(any(feature = "v1_12", feature = "dox"))]
fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) { fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) {
unsafe { unsafe {

View file

@ -81,6 +81,9 @@ pub trait RTSPClientExt: 'static {
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>); //fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>); fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>);
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>); fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>);
@ -239,6 +242,11 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_func() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_func() }
//} //}
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn set_send_messages_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, u32, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_messages_func() }
//}
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) { fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0); gst_rtsp_server_sys::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);

View file

@ -51,7 +51,8 @@ pub const NONE_RTSP_MEDIA: Option<&RTSPMedia> = None;
pub trait RTSPMediaExt: 'static { pub trait RTSPMediaExt: 'static {
fn collect_streams(&self); fn collect_streams(&self);
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool; //#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 10, id: 31 }) -> bool;
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream>; fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream>;
@ -65,10 +66,16 @@ pub trait RTSPMediaExt: 'static {
fn get_clock(&self) -> Option<gst::Clock>; fn get_clock(&self) -> Option<gst::Clock>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_do_retransmission(&self) -> bool;
fn get_element(&self) -> Option<gst::Element>; fn get_element(&self) -> Option<gst::Element>;
fn get_latency(&self) -> u32; fn get_latency(&self) -> u32;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32;
fn get_multicast_iface(&self) -> Option<GString>; fn get_multicast_iface(&self) -> Option<GString>;
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>; //fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>;
@ -95,6 +102,9 @@ pub trait RTSPMediaExt: 'static {
//fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool; //fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool;
fn is_eos_shutdown(&self) -> bool; fn is_eos_shutdown(&self) -> bool;
fn is_reusable(&self) -> bool; fn is_reusable(&self) -> bool;
@ -111,20 +121,31 @@ pub trait RTSPMediaExt: 'static {
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool; //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool; //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff; //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff;
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>); fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool);
fn set_buffer_size(&self, size: u32); fn set_buffer_size(&self, size: u32);
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>); fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_do_retransmission(&self, do_retransmission: bool);
fn set_eos_shutdown(&self, eos_shutdown: bool); fn set_eos_shutdown(&self, eos_shutdown: bool);
fn set_latency(&self, latency: u32); fn set_latency(&self, latency: u32);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool;
fn set_multicast_iface(&self, multicast_iface: Option<&str>); fn set_multicast_iface(&self, multicast_iface: Option<&str>);
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>); //fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>);
@ -143,7 +164,7 @@ pub trait RTSPMediaExt: 'static {
fn set_shared(&self, shared: bool); fn set_shared(&self, shared: bool);
//fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 }) -> bool; //fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 }) -> bool;
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool); fn set_stop_on_disconnect(&self, stop_on_disconnect: bool);
@ -163,8 +184,16 @@ pub trait RTSPMediaExt: 'static {
fn use_time_provider(&self, time_provider: bool); fn use_time_provider(&self, time_provider: bool);
fn get_property_bind_mcast_address(&self) -> bool;
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool);
fn get_property_eos_shutdown(&self) -> bool; fn get_property_eos_shutdown(&self) -> bool;
fn get_property_max_mcast_ttl(&self) -> u32;
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32);
fn get_property_reusable(&self) -> bool; fn get_property_reusable(&self) -> bool;
fn get_property_shared(&self) -> bool; fn get_property_shared(&self) -> bool;
@ -185,6 +214,8 @@ pub trait RTSPMediaExt: 'static {
fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_unprepared<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -193,6 +224,8 @@ pub trait RTSPMediaExt: 'static {
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -217,7 +250,8 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool { //#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 10, id: 31 }) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_complete_pipeline() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_complete_pipeline() }
//} //}
@ -257,6 +291,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_do_retransmission(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_do_retransmission(self.as_ref().to_glib_none().0))
}
}
fn get_element(&self) -> Option<gst::Element> { fn get_element(&self) -> Option<gst::Element> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0)) from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0))
@ -269,6 +310,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32 {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_get_max_mcast_ttl(self.as_ref().to_glib_none().0)
}
}
fn get_multicast_iface(&self) -> Option<GString> { fn get_multicast_iface(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0)) from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0))
@ -341,6 +389,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() }
//} //}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_bind_mcast_address(self.as_ref().to_glib_none().0))
}
}
fn is_eos_shutdown(&self) -> bool { fn is_eos_shutdown(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0))
@ -385,10 +440,12 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek() }
//} //}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool { //fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_full() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_full() }
//} //}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff { //fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() }
//} //}
@ -399,6 +456,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_set_bind_mcast_address(self.as_ref().to_glib_none().0, bind_mcast_addr.to_glib());
}
}
fn set_buffer_size(&self, size: u32) { fn set_buffer_size(&self, size: u32) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size); gst_rtsp_server_sys::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size);
@ -411,6 +475,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_do_retransmission(&self, do_retransmission: bool) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_set_do_retransmission(self.as_ref().to_glib_none().0, do_retransmission.to_glib());
}
}
fn set_eos_shutdown(&self, eos_shutdown: bool) { fn set_eos_shutdown(&self, eos_shutdown: bool) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); gst_rtsp_server_sys::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
@ -423,6 +494,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_set_max_mcast_ttl(self.as_ref().to_glib_none().0, ttl))
}
}
fn set_multicast_iface(&self, multicast_iface: Option<&str>) { fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0); gst_rtsp_server_sys::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0);
@ -475,7 +553,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
//fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 }) -> bool { //fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 }) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_state() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_state() }
//} //}
@ -531,6 +609,20 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn get_property_bind_mcast_address(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bind-mcast-address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) {
unsafe {
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bind-mcast-address\0".as_ptr() as *const _, Value::from(&bind_mcast_address).to_glib_none().0);
}
}
fn get_property_eos_shutdown(&self) -> bool { fn get_property_eos_shutdown(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
@ -539,6 +631,20 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn get_property_max_mcast_ttl(&self) -> u32 {
unsafe {
let mut value = Value::from_type(<u32 as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-mcast-ttl\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) {
unsafe {
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-mcast-ttl\0".as_ptr() as *const _, Value::from(&max_mcast_ttl).to_glib_none().0);
}
}
fn get_property_reusable(&self) -> bool { fn get_property_reusable(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
@ -617,6 +723,14 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn connect_property_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::bind-mcast-address\0".as_ptr() as *const _,
Some(transmute(notify_bind_mcast_address_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -649,6 +763,14 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
} }
} }
fn connect_property_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-mcast-ttl\0".as_ptr() as *const _,
Some(transmute(notify_max_mcast_ttl_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -750,6 +872,12 @@ where P: IsA<RTSPMedia> {
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
} }
unsafe extern "C" fn notify_bind_mcast_address_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMedia> {
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMedia> { where P: IsA<RTSPMedia> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);
@ -774,6 +902,12 @@ where P: IsA<RTSPMedia> {
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast()) f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
} }
unsafe extern "C" fn notify_max_mcast_ttl_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMedia> {
let f: &F = &*(f as *const F);
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMedia> { where P: IsA<RTSPMedia> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);

View file

@ -65,10 +65,16 @@ pub trait RTSPMediaFactoryExt: 'static {
fn get_clock(&self) -> Option<gst::Clock>; fn get_clock(&self) -> Option<gst::Clock>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_do_retransmission(&self) -> bool;
fn get_latency(&self) -> u32; fn get_latency(&self) -> u32;
fn get_launch(&self) -> Option<GString>; fn get_launch(&self) -> Option<GString>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32;
fn get_media_gtype(&self) -> glib::types::Type; fn get_media_gtype(&self) -> glib::types::Type;
fn get_multicast_iface(&self) -> Option<GString>; fn get_multicast_iface(&self) -> Option<GString>;
@ -87,6 +93,9 @@ pub trait RTSPMediaFactoryExt: 'static {
fn get_transport_mode(&self) -> RTSPTransportMode; fn get_transport_mode(&self) -> RTSPTransportMode;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool;
fn is_eos_shutdown(&self) -> bool; fn is_eos_shutdown(&self) -> bool;
fn is_shared(&self) -> bool; fn is_shared(&self) -> bool;
@ -95,16 +104,25 @@ pub trait RTSPMediaFactoryExt: 'static {
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>); fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool);
fn set_buffer_size(&self, size: u32); fn set_buffer_size(&self, size: u32);
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>); fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_do_retransmission(&self, do_retransmission: bool);
fn set_eos_shutdown(&self, eos_shutdown: bool); fn set_eos_shutdown(&self, eos_shutdown: bool);
fn set_latency(&self, latency: u32); fn set_latency(&self, latency: u32);
fn set_launch(&self, launch: &str); fn set_launch(&self, launch: &str);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool;
fn set_media_gtype(&self, media_gtype: glib::types::Type); fn set_media_gtype(&self, media_gtype: glib::types::Type);
fn set_multicast_iface(&self, multicast_iface: Option<&str>); fn set_multicast_iface(&self, multicast_iface: Option<&str>);
@ -127,8 +145,16 @@ pub trait RTSPMediaFactoryExt: 'static {
fn set_transport_mode(&self, mode: RTSPTransportMode); fn set_transport_mode(&self, mode: RTSPTransportMode);
fn get_property_bind_mcast_address(&self) -> bool;
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool);
fn get_property_eos_shutdown(&self) -> bool; fn get_property_eos_shutdown(&self) -> bool;
fn get_property_max_mcast_ttl(&self) -> u32;
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32);
fn get_property_shared(&self) -> bool; fn get_property_shared(&self) -> bool;
fn get_property_stop_on_disconnect(&self) -> bool; fn get_property_stop_on_disconnect(&self) -> bool;
@ -137,6 +163,8 @@ pub trait RTSPMediaFactoryExt: 'static {
fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_media_constructed<F: Fn(&Self, &RTSPMedia) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_clock_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -147,6 +175,8 @@ pub trait RTSPMediaFactoryExt: 'static {
fn connect_property_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_launch_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_protocols_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -195,6 +225,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_do_retransmission(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_do_retransmission(self.as_ref().to_glib_none().0))
}
}
fn get_latency(&self) -> u32 { fn get_latency(&self) -> u32 {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0) gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0)
@ -207,6 +244,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32 {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_get_max_mcast_ttl(self.as_ref().to_glib_none().0)
}
}
fn get_media_gtype(&self) -> glib::types::Type { fn get_media_gtype(&self) -> glib::types::Type {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0))
@ -259,6 +303,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_bind_mcast_address(self.as_ref().to_glib_none().0))
}
}
fn is_eos_shutdown(&self) -> bool { fn is_eos_shutdown(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0))
@ -283,6 +334,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_set_bind_mcast_address(self.as_ref().to_glib_none().0, bind_mcast_addr.to_glib());
}
}
fn set_buffer_size(&self, size: u32) { fn set_buffer_size(&self, size: u32) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size); gst_rtsp_server_sys::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
@ -295,6 +353,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_do_retransmission(&self, do_retransmission: bool) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_set_do_retransmission(self.as_ref().to_glib_none().0, do_retransmission.to_glib());
}
}
fn set_eos_shutdown(&self, eos_shutdown: bool) { fn set_eos_shutdown(&self, eos_shutdown: bool) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib()); gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
@ -313,6 +378,13 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_set_max_mcast_ttl(self.as_ref().to_glib_none().0, ttl))
}
}
fn set_media_gtype(&self, media_gtype: glib::types::Type) { fn set_media_gtype(&self, media_gtype: glib::types::Type) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib()); gst_rtsp_server_sys::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib());
@ -377,6 +449,20 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn get_property_bind_mcast_address(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bind-mcast-address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_bind_mcast_address(&self, bind_mcast_address: bool) {
unsafe {
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bind-mcast-address\0".as_ptr() as *const _, Value::from(&bind_mcast_address).to_glib_none().0);
}
}
fn get_property_eos_shutdown(&self) -> bool { fn get_property_eos_shutdown(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
@ -385,6 +471,20 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn get_property_max_mcast_ttl(&self) -> u32 {
unsafe {
let mut value = Value::from_type(<u32 as StaticType>::static_type());
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-mcast-ttl\0".as_ptr() as *const _, value.to_glib_none_mut().0);
value.get().unwrap()
}
}
fn set_property_max_mcast_ttl(&self, max_mcast_ttl: u32) {
unsafe {
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-mcast-ttl\0".as_ptr() as *const _, Value::from(&max_mcast_ttl).to_glib_none().0);
}
}
fn get_property_shared(&self) -> bool { fn get_property_shared(&self) -> bool {
unsafe { unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type()); let mut value = Value::from_type(<bool as StaticType>::static_type());
@ -417,6 +517,14 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn connect_property_bind_mcast_address_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::bind-mcast-address\0".as_ptr() as *const _,
Some(transmute(notify_bind_mcast_address_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_buffer_size_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -457,6 +565,14 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
} }
} }
fn connect_property_max_mcast_ttl_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"notify::max-mcast-ttl\0".as_ptr() as *const _,
Some(transmute(notify_max_mcast_ttl_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -518,6 +634,12 @@ where P: IsA<RTSPMediaFactory> {
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
} }
unsafe extern "C" fn notify_bind_mcast_address_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMediaFactory> {
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMediaFactory> { where P: IsA<RTSPMediaFactory> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);
@ -548,6 +670,12 @@ where P: IsA<RTSPMediaFactory> {
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast()) f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
} }
unsafe extern "C" fn notify_max_mcast_ttl_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMediaFactory> {
let f: &F = &*(f as *const F);
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPMediaFactory> { where P: IsA<RTSPMediaFactory> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);

View file

@ -47,7 +47,8 @@ pub trait RTSPSessionMediaExt: 'static {
fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport>; fn get_transport(&self, idx: u32) -> Option<RTSPStreamTransport>;
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 }; //#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 };
fn matches(&self, path: &str) -> Option<i32>; fn matches(&self, path: &str) -> Option<i32>;
@ -91,7 +92,8 @@ impl<O: IsA<RTSPSessionMedia>> RTSPSessionMediaExt for O {
} }
} }
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 } { //#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn get_transports(&self) -> /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 27 } {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_transports() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_session_media_get_transports() }
//} //}

View file

@ -47,10 +47,14 @@ unsafe impl Sync for RTSPStream {}
pub const NONE_RTSP_STREAM: Option<&RTSPStream> = None; pub const NONE_RTSP_STREAM: Option<&RTSPStream> = None;
pub trait RTSPStreamExt: 'static { pub trait RTSPStreamExt: 'static {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn add_multicast_client_address(&self, destination: &str, rtp_port: u32, rtcp_port: u32, family: gio::SocketFamily) -> bool;
fn add_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError>; fn add_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError>;
//fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool; //fn allocate_udp_sockets(&self, family: gio::SocketFamily, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport, use_client_settings: bool) -> bool;
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool; //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool;
fn get_address_pool(&self) -> Option<RTSPAddressPool>; fn get_address_pool(&self) -> Option<RTSPAddressPool>;
@ -69,10 +73,16 @@ pub trait RTSPStreamExt: 'static {
fn get_joined_bin(&self) -> Option<gst::Bin>; fn get_joined_bin(&self) -> Option<gst::Bin>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32;
fn get_mtu(&self) -> u32; fn get_mtu(&self) -> u32;
fn get_multicast_address(&self, family: gio::SocketFamily) -> Option<RTSPAddress>; fn get_multicast_address(&self, family: gio::SocketFamily) -> Option<RTSPAddress>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_multicast_client_addresses(&self) -> Option<GString>;
fn get_multicast_iface(&self) -> Option<GString>; fn get_multicast_iface(&self) -> Option<GString>;
fn get_profiles(&self) -> gst_rtsp::RTSPProfile; fn get_profiles(&self) -> gst_rtsp::RTSPProfile;
@ -87,6 +97,7 @@ pub trait RTSPStreamExt: 'static {
fn get_retransmission_time(&self) -> gst::ClockTime; fn get_retransmission_time(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>; fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>; fn get_rtcp_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
@ -109,16 +120,33 @@ pub trait RTSPStreamExt: 'static {
fn get_ssrc(&self) -> u32; fn get_ssrc(&self) -> u32;
fn get_ulpfec_enabled(&self) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_ulpfec_percentage(&self) -> u32;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_ulpfec_pt(&self) -> u32;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn handle_keymgmt(&self, keymgmt: &str) -> bool;
fn has_control(&self, control: Option<&str>) -> bool; fn has_control(&self, control: Option<&str>) -> bool;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool;
fn is_blocking(&self) -> bool; fn is_blocking(&self) -> bool;
fn is_client_side(&self) -> bool; fn is_client_side(&self) -> bool;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_complete(&self) -> bool; fn is_complete(&self) -> bool;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_receiver(&self) -> bool; fn is_receiver(&self) -> bool;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_sender(&self) -> bool; fn is_sender(&self) -> bool;
//fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool; //fn is_transport_supported(&self, transport: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> bool;
@ -129,14 +157,27 @@ pub trait RTSPStreamExt: 'static {
fn remove_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError>; fn remove_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_aux_receiver(&self, sessid: u32) -> Option<gst::Element>;
fn request_aux_sender(&self, sessid: u32) -> Option<gst::Element>; fn request_aux_sender(&self, sessid: u32) -> Option<gst::Element>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_ulpfec_decoder<P: IsA<gst::Element>>(&self, rtpbin: &P, sessid: u32) -> Option<gst::Element>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_ulpfec_encoder(&self, sessid: u32) -> Option<gst::Element>;
fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress>; fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress>;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn seekable(&self) -> bool; fn seekable(&self) -> bool;
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>); fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool);
fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError>; fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError>;
fn set_buffer_size(&self, size: u32); fn set_buffer_size(&self, size: u32);
@ -147,6 +188,9 @@ pub trait RTSPStreamExt: 'static {
fn set_dscp_qos(&self, dscp_qos: i32); fn set_dscp_qos(&self, dscp_qos: i32);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool;
fn set_mtu(&self, mtu: u32); fn set_mtu(&self, mtu: u32);
fn set_multicast_iface(&self, multicast_iface: Option<&str>); fn set_multicast_iface(&self, multicast_iface: Option<&str>);
@ -165,16 +209,27 @@ pub trait RTSPStreamExt: 'static {
fn set_seqnum_offset(&self, seqnum: u16); fn set_seqnum_offset(&self, seqnum: u16);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_ulpfec_percentage(&self, percentage: u32);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_ulpfec_pt(&self, pt: u32);
fn transport_filter(&self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>) -> Vec<RTSPStreamTransport>; fn transport_filter(&self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>) -> Vec<RTSPStreamTransport>;
fn unblock_linked(&self) -> Result<(), glib::error::BoolError>; fn unblock_linked(&self) -> Result<(), glib::error::BoolError>;
fn update_crypto(&self, ssrc: u32, crypto: Option<&gst::Caps>) -> Result<(), glib::error::BoolError>; fn update_crypto(&self, ssrc: u32, crypto: Option<&gst::Caps>) -> Result<(), glib::error::BoolError>;
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn verify_mcast_ttl(&self, ttl: u32) -> bool;
fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_new_rtp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_new_rtp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_new_rtp_rtcp_decoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_control_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_control_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_profiles_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
@ -183,6 +238,13 @@ pub trait RTSPStreamExt: 'static {
} }
impl<O: IsA<RTSPStream>> RTSPStreamExt for O { impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn add_multicast_client_address(&self, destination: &str, rtp_port: u32, rtcp_port: u32, family: gio::SocketFamily) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_add_multicast_client_address(self.as_ref().to_glib_none().0, destination.to_glib_none().0, rtp_port, rtcp_port, family.to_glib()))
}
}
fn add_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError> { fn add_transport<P: IsA<RTSPStreamTransport>>(&self, trans: &P) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_add_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to add transport") glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_add_transport(self.as_ref().to_glib_none().0, trans.as_ref().to_glib_none().0), "Failed to add transport")
@ -193,6 +255,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_allocate_udp_sockets() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_allocate_udp_sockets() }
//} //}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool { //fn complete_stream(&self, transport: /*Ignored*/&gst_rtsp::RTSPTransport) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_complete_stream() } // unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_complete_stream() }
//} //}
@ -245,6 +308,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_max_mcast_ttl(&self) -> u32 {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_get_max_mcast_ttl(self.as_ref().to_glib_none().0)
}
}
fn get_mtu(&self) -> u32 { fn get_mtu(&self) -> u32 {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0) gst_rtsp_server_sys::gst_rtsp_stream_get_mtu(self.as_ref().to_glib_none().0)
@ -257,6 +327,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_multicast_client_addresses(&self) -> Option<GString> {
unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_client_addresses(self.as_ref().to_glib_none().0))
}
}
fn get_multicast_iface(&self) -> Option<GString> { fn get_multicast_iface(&self) -> Option<GString> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_iface(self.as_ref().to_glib_none().0)) from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_multicast_iface(self.as_ref().to_glib_none().0))
@ -299,6 +376,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> { fn get_rtcp_multicast_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib())) from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_get_rtcp_multicast_socket(self.as_ref().to_glib_none().0, family.to_glib()))
@ -370,12 +448,46 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
fn get_ulpfec_enabled(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_enabled(self.as_ref().to_glib_none().0))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_ulpfec_percentage(&self) -> u32 {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_percentage(self.as_ref().to_glib_none().0)
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn get_ulpfec_pt(&self) -> u32 {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_get_ulpfec_pt(self.as_ref().to_glib_none().0)
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn handle_keymgmt(&self, keymgmt: &str) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_handle_keymgmt(self.as_ref().to_glib_none().0, keymgmt.to_glib_none().0))
}
}
fn has_control(&self, control: Option<&str>) -> bool { fn has_control(&self, control: Option<&str>) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_has_control(self.as_ref().to_glib_none().0, control.to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_has_control(self.as_ref().to_glib_none().0, control.to_glib_none().0))
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn is_bind_mcast_address(&self) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_bind_mcast_address(self.as_ref().to_glib_none().0))
}
}
fn is_blocking(&self) -> bool { fn is_blocking(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_blocking(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_blocking(self.as_ref().to_glib_none().0))
@ -388,18 +500,21 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_complete(&self) -> bool { fn is_complete(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_complete(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_complete(self.as_ref().to_glib_none().0))
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_receiver(&self) -> bool { fn is_receiver(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_receiver(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_receiver(self.as_ref().to_glib_none().0))
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_sender(&self) -> bool { fn is_sender(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_sender(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_is_sender(self.as_ref().to_glib_none().0))
@ -428,18 +543,40 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_aux_receiver(&self, sessid: u32) -> Option<gst::Element> {
unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_receiver(self.as_ref().to_glib_none().0, sessid))
}
}
fn request_aux_sender(&self, sessid: u32) -> Option<gst::Element> { fn request_aux_sender(&self, sessid: u32) -> Option<gst::Element> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_sender(self.as_ref().to_glib_none().0, sessid)) from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_aux_sender(self.as_ref().to_glib_none().0, sessid))
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_ulpfec_decoder<P: IsA<gst::Element>>(&self, rtpbin: &P, sessid: u32) -> Option<gst::Element> {
unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_ulpfec_decoder(self.as_ref().to_glib_none().0, rtpbin.as_ref().to_glib_none().0, sessid))
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn request_ulpfec_encoder(&self, sessid: u32) -> Option<gst::Element> {
unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_request_ulpfec_encoder(self.as_ref().to_glib_none().0, sessid))
}
}
fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress> { fn reserve_address(&self, address: &str, port: u32, n_ports: u32, ttl: u32) -> Option<RTSPAddress> {
unsafe { unsafe {
from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_reserve_address(self.as_ref().to_glib_none().0, address.to_glib_none().0, port, n_ports, ttl)) from_glib_full(gst_rtsp_server_sys::gst_rtsp_stream_reserve_address(self.as_ref().to_glib_none().0, address.to_glib_none().0, port, n_ports, ttl))
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn seekable(&self) -> bool { fn seekable(&self) -> bool {
unsafe { unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_seekable(self.as_ref().to_glib_none().0)) from_glib(gst_rtsp_server_sys::gst_rtsp_stream_seekable(self.as_ref().to_glib_none().0))
@ -452,6 +589,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_bind_mcast_address(&self, bind_mcast_addr: bool) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_set_bind_mcast_address(self.as_ref().to_glib_none().0, bind_mcast_addr.to_glib());
}
}
fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError> { fn set_blocked(&self, blocked: bool) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_set_blocked(self.as_ref().to_glib_none().0, blocked.to_glib()), "Failed to block/unblock the dataflow") glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_set_blocked(self.as_ref().to_glib_none().0, blocked.to_glib()), "Failed to block/unblock the dataflow")
@ -482,6 +626,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_max_mcast_ttl(&self, ttl: u32) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_set_max_mcast_ttl(self.as_ref().to_glib_none().0, ttl))
}
}
fn set_mtu(&self, mtu: u32) { fn set_mtu(&self, mtu: u32) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu); gst_rtsp_server_sys::gst_rtsp_stream_set_mtu(self.as_ref().to_glib_none().0, mtu);
@ -536,6 +687,20 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_ulpfec_percentage(&self, percentage: u32) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_set_ulpfec_percentage(self.as_ref().to_glib_none().0, percentage);
}
}
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn set_ulpfec_pt(&self, pt: u32) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_set_ulpfec_pt(self.as_ref().to_glib_none().0, pt);
}
}
fn transport_filter(&self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>) -> Vec<RTSPStreamTransport> { fn transport_filter(&self, func: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)>) -> Vec<RTSPStreamTransport> {
let func_data: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)> = func; let func_data: Option<&mut dyn (FnMut(&RTSPStream, &RTSPStreamTransport) -> RTSPFilterResult)> = func;
unsafe extern "C" fn func_func(stream: *mut gst_rtsp_server_sys::GstRTSPStream, trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult { unsafe extern "C" fn func_func(stream: *mut gst_rtsp_server_sys::GstRTSPStream, trans: *mut gst_rtsp_server_sys::GstRTSPStreamTransport, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult {
@ -568,6 +733,13 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn verify_mcast_ttl(&self, ttl: u32) -> bool {
unsafe {
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_verify_mcast_ttl(self.as_ref().to_glib_none().0, ttl))
}
}
fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_new_rtcp_encoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -584,6 +756,14 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
} }
} }
fn connect_new_rtp_rtcp_decoder<F: Fn(&Self, &gst::Element) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(self.as_ptr() as *mut _, b"new-rtp-rtcp-decoder\0".as_ptr() as *const _,
Some(transmute(new_rtp_rtcp_decoder_trampoline::<Self, F> as usize)), Box_::into_raw(f))
}
}
fn connect_property_control_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId { fn connect_property_control_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
unsafe { unsafe {
let f: Box_<F> = Box_::new(f); let f: Box_<F> = Box_::new(f);
@ -621,6 +801,12 @@ where P: IsA<RTSPStream> {
f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object)) f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
} }
unsafe extern "C" fn new_rtp_rtcp_decoder_trampoline<P, F: Fn(&P, &gst::Element) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPStream, object: *mut gst_sys::GstElement, f: glib_sys::gpointer)
where P: IsA<RTSPStream> {
let f: &F = &*(f as *const F);
f(&RTSPStream::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
}
unsafe extern "C" fn notify_control_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) unsafe extern "C" fn notify_control_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPStream, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<RTSPStream> { where P: IsA<RTSPStream> {
let f: &F = &*(f as *const F); let f: &F = &*(f as *const F);

View file

@ -41,16 +41,30 @@ pub trait RTSPStreamTransportExt: 'static {
fn keep_alive(&self); fn keep_alive(&self);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn message_sent(&self);
fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>;
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn send_rtcp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool;
fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>; fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError>;
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn send_rtp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool;
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>; fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>;
//fn set_callbacks<P: Fn(&gst::Buffer, u8) -> bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q); //fn set_callbacks<P: Fn(&gst::Buffer, u8) -> bool + 'static, Q: Fn(&gst::Buffer, u8) -> bool + 'static>(&self, send_rtp: P, send_rtcp: Q);
fn set_keepalive<P: Fn() + 'static>(&self, keep_alive: P); fn set_keepalive<P: Fn() + 'static>(&self, keep_alive: P);
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn set_list_callbacks(&self, send_rtp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, send_rtcp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
fn set_message_sent<P: Fn() + 'static>(&self, message_sent: P);
fn set_timed_out(&self, timedout: bool); fn set_timed_out(&self, timedout: bool);
//fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport); //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport);
@ -93,18 +107,35 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn message_sent(&self) {
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_transport_message_sent(self.as_ref().to_glib_none().0);
}
}
fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { fn send_rtcp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtcp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp") glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtcp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtcp")
} }
} }
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn send_rtcp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtcp_list() }
//}
fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> { fn send_rtp(&self, buffer: &gst::Buffer) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp") glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_send_rtp(self.as_ref().to_glib_none().0, buffer.to_glib_none().0), "Failed to send rtp")
} }
} }
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn send_rtp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtp_list() }
//}
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> { fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError> {
unsafe { unsafe {
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to set active") glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_stream_transport_set_active(self.as_ref().to_glib_none().0, active.to_glib()), "Failed to set active")
@ -132,6 +163,28 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
} }
} }
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//fn set_list_callbacks(&self, send_rtp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, send_rtcp_list: /*Unimplemented*/Fn(/*Ignored*/gst::BufferList, u8) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_set_list_callbacks() }
//}
fn set_message_sent<P: Fn() + 'static>(&self, message_sent: P) {
let message_sent_data: Box_<P> = Box::new(message_sent);
unsafe extern "C" fn message_sent_func<P: Fn() + 'static>(user_data: glib_sys::gpointer) {
let callback: &P = &*(user_data as *mut _);
(*callback)();
}
let message_sent = Some(message_sent_func::<P> as _);
unsafe extern "C" fn notify_func<P: Fn() + 'static>(data: glib_sys::gpointer) {
let _callback: Box_<P> = Box_::from_raw(data as *mut _);
}
let destroy_call3 = Some(notify_func::<P> as _);
let super_callback0: Box_<P> = message_sent_data;
unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_message_sent(self.as_ref().to_glib_none().0, message_sent, Box::into_raw(super_callback0) as *mut _, destroy_call3);
}
}
fn set_timed_out(&self, timedout: bool) { fn set_timed_out(&self, timedout: bool) {
unsafe { unsafe {
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out(self.as_ref().to_glib_none().0, timedout.to_glib()); gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out(self.as_ref().to_glib_none().0, timedout.to_glib());

View file

@ -35,6 +35,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-sdp-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-rtsp-sys/v1_10", "gstreamer-sdp-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-rtsp-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-rtsp-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-rtsp-sys/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -224,6 +224,8 @@ pub enum RTSPHeaderField {
MediaProperties, MediaProperties,
SeekStyle, SeekStyle,
AcceptRanges, AcceptRanges,
Frames,
RateControl,
Last, Last,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
@ -322,6 +324,8 @@ impl ToGlib for RTSPHeaderField {
RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES, RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES,
RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE, RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE,
RTSPHeaderField::AcceptRanges => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_RANGES, RTSPHeaderField::AcceptRanges => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_RANGES,
RTSPHeaderField::Frames => gst_rtsp_sys::GST_RTSP_HDR_FRAMES,
RTSPHeaderField::RateControl => gst_rtsp_sys::GST_RTSP_HDR_RATE_CONTROL,
RTSPHeaderField::Last => gst_rtsp_sys::GST_RTSP_HDR_LAST, RTSPHeaderField::Last => gst_rtsp_sys::GST_RTSP_HDR_LAST,
RTSPHeaderField::__Unknown(value) => value RTSPHeaderField::__Unknown(value) => value
} }
@ -420,7 +424,9 @@ impl FromGlib<gst_rtsp_sys::GstRTSPHeaderField> for RTSPHeaderField {
84 => RTSPHeaderField::MediaProperties, 84 => RTSPHeaderField::MediaProperties,
85 => RTSPHeaderField::SeekStyle, 85 => RTSPHeaderField::SeekStyle,
86 => RTSPHeaderField::AcceptRanges, 86 => RTSPHeaderField::AcceptRanges,
87 => RTSPHeaderField::Last, 87 => RTSPHeaderField::Frames,
88 => RTSPHeaderField::RateControl,
89 => RTSPHeaderField::Last,
value => RTSPHeaderField::__Unknown(value), value => RTSPHeaderField::__Unknown(value),
} }
} }

View file

@ -32,6 +32,7 @@ v1_8_1 = ["gstreamer-sdp-sys/v1_8_1"]
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-sdp-sys/v1_10", "v1_8_1"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-sdp-sys/v1_10", "v1_8_1"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-sdp-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-sdp-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -33,6 +33,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10", "gstreamer-video-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10", "gstreamer-video-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "gstreamer-video-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "gstreamer-video-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "gstreamer-video-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "gstreamer-video-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-video-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"]

View file

@ -97,6 +97,10 @@ pub enum VideoColorPrimaries {
Film, Film,
Bt2020, Bt2020,
Adobergb, Adobergb,
Smptest428,
Smpterp431,
Smpteeg432,
Ebu3213,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
} }
@ -116,6 +120,10 @@ impl ToGlib for VideoColorPrimaries {
VideoColorPrimaries::Film => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_FILM, VideoColorPrimaries::Film => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_FILM,
VideoColorPrimaries::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT2020, VideoColorPrimaries::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT2020,
VideoColorPrimaries::Adobergb => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, VideoColorPrimaries::Adobergb => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB,
VideoColorPrimaries::Smptest428 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428,
VideoColorPrimaries::Smpterp431 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431,
VideoColorPrimaries::Smpteeg432 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432,
VideoColorPrimaries::Ebu3213 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_EBU3213,
VideoColorPrimaries::__Unknown(value) => value VideoColorPrimaries::__Unknown(value) => value
} }
} }
@ -135,6 +143,10 @@ impl FromGlib<gst_video_sys::GstVideoColorPrimaries> for VideoColorPrimaries {
6 => VideoColorPrimaries::Film, 6 => VideoColorPrimaries::Film,
7 => VideoColorPrimaries::Bt2020, 7 => VideoColorPrimaries::Bt2020,
8 => VideoColorPrimaries::Adobergb, 8 => VideoColorPrimaries::Adobergb,
9 => VideoColorPrimaries::Smptest428,
10 => VideoColorPrimaries::Smpterp431,
11 => VideoColorPrimaries::Smpteeg432,
12 => VideoColorPrimaries::Ebu3213,
value => VideoColorPrimaries::__Unknown(value), value => VideoColorPrimaries::__Unknown(value),
} }
} }
@ -316,6 +328,11 @@ pub enum VideoFormat {
Gray10Le32, Gray10Le32,
Nv1210le32, Nv1210le32,
Nv1610le32, Nv1610le32,
Nv1210le40,
Y210,
Y410,
Vuya,
Bgr10a2Le,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
} }
@ -407,6 +424,11 @@ impl ToGlib for VideoFormat {
VideoFormat::Gray10Le32 => gst_video_sys::GST_VIDEO_FORMAT_GRAY10_LE32, VideoFormat::Gray10Le32 => gst_video_sys::GST_VIDEO_FORMAT_GRAY10_LE32,
VideoFormat::Nv1210le32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE32, VideoFormat::Nv1210le32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE32,
VideoFormat::Nv1610le32 => gst_video_sys::GST_VIDEO_FORMAT_NV16_10LE32, VideoFormat::Nv1610le32 => gst_video_sys::GST_VIDEO_FORMAT_NV16_10LE32,
VideoFormat::Nv1210le40 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE40,
VideoFormat::Y210 => gst_video_sys::GST_VIDEO_FORMAT_Y210,
VideoFormat::Y410 => gst_video_sys::GST_VIDEO_FORMAT_Y410,
VideoFormat::Vuya => gst_video_sys::GST_VIDEO_FORMAT_VUYA,
VideoFormat::Bgr10a2Le => gst_video_sys::GST_VIDEO_FORMAT_BGR10A2_LE,
VideoFormat::__Unknown(value) => value VideoFormat::__Unknown(value) => value
} }
} }
@ -498,6 +520,11 @@ impl FromGlib<gst_video_sys::GstVideoFormat> for VideoFormat {
78 => VideoFormat::Gray10Le32, 78 => VideoFormat::Gray10Le32,
79 => VideoFormat::Nv1210le32, 79 => VideoFormat::Nv1210le32,
80 => VideoFormat::Nv1610le32, 80 => VideoFormat::Nv1610le32,
81 => VideoFormat::Nv1210le40,
82 => VideoFormat::Y210,
83 => VideoFormat::Y410,
84 => VideoFormat::Vuya,
85 => VideoFormat::Bgr10a2Le,
value => VideoFormat::__Unknown(value), value => VideoFormat::__Unknown(value),
} }
} }
@ -534,6 +561,7 @@ pub enum VideoInterlaceMode {
Interleaved, Interleaved,
Mixed, Mixed,
Fields, Fields,
Alternate,
#[doc(hidden)] #[doc(hidden)]
__Unknown(i32), __Unknown(i32),
} }
@ -548,6 +576,7 @@ impl ToGlib for VideoInterlaceMode {
VideoInterlaceMode::Interleaved => gst_video_sys::GST_VIDEO_INTERLACE_MODE_INTERLEAVED, VideoInterlaceMode::Interleaved => gst_video_sys::GST_VIDEO_INTERLACE_MODE_INTERLEAVED,
VideoInterlaceMode::Mixed => gst_video_sys::GST_VIDEO_INTERLACE_MODE_MIXED, VideoInterlaceMode::Mixed => gst_video_sys::GST_VIDEO_INTERLACE_MODE_MIXED,
VideoInterlaceMode::Fields => gst_video_sys::GST_VIDEO_INTERLACE_MODE_FIELDS, VideoInterlaceMode::Fields => gst_video_sys::GST_VIDEO_INTERLACE_MODE_FIELDS,
VideoInterlaceMode::Alternate => gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE,
VideoInterlaceMode::__Unknown(value) => value VideoInterlaceMode::__Unknown(value) => value
} }
} }
@ -562,6 +591,7 @@ impl FromGlib<gst_video_sys::GstVideoInterlaceMode> for VideoInterlaceMode {
1 => VideoInterlaceMode::Interleaved, 1 => VideoInterlaceMode::Interleaved,
2 => VideoInterlaceMode::Mixed, 2 => VideoInterlaceMode::Mixed,
3 => VideoInterlaceMode::Fields, 3 => VideoInterlaceMode::Fields,
4 => VideoInterlaceMode::Alternate,
value => VideoInterlaceMode::__Unknown(value), value => VideoInterlaceMode::__Unknown(value),
} }
} }

View file

@ -180,6 +180,8 @@ bitflags! {
const ONEFIELD = 8; const ONEFIELD = 8;
const MULTIPLE_VIEW = 16; const MULTIPLE_VIEW = 16;
const FIRST_IN_BUNDLE = 32; const FIRST_IN_BUNDLE = 32;
const TOP_FIELD = 10;
const BOTTOM_FIELD = 8;
} }
} }
@ -303,6 +305,30 @@ impl FromGlib<gst_video_sys::GstVideoOverlayFormatFlags> for VideoOverlayFormatF
} }
} }
impl StaticType for VideoOverlayFormatFlags {
fn static_type() -> Type {
unsafe { from_glib(gst_video_sys::gst_video_overlay_format_flags_get_type()) }
}
}
impl<'a> FromValueOptional<'a> for VideoOverlayFormatFlags {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
impl<'a> FromValue<'a> for VideoOverlayFormatFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for VideoOverlayFormatFlags {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))] #[cfg(any(feature = "v1_10", feature = "dox"))]
bitflags! { bitflags! {
pub struct VideoTimeCodeFlags: u32 { pub struct VideoTimeCodeFlags: u32 {

View file

@ -16,10 +16,12 @@ glib_wrapper! {
} }
impl VideoOverlay { impl VideoOverlay {
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) { //pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_install_properties() } // unsafe { TODO: call gst_video_sys:gst_video_overlay_install_properties() }
//} //}
//#[cfg(any(feature = "v1_14", feature = "dox"))]
//pub fn set_property<P: IsA<glib::Object>>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool { //pub fn set_property<P: IsA<glib::Object>>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool {
// unsafe { TODO: call gst_video_sys:gst_video_overlay_set_property() } // unsafe { TODO: call gst_video_sys:gst_video_overlay_set_property() }
//} //}

View file

@ -31,3 +31,4 @@ default = []
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"] dox = ["gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"]
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-webrtc-sys/v1_16"]

View file

@ -42,6 +42,7 @@ default = []
v1_10 = ["gstreamer-sys/v1_10"] v1_10 = ["gstreamer-sys/v1_10"]
v1_12 = ["gstreamer-sys/v1_12", "v1_10"] v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
v1_14 = ["gstreamer-sys/v1_14", "v1_12"] v1_14 = ["gstreamer-sys/v1_14", "v1_12"]
v1_16 = ["gstreamer-sys/v1_16", "v1_14"]
embed-lgpl-docs = ["rustdoc-stripper"] embed-lgpl-docs = ["rustdoc-stripper"]
purge-lgpl-docs = ["rustdoc-stripper"] purge-lgpl-docs = ["rustdoc-stripper"]
dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"] dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"]

View file

@ -54,7 +54,7 @@ impl Bus {
} }
//#[cfg(any(feature = "v1_14", feature = "dox"))] //#[cfg(any(feature = "v1_14", feature = "dox"))]
//pub fn get_pollfd(&self, fd: /*Ignored*/&mut glib::PollFD) { //pub fn get_pollfd(&self, fd: /*Ignored*/glib::PollFD) {
// unsafe { TODO: call gst_sys:gst_bus_get_pollfd() } // unsafe { TODO: call gst_sys:gst_bus_get_pollfd() }
//} //}

View file

@ -32,6 +32,11 @@ impl Clock {
// unsafe { TODO: call gst_sys:gst_clock_id_compare_func() } // unsafe { TODO: call gst_sys:gst_clock_id_compare_func() }
//} //}
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//pub fn id_get_clock(id: /*Unimplemented*/ClockID) -> Option<Clock> {
// unsafe { TODO: call gst_sys:gst_clock_id_get_clock() }
//}
//pub fn id_get_time(id: /*Unimplemented*/ClockID) -> ClockTime { //pub fn id_get_time(id: /*Unimplemented*/ClockID) -> ClockTime {
// unsafe { TODO: call gst_sys:gst_clock_id_get_time() } // unsafe { TODO: call gst_sys:gst_clock_id_get_time() }
//} //}
@ -48,6 +53,11 @@ impl Clock {
// unsafe { TODO: call gst_sys:gst_clock_id_unschedule() } // unsafe { TODO: call gst_sys:gst_clock_id_unschedule() }
//} //}
//#[cfg(any(feature = "v1_16", feature = "dox"))]
//pub fn id_uses_clock<P: IsA<Clock>>(id: /*Unimplemented*/ClockID, clock: &P) -> bool {
// unsafe { TODO: call gst_sys:gst_clock_id_uses_clock() }
//}
//pub fn id_wait(id: /*Unimplemented*/ClockID) -> (ClockReturn, ClockTimeDiff) { //pub fn id_wait(id: /*Unimplemented*/ClockID) -> (ClockReturn, ClockTimeDiff) {
// unsafe { TODO: call gst_sys:gst_clock_id_wait() } // unsafe { TODO: call gst_sys:gst_clock_id_wait() }
//} //}

View file

@ -47,6 +47,9 @@ pub trait DeviceProviderExt: 'static {
fn device_add<P: IsA<Device>>(&self, device: &P); fn device_add<P: IsA<Device>>(&self, device: &P);
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn device_changed<P: IsA<Device>, Q: IsA<Device>>(&self, device: &P, changed_device: &Q);
fn device_remove<P: IsA<Device>>(&self, device: &P); fn device_remove<P: IsA<Device>>(&self, device: &P);
fn get_bus(&self) -> Bus; fn get_bus(&self) -> Bus;
@ -83,6 +86,13 @@ impl<O: IsA<DeviceProvider>> DeviceProviderExt for O {
} }
} }
#[cfg(any(feature = "v1_16", feature = "dox"))]
fn device_changed<P: IsA<Device>, Q: IsA<Device>>(&self, device: &P, changed_device: &Q) {
unsafe {
gst_sys::gst_device_provider_device_changed(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0, changed_device.as_ref().to_glib_none().0);
}
}
fn device_remove<P: IsA<Device>>(&self, device: &P) { fn device_remove<P: IsA<Device>>(&self, device: &P) {
unsafe { unsafe {
gst_sys::gst_device_provider_device_remove(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0); gst_sys::gst_device_provider_device_remove(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0);