Commit 88dcb82c authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Regenerate everything for 1.16.0

parent 5c32a0d1
......@@ -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