mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
Regenerate everything for 1.16.0
This commit is contained in:
parent
5c32a0d1d3
commit
88dcb82c8d
44 changed files with 1290 additions and 11 deletions
|
@ -33,6 +33,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-app-sys/dox", "glib/dox", "gstreamer/dox", "gstreamer-base/dox"]
|
||||
|
|
|
@ -31,6 +31,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-audio-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -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_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_16 = ["gstreamer-sys/v1_16", "gstreamer-base-sys/v1_16", "v1_14_1"]
|
||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-base-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -45,6 +45,9 @@ pub trait AggregatorExt: 'static {
|
|||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
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 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 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
|
|
|
@ -2,10 +2,23 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// 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::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use gst_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
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"))]
|
||||
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 {
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
#[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())
|
||||
}
|
||||
|
|
|
@ -46,6 +46,9 @@ pub trait BaseSinkExt: 'static {
|
|||
|
||||
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_sync(&self) -> bool;
|
||||
|
@ -75,6 +78,9 @@ pub trait BaseSinkExt: 'static {
|
|||
|
||||
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_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;
|
||||
|
||||
#[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_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 {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
|
@ -459,6 +491,13 @@ where P: IsA<BaseSink> {
|
|||
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)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
|
|
@ -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> {
|
||||
assert_initialized_main_thread!();
|
||||
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() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-check-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -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>) {
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_multiple_pending_ids() }
|
||||
//}
|
||||
|
|
|
@ -41,3 +41,4 @@ x11 = ["gstreamer-gl-sys/x11"]
|
|||
wayland = ["gstreamer-gl-sys/wayland"]
|
||||
embed-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"]
|
||||
|
|
|
@ -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(Clone, Copy)]
|
||||
pub enum GLFormat {
|
||||
|
@ -97,8 +121,10 @@ pub enum GLFormat {
|
|||
Rgb,
|
||||
Rgb8,
|
||||
Rgb565,
|
||||
Rgb16,
|
||||
Rgba,
|
||||
Rgba8,
|
||||
Rgba16,
|
||||
DepthComponent16,
|
||||
Depth24Stencil8,
|
||||
#[doc(hidden)]
|
||||
|
@ -121,8 +147,10 @@ impl ToGlib for GLFormat {
|
|||
GLFormat::Rgb => gst_gl_sys::GST_GL_RGB,
|
||||
GLFormat::Rgb8 => gst_gl_sys::GST_GL_RGB8,
|
||||
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::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::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8,
|
||||
GLFormat::__Unknown(value) => value
|
||||
|
@ -145,8 +173,10 @@ impl FromGlib<gst_gl_sys::GstGLFormat> for GLFormat {
|
|||
6407 => GLFormat::Rgb,
|
||||
32849 => GLFormat::Rgb8,
|
||||
36194 => GLFormat::Rgb565,
|
||||
32852 => GLFormat::Rgb16,
|
||||
6408 => GLFormat::Rgba,
|
||||
32856 => GLFormat::Rgba8,
|
||||
32859 => GLFormat::Rgba16,
|
||||
33189 => GLFormat::DepthComponent16,
|
||||
35056 => GLFormat::Depth24Stencil8,
|
||||
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(Clone, Copy)]
|
||||
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(Clone, Copy)]
|
||||
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(Clone, Copy)]
|
||||
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(Clone, Copy)]
|
||||
pub enum GLStereoDownmix {
|
||||
|
@ -367,7 +493,7 @@ impl FromGlib<gst_gl_sys::GstGLStereoDownmix> for GLStereoDownmix {
|
|||
|
||||
impl StaticType for GLStereoDownmix {
|
||||
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(Clone, Copy)]
|
||||
pub enum GLUploadReturn {
|
||||
|
@ -436,6 +586,7 @@ pub enum GLUploadReturn {
|
|||
Error,
|
||||
Unsupported,
|
||||
Reconfigure,
|
||||
UnsharedGlContext,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -450,6 +601,7 @@ impl ToGlib for GLUploadReturn {
|
|||
GLUploadReturn::Error => gst_gl_sys::GST_GL_UPLOAD_ERROR,
|
||||
GLUploadReturn::Unsupported => gst_gl_sys::GST_GL_UPLOAD_UNSUPPORTED,
|
||||
GLUploadReturn::Reconfigure => gst_gl_sys::GST_GL_UPLOAD_RECONFIGURE,
|
||||
GLUploadReturn::UnsharedGlContext => gst_gl_sys::GST_GL_UPLOAD_UNSHARED_GL_CONTEXT,
|
||||
GLUploadReturn::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
|
@ -464,11 +616,36 @@ impl FromGlib<gst_gl_sys::GstGLUploadReturn> for GLUploadReturn {
|
|||
-1 => GLUploadReturn::Error,
|
||||
-2 => GLUploadReturn::Unsupported,
|
||||
-3 => GLUploadReturn::Reconfigure,
|
||||
-100 => GLUploadReturn::UnsharedGlContext,
|
||||
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(Clone, Copy)]
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,14 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
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;
|
||||
|
||||
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! {
|
||||
pub struct GLDisplayType: u32 {
|
||||
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! {
|
||||
pub struct GLPlatform: u32 {
|
||||
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! {
|
||||
pub struct GLSLProfile: u32 {
|
||||
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())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,12 +31,22 @@ unsafe impl Sync for GLBaseFilter {}
|
|||
pub const NONE_GL_BASE_FILTER: Option<&GLBaseFilter> = None;
|
||||
|
||||
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 connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
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> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GLContext as StaticType>::static_type());
|
||||
|
|
|
@ -97,6 +97,12 @@ pub trait GLContextExt: 'static {
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0);
|
||||
|
|
|
@ -3,10 +3,28 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
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;
|
||||
#[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::*;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
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! {
|
||||
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> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
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 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))
|
||||
}
|
||||
|
|
|
@ -4,8 +4,14 @@
|
|||
|
||||
use Error;
|
||||
use GLContext;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use GLSLProfile;
|
||||
use GLSLStage;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use GLSLVersion;
|
||||
use glib;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
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 {
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
|
|
|
@ -42,6 +42,9 @@ unsafe impl Sync for GLWindow {}
|
|||
pub const NONE_GL_WINDOW: Option<&GLWindow> = None;
|
||||
|
||||
pub trait GLWindowExt: 'static {
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn controls_viewport(&self) -> bool;
|
||||
|
||||
fn draw(&self);
|
||||
|
||||
fn get_context(&self) -> Option<GLContext>;
|
||||
|
@ -74,6 +77,13 @@ pub trait GLWindowExt: 'static {
|
|||
}
|
||||
|
||||
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) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_window_draw(self.as_ref().to_glib_none().0);
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
mod gl_base_filter;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
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;
|
||||
|
||||
mod gl_color_convert;
|
||||
|
@ -74,6 +77,7 @@ pub use self::flags::GLSLProfile;
|
|||
|
||||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
pub use super::GLBaseFilterExt;
|
||||
pub use super::GLContextExt;
|
||||
pub use super::GLDisplayExt;
|
||||
|
|
|
@ -30,6 +30,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-net-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -31,6 +31,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-pbutils-sys/dox"]
|
||||
|
|
|
@ -5,11 +5,17 @@
|
|||
use DiscovererInfo;
|
||||
use Error;
|
||||
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::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_pbutils_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 {
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
|
@ -92,6 +114,15 @@ impl Discoverer {
|
|||
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 {}
|
||||
|
@ -116,3 +147,9 @@ unsafe extern "C" fn starting_trampoline<F: Fn(&Discoverer) + Send + Sync + 'sta
|
|||
let f: &F = &*(f as *const F);
|
||||
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))
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ unsafe impl Sync for EncodingProfile {}
|
|||
pub const NONE_ENCODING_PROFILE: Option<&EncodingProfile> = None;
|
||||
|
||||
pub trait EncodingProfileExt: 'static {
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn copy(&self) -> EncodingProfile;
|
||||
|
||||
fn get_allow_dynamic_output(&self) -> bool;
|
||||
|
@ -69,6 +70,7 @@ pub trait EncodingProfileExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn copy(&self) -> EncodingProfile {
|
||||
unsafe {
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_copy(self.as_ref().to_glib_none().0))
|
||||
|
|
|
@ -30,6 +30,7 @@ optional = true
|
|||
[features]
|
||||
default = []
|
||||
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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-player-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -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> {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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))
|
||||
}
|
||||
|
||||
#[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) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
|
|
|
@ -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_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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-rtsp-server-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -16,6 +16,7 @@ use glib_sys;
|
|||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
|
@ -69,6 +70,9 @@ pub trait RTSPAuthExt: 'static {
|
|||
|
||||
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"))]
|
||||
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod;
|
||||
|
||||
|
@ -78,11 +82,17 @@ pub trait RTSPAuthExt: 'static {
|
|||
|
||||
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);
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
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"))]
|
||||
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"))]
|
||||
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod {
|
||||
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) {
|
||||
unsafe {
|
||||
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"))]
|
||||
fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) {
|
||||
unsafe {
|
||||
|
|
|
@ -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>);
|
||||
|
||||
//#[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_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() }
|
||||
//}
|
||||
|
||||
//#[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>) {
|
||||
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);
|
||||
|
|
|
@ -51,7 +51,8 @@ pub const NONE_RTSP_MEDIA: Option<&RTSPMedia> = None;
|
|||
pub trait RTSPMediaExt: 'static {
|
||||
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>;
|
||||
|
||||
|
@ -65,10 +66,16 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
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_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_permissions(&self) -> /*Ignored*/Option<RTSPPermissions>;
|
||||
|
@ -95,6 +102,9 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
//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_reusable(&self) -> bool;
|
||||
|
@ -111,20 +121,31 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
//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;
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff;
|
||||
|
||||
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_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_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_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>);
|
||||
|
@ -143,7 +164,7 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
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);
|
||||
|
||||
|
@ -163,8 +184,16 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
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_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_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_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_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_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_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() }
|
||||
//}
|
||||
|
||||
|
@ -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> {
|
||||
unsafe {
|
||||
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> {
|
||||
unsafe {
|
||||
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() }
|
||||
//}
|
||||
|
||||
#[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 {
|
||||
unsafe {
|
||||
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() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//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() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
|
||||
// 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) {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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>) {
|
||||
unsafe {
|
||||
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() }
|
||||
//}
|
||||
|
||||
|
@ -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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
|
@ -750,6 +872,12 @@ where P: IsA<RTSPMedia> {
|
|||
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)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
@ -774,6 +902,12 @@ where P: IsA<RTSPMedia> {
|
|||
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)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
|
|
@ -65,10 +65,16 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
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_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_multicast_iface(&self) -> Option<GString>;
|
||||
|
@ -87,6 +93,9 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
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_shared(&self) -> bool;
|
||||
|
@ -95,16 +104,25 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
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_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_latency(&self, latency: u32);
|
||||
|
||||
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_multicast_iface(&self, multicast_iface: Option<&str>);
|
||||
|
@ -127,8 +145,16 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
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_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_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_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_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_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_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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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) {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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))
|
||||
}
|
||||
|
||||
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)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
@ -548,6 +670,12 @@ where P: IsA<RTSPMediaFactory> {
|
|||
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)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
|
|
@ -47,7 +47,8 @@ pub trait RTSPSessionMediaExt: 'static {
|
|||
|
||||
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>;
|
||||
|
||||
|
@ -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() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -47,10 +47,14 @@ unsafe impl Sync for RTSPStream {}
|
|||
pub const NONE_RTSP_STREAM: Option<&RTSPStream> = None;
|
||||
|
||||
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 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 get_address_pool(&self) -> Option<RTSPAddressPool>;
|
||||
|
@ -69,10 +73,16 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
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_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_profiles(&self) -> gst_rtsp::RTSPProfile;
|
||||
|
@ -87,6 +97,7 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
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_socket(&self, family: gio::SocketFamily) -> Option<gio::Socket>;
|
||||
|
@ -109,16 +120,33 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
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;
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn is_bind_mcast_address(&self) -> bool;
|
||||
|
||||
fn is_blocking(&self) -> bool;
|
||||
|
||||
fn is_client_side(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn is_complete(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn is_receiver(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn is_sender(&self) -> 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>;
|
||||
|
||||
#[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>;
|
||||
|
||||
#[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>;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn seekable(&self) -> bool;
|
||||
|
||||
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_buffer_size(&self, size: u32);
|
||||
|
@ -147,6 +188,9 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
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_multicast_iface(&self, multicast_iface: Option<&str>);
|
||||
|
@ -165,16 +209,27 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
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 unblock_linked(&self) -> 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_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_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 {
|
||||
#[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> {
|
||||
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")
|
||||
|
@ -193,6 +255,7 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
// 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 {
|
||||
// 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 {
|
||||
unsafe {
|
||||
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> {
|
||||
unsafe {
|
||||
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> {
|
||||
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()))
|
||||
|
@ -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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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> {
|
||||
unsafe {
|
||||
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> {
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn seekable(&self) -> bool {
|
||||
unsafe {
|
||||
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> {
|
||||
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")
|
||||
|
@ -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) {
|
||||
unsafe {
|
||||
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> {
|
||||
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 {
|
||||
|
@ -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 {
|
||||
unsafe {
|
||||
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 {
|
||||
unsafe {
|
||||
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))
|
||||
}
|
||||
|
||||
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)
|
||||
where P: IsA<RTSPStream> {
|
||||
let f: &F = &*(f as *const F);
|
||||
|
|
|
@ -41,16 +41,30 @@ pub trait RTSPStreamTransportExt: 'static {
|
|||
|
||||
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>;
|
||||
|
||||
//#[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>;
|
||||
|
||||
//#[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_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);
|
||||
|
||||
//#[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_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> {
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
//#[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> {
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
//#[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> {
|
||||
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")
|
||||
|
@ -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) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_transport_set_timed_out(self.as_ref().to_glib_none().0, timedout.to_glib());
|
||||
|
|
|
@ -35,6 +35,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-rtsp-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -224,6 +224,8 @@ pub enum RTSPHeaderField {
|
|||
MediaProperties,
|
||||
SeekStyle,
|
||||
AcceptRanges,
|
||||
Frames,
|
||||
RateControl,
|
||||
Last,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
|
@ -322,6 +324,8 @@ impl ToGlib for RTSPHeaderField {
|
|||
RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES,
|
||||
RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE,
|
||||
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::__Unknown(value) => value
|
||||
}
|
||||
|
@ -420,7 +424,9 @@ impl FromGlib<gst_rtsp_sys::GstRTSPHeaderField> for RTSPHeaderField {
|
|||
84 => RTSPHeaderField::MediaProperties,
|
||||
85 => RTSPHeaderField::SeekStyle,
|
||||
86 => RTSPHeaderField::AcceptRanges,
|
||||
87 => RTSPHeaderField::Last,
|
||||
87 => RTSPHeaderField::Frames,
|
||||
88 => RTSPHeaderField::RateControl,
|
||||
89 => RTSPHeaderField::Last,
|
||||
value => RTSPHeaderField::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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_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_16 = ["gstreamer-sys/v1_16", "gstreamer-sdp-sys/v1_16", "v1_14"]
|
||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-sdp-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -33,6 +33,7 @@ default = []
|
|||
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_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"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-video-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
|
|
|
@ -97,6 +97,10 @@ pub enum VideoColorPrimaries {
|
|||
Film,
|
||||
Bt2020,
|
||||
Adobergb,
|
||||
Smptest428,
|
||||
Smpterp431,
|
||||
Smpteeg432,
|
||||
Ebu3213,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -116,6 +120,10 @@ impl ToGlib for VideoColorPrimaries {
|
|||
VideoColorPrimaries::Film => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_FILM,
|
||||
VideoColorPrimaries::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT2020,
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +143,10 @@ impl FromGlib<gst_video_sys::GstVideoColorPrimaries> for VideoColorPrimaries {
|
|||
6 => VideoColorPrimaries::Film,
|
||||
7 => VideoColorPrimaries::Bt2020,
|
||||
8 => VideoColorPrimaries::Adobergb,
|
||||
9 => VideoColorPrimaries::Smptest428,
|
||||
10 => VideoColorPrimaries::Smpterp431,
|
||||
11 => VideoColorPrimaries::Smpteeg432,
|
||||
12 => VideoColorPrimaries::Ebu3213,
|
||||
value => VideoColorPrimaries::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
@ -316,6 +328,11 @@ pub enum VideoFormat {
|
|||
Gray10Le32,
|
||||
Nv1210le32,
|
||||
Nv1610le32,
|
||||
Nv1210le40,
|
||||
Y210,
|
||||
Y410,
|
||||
Vuya,
|
||||
Bgr10a2Le,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -407,6 +424,11 @@ impl ToGlib for VideoFormat {
|
|||
VideoFormat::Gray10Le32 => gst_video_sys::GST_VIDEO_FORMAT_GRAY10_LE32,
|
||||
VideoFormat::Nv1210le32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_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
|
||||
}
|
||||
}
|
||||
|
@ -498,6 +520,11 @@ impl FromGlib<gst_video_sys::GstVideoFormat> for VideoFormat {
|
|||
78 => VideoFormat::Gray10Le32,
|
||||
79 => VideoFormat::Nv1210le32,
|
||||
80 => VideoFormat::Nv1610le32,
|
||||
81 => VideoFormat::Nv1210le40,
|
||||
82 => VideoFormat::Y210,
|
||||
83 => VideoFormat::Y410,
|
||||
84 => VideoFormat::Vuya,
|
||||
85 => VideoFormat::Bgr10a2Le,
|
||||
value => VideoFormat::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
@ -534,6 +561,7 @@ pub enum VideoInterlaceMode {
|
|||
Interleaved,
|
||||
Mixed,
|
||||
Fields,
|
||||
Alternate,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -548,6 +576,7 @@ impl ToGlib for VideoInterlaceMode {
|
|||
VideoInterlaceMode::Interleaved => gst_video_sys::GST_VIDEO_INTERLACE_MODE_INTERLEAVED,
|
||||
VideoInterlaceMode::Mixed => gst_video_sys::GST_VIDEO_INTERLACE_MODE_MIXED,
|
||||
VideoInterlaceMode::Fields => gst_video_sys::GST_VIDEO_INTERLACE_MODE_FIELDS,
|
||||
VideoInterlaceMode::Alternate => gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE,
|
||||
VideoInterlaceMode::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
|
@ -562,6 +591,7 @@ impl FromGlib<gst_video_sys::GstVideoInterlaceMode> for VideoInterlaceMode {
|
|||
1 => VideoInterlaceMode::Interleaved,
|
||||
2 => VideoInterlaceMode::Mixed,
|
||||
3 => VideoInterlaceMode::Fields,
|
||||
4 => VideoInterlaceMode::Alternate,
|
||||
value => VideoInterlaceMode::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,6 +180,8 @@ bitflags! {
|
|||
const ONEFIELD = 8;
|
||||
const MULTIPLE_VIEW = 16;
|
||||
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"))]
|
||||
bitflags! {
|
||||
pub struct VideoTimeCodeFlags: u32 {
|
||||
|
|
|
@ -16,10 +16,12 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl VideoOverlay {
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) {
|
||||
// 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 {
|
||||
// unsafe { TODO: call gst_video_sys:gst_video_overlay_set_property() }
|
||||
//}
|
||||
|
|
|
@ -31,3 +31,4 @@ default = []
|
|||
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-webrtc-sys/dox", "glib/dox", "gstreamer/dox"]
|
||||
v1_16 = ["gstreamer-sys/v1_16", "gstreamer-webrtc-sys/v1_16"]
|
||||
|
|
|
@ -42,6 +42,7 @@ default = []
|
|||
v1_10 = ["gstreamer-sys/v1_10"]
|
||||
v1_12 = ["gstreamer-sys/v1_12", "v1_10"]
|
||||
v1_14 = ["gstreamer-sys/v1_14", "v1_12"]
|
||||
v1_16 = ["gstreamer-sys/v1_16", "v1_14"]
|
||||
embed-lgpl-docs = ["rustdoc-stripper"]
|
||||
purge-lgpl-docs = ["rustdoc-stripper"]
|
||||
dox = ["gstreamer-sys/dox", "glib/dox", "futures", "ser_de"]
|
||||
|
|
|
@ -54,7 +54,7 @@ impl Bus {
|
|||
}
|
||||
|
||||
//#[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() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -32,6 +32,11 @@ impl Clock {
|
|||
// 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 {
|
||||
// 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() }
|
||||
//}
|
||||
|
||||
//#[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) {
|
||||
// unsafe { TODO: call gst_sys:gst_clock_id_wait() }
|
||||
//}
|
||||
|
|
|
@ -47,6 +47,9 @@ pub trait DeviceProviderExt: 'static {
|
|||
|
||||
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 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) {
|
||||
unsafe {
|
||||
gst_sys::gst_device_provider_device_remove(self.as_ref().to_glib_none().0, device.as_ref().to_glib_none().0);
|
||||
|
|
Loading…
Reference in a new issue