gstreamer-check: Regenerate

This commit is contained in:
Sebastian Dröge 2020-11-21 20:48:08 +02:00
parent 4a928136ed
commit 34074ff0af
9 changed files with 165 additions and 206 deletions

View file

@ -9,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct ARGBControlBinding(Object<gst_controller_sys::GstARGBControlBinding, gst_controller_sys::GstARGBControlBindingClass>) @extends gst::ControlBinding, gst::Object;
glib::glib_wrapper! {
pub struct ARGBControlBinding(Object<ffi::GstARGBControlBinding, ffi::GstARGBControlBindingClass>) @extends gst::ControlBinding, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_argb_control_binding_get_type(),
get_type => || ffi::gst_argb_control_binding_get_type(),
}
}
@ -41,7 +37,7 @@ impl ARGBControlBinding {
) -> ARGBControlBinding {
assert_initialized_main_thread!();
unsafe {
gst::ControlBinding::from_glib_none(gst_controller_sys::gst_argb_control_binding_new(
gst::ControlBinding::from_glib_none(ffi::gst_argb_control_binding_new(
object.as_ref().to_glib_none().0,
property_name.to_glib_none().0,
cs_a.as_ref().to_glib_none().0,
@ -113,8 +109,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
fn get_property_control_source_a(&self) -> Option<gst::ControlSource> {
unsafe {
let mut value = Value::from_type(<gst::ControlSource as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-a\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -129,8 +125,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
control_source_a: Option<&P>,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-a\0".as_ptr() as *const _,
Value::from(control_source_a).to_glib_none().0,
);
@ -140,8 +136,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
fn get_property_control_source_b(&self) -> Option<gst::ControlSource> {
unsafe {
let mut value = Value::from_type(<gst::ControlSource as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-b\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -156,8 +152,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
control_source_b: Option<&P>,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-b\0".as_ptr() as *const _,
Value::from(control_source_b).to_glib_none().0,
);
@ -167,8 +163,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
fn get_property_control_source_g(&self) -> Option<gst::ControlSource> {
unsafe {
let mut value = Value::from_type(<gst::ControlSource as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-g\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -183,8 +179,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
control_source_g: Option<&P>,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-g\0".as_ptr() as *const _,
Value::from(control_source_g).to_glib_none().0,
);
@ -194,8 +190,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
fn get_property_control_source_r(&self) -> Option<gst::ControlSource> {
unsafe {
let mut value = Value::from_type(<gst::ControlSource as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-r\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -210,8 +206,8 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
control_source_r: Option<&P>,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source-r\0".as_ptr() as *const _,
Value::from(control_source_r).to_glib_none().0,
);
@ -226,9 +222,9 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstARGBControlBinding,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstARGBControlBinding,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<ARGBControlBinding>,
{
@ -256,9 +252,9 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstARGBControlBinding,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstARGBControlBinding,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<ARGBControlBinding>,
{
@ -286,9 +282,9 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstARGBControlBinding,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstARGBControlBinding,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<ARGBControlBinding>,
{
@ -316,9 +312,9 @@ impl<O: IsA<ARGBControlBinding>> ARGBControlBindingExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstARGBControlBinding,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstARGBControlBinding,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<ARGBControlBinding>,
{

View file

@ -9,18 +9,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct DirectControlBinding(Object<gst_controller_sys::GstDirectControlBinding, gst_controller_sys::GstDirectControlBindingClass>) @extends gst::ControlBinding, gst::Object;
glib::glib_wrapper! {
pub struct DirectControlBinding(Object<ffi::GstDirectControlBinding, ffi::GstDirectControlBindingClass>) @extends gst::ControlBinding, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_direct_control_binding_get_type(),
get_type => || ffi::gst_direct_control_binding_get_type(),
}
}
@ -32,7 +28,7 @@ impl DirectControlBinding {
) -> DirectControlBinding {
assert_initialized_main_thread!();
unsafe {
gst::ControlBinding::from_glib_none(gst_controller_sys::gst_direct_control_binding_new(
gst::ControlBinding::from_glib_none(ffi::gst_direct_control_binding_new(
object.as_ref().to_glib_none().0,
property_name.to_glib_none().0,
cs.as_ref().to_glib_none().0,
@ -48,13 +44,11 @@ impl DirectControlBinding {
) -> DirectControlBinding {
assert_initialized_main_thread!();
unsafe {
gst::ControlBinding::from_glib_none(
gst_controller_sys::gst_direct_control_binding_new_absolute(
object.as_ref().to_glib_none().0,
property_name.to_glib_none().0,
cs.as_ref().to_glib_none().0,
),
)
gst::ControlBinding::from_glib_none(ffi::gst_direct_control_binding_new_absolute(
object.as_ref().to_glib_none().0,
property_name.to_glib_none().0,
cs.as_ref().to_glib_none().0,
))
.unsafe_cast()
}
}
@ -82,8 +76,8 @@ impl<O: IsA<DirectControlBinding>> DirectControlBindingExt for O {
fn get_property_absolute(&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,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"absolute\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -97,8 +91,8 @@ impl<O: IsA<DirectControlBinding>> DirectControlBindingExt for O {
fn get_property_control_source(&self) -> Option<gst::ControlSource> {
unsafe {
let mut value = Value::from_type(<gst::ControlSource as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -110,8 +104,8 @@ impl<O: IsA<DirectControlBinding>> DirectControlBindingExt for O {
fn set_property_control_source<P: IsA<gst::ControlSource>>(&self, control_source: Option<&P>) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"control-source\0".as_ptr() as *const _,
Value::from(control_source).to_glib_none().0,
);
@ -126,9 +120,9 @@ impl<O: IsA<DirectControlBinding>> DirectControlBindingExt for O {
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstDirectControlBinding,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstDirectControlBinding,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<DirectControlBinding>,
{

View file

@ -9,8 +9,6 @@ use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_controller_sys;
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
@ -25,24 +23,22 @@ pub enum InterpolationMode {
#[doc(hidden)]
impl ToGlib for InterpolationMode {
type GlibType = gst_controller_sys::GstInterpolationMode;
type GlibType = ffi::GstInterpolationMode;
fn to_glib(&self) -> gst_controller_sys::GstInterpolationMode {
fn to_glib(&self) -> ffi::GstInterpolationMode {
match *self {
InterpolationMode::None => gst_controller_sys::GST_INTERPOLATION_MODE_NONE,
InterpolationMode::Linear => gst_controller_sys::GST_INTERPOLATION_MODE_LINEAR,
InterpolationMode::Cubic => gst_controller_sys::GST_INTERPOLATION_MODE_CUBIC,
InterpolationMode::CubicMonotonic => {
gst_controller_sys::GST_INTERPOLATION_MODE_CUBIC_MONOTONIC
}
InterpolationMode::None => ffi::GST_INTERPOLATION_MODE_NONE,
InterpolationMode::Linear => ffi::GST_INTERPOLATION_MODE_LINEAR,
InterpolationMode::Cubic => ffi::GST_INTERPOLATION_MODE_CUBIC,
InterpolationMode::CubicMonotonic => ffi::GST_INTERPOLATION_MODE_CUBIC_MONOTONIC,
InterpolationMode::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_controller_sys::GstInterpolationMode> for InterpolationMode {
fn from_glib(value: gst_controller_sys::GstInterpolationMode) -> Self {
impl FromGlib<ffi::GstInterpolationMode> for InterpolationMode {
fn from_glib(value: ffi::GstInterpolationMode) -> Self {
skip_assert_initialized!();
match value {
0 => InterpolationMode::None,
@ -56,7 +52,7 @@ impl FromGlib<gst_controller_sys::GstInterpolationMode> for InterpolationMode {
impl StaticType for InterpolationMode {
fn static_type() -> Type {
unsafe { from_glib(gst_controller_sys::gst_interpolation_mode_get_type()) }
unsafe { from_glib(ffi::gst_interpolation_mode_get_type()) }
}
}
@ -68,13 +64,13 @@ impl<'a> FromValueOptional<'a> for InterpolationMode {
impl<'a> FromValue<'a> for InterpolationMode {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for InterpolationMode {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
@ -92,23 +88,23 @@ pub enum LFOWaveform {
#[doc(hidden)]
impl ToGlib for LFOWaveform {
type GlibType = gst_controller_sys::GstLFOWaveform;
type GlibType = ffi::GstLFOWaveform;
fn to_glib(&self) -> gst_controller_sys::GstLFOWaveform {
fn to_glib(&self) -> ffi::GstLFOWaveform {
match *self {
LFOWaveform::Sine => gst_controller_sys::GST_LFO_WAVEFORM_SINE,
LFOWaveform::Square => gst_controller_sys::GST_LFO_WAVEFORM_SQUARE,
LFOWaveform::Saw => gst_controller_sys::GST_LFO_WAVEFORM_SAW,
LFOWaveform::ReverseSaw => gst_controller_sys::GST_LFO_WAVEFORM_REVERSE_SAW,
LFOWaveform::Triangle => gst_controller_sys::GST_LFO_WAVEFORM_TRIANGLE,
LFOWaveform::Sine => ffi::GST_LFO_WAVEFORM_SINE,
LFOWaveform::Square => ffi::GST_LFO_WAVEFORM_SQUARE,
LFOWaveform::Saw => ffi::GST_LFO_WAVEFORM_SAW,
LFOWaveform::ReverseSaw => ffi::GST_LFO_WAVEFORM_REVERSE_SAW,
LFOWaveform::Triangle => ffi::GST_LFO_WAVEFORM_TRIANGLE,
LFOWaveform::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<gst_controller_sys::GstLFOWaveform> for LFOWaveform {
fn from_glib(value: gst_controller_sys::GstLFOWaveform) -> Self {
impl FromGlib<ffi::GstLFOWaveform> for LFOWaveform {
fn from_glib(value: ffi::GstLFOWaveform) -> Self {
skip_assert_initialized!();
match value {
0 => LFOWaveform::Sine,
@ -123,7 +119,7 @@ impl FromGlib<gst_controller_sys::GstLFOWaveform> for LFOWaveform {
impl StaticType for LFOWaveform {
fn static_type() -> Type {
unsafe { from_glib(gst_controller_sys::gst_lfo_waveform_get_type()) }
unsafe { from_glib(ffi::gst_lfo_waveform_get_type()) }
}
}
@ -135,12 +131,12 @@ impl<'a> FromValueOptional<'a> for LFOWaveform {
impl<'a> FromValue<'a> for LFOWaveform {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for LFOWaveform {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}

View file

@ -2,6 +2,8 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::InterpolationMode;
use crate::TimedValueControlSource;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -9,20 +11,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
use InterpolationMode;
use TimedValueControlSource;
glib_wrapper! {
pub struct InterpolationControlSource(Object<gst_controller_sys::GstInterpolationControlSource, gst_controller_sys::GstInterpolationControlSourceClass>) @extends TimedValueControlSource, gst::ControlSource, gst::Object;
glib::glib_wrapper! {
pub struct InterpolationControlSource(Object<ffi::GstInterpolationControlSource, ffi::GstInterpolationControlSourceClass>) @extends TimedValueControlSource, gst::ControlSource, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_interpolation_control_source_get_type(),
get_type => || ffi::gst_interpolation_control_source_get_type(),
}
}
@ -30,10 +26,8 @@ impl InterpolationControlSource {
pub fn new() -> InterpolationControlSource {
assert_initialized_main_thread!();
unsafe {
gst::ControlSource::from_glib_full(
gst_controller_sys::gst_interpolation_control_source_new(),
)
.unsafe_cast()
gst::ControlSource::from_glib_full(ffi::gst_interpolation_control_source_new())
.unsafe_cast()
}
}
}
@ -64,8 +58,8 @@ impl<O: IsA<InterpolationControlSource>> InterpolationControlSourceExt for O {
fn get_property_mode(&self) -> InterpolationMode {
unsafe {
let mut value = Value::from_type(<InterpolationMode as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"mode\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -78,8 +72,8 @@ impl<O: IsA<InterpolationControlSource>> InterpolationControlSourceExt for O {
fn set_property_mode(&self, mode: InterpolationMode) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"mode\0".as_ptr() as *const _,
Value::from(&mode).to_glib_none().0,
);
@ -91,9 +85,9 @@ impl<O: IsA<InterpolationControlSource>> InterpolationControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstInterpolationControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstInterpolationControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<InterpolationControlSource>,
{

View file

@ -2,6 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::LFOWaveform;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -9,19 +10,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
use LFOWaveform;
glib_wrapper! {
pub struct LFOControlSource(Object<gst_controller_sys::GstLFOControlSource, gst_controller_sys::GstLFOControlSourceClass>) @extends gst::ControlSource, gst::Object;
glib::glib_wrapper! {
pub struct LFOControlSource(Object<ffi::GstLFOControlSource, ffi::GstLFOControlSourceClass>) @extends gst::ControlSource, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_lfo_control_source_get_type(),
get_type => || ffi::gst_lfo_control_source_get_type(),
}
}
@ -29,8 +25,7 @@ impl LFOControlSource {
pub fn new() -> LFOControlSource {
assert_initialized_main_thread!();
unsafe {
gst::ControlSource::from_glib_full(gst_controller_sys::gst_lfo_control_source_new())
.unsafe_cast()
gst::ControlSource::from_glib_full(ffi::gst_lfo_control_source_new()).unsafe_cast()
}
}
}
@ -97,8 +92,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn get_property_amplitude(&self) -> f64 {
unsafe {
let mut value = Value::from_type(<f64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"amplitude\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -111,8 +106,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn set_property_amplitude(&self, amplitude: f64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"amplitude\0".as_ptr() as *const _,
Value::from(&amplitude).to_glib_none().0,
);
@ -122,8 +117,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn get_property_frequency(&self) -> f64 {
unsafe {
let mut value = Value::from_type(<f64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"frequency\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -136,8 +131,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn set_property_frequency(&self, frequency: f64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"frequency\0".as_ptr() as *const _,
Value::from(&frequency).to_glib_none().0,
);
@ -147,8 +142,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn get_property_offset(&self) -> f64 {
unsafe {
let mut value = Value::from_type(<f64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"offset\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -161,8 +156,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn set_property_offset(&self, offset: f64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"offset\0".as_ptr() as *const _,
Value::from(&offset).to_glib_none().0,
);
@ -172,8 +167,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn get_property_timeshift(&self) -> u64 {
unsafe {
let mut value = Value::from_type(<u64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"timeshift\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -186,8 +181,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn set_property_timeshift(&self, timeshift: u64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"timeshift\0".as_ptr() as *const _,
Value::from(&timeshift).to_glib_none().0,
);
@ -197,8 +192,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn get_property_waveform(&self) -> LFOWaveform {
unsafe {
let mut value = Value::from_type(<LFOWaveform as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"waveform\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -211,8 +206,8 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
fn set_property_waveform(&self, waveform: LFOWaveform) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"waveform\0".as_ptr() as *const _,
Value::from(&waveform).to_glib_none().0,
);
@ -224,9 +219,9 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_amplitude_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstLFOControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstLFOControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<LFOControlSource>,
{
@ -251,9 +246,9 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_frequency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstLFOControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstLFOControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<LFOControlSource>,
{
@ -278,9 +273,9 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_offset_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstLFOControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstLFOControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<LFOControlSource>,
{
@ -305,9 +300,9 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_timeshift_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstLFOControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstLFOControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<LFOControlSource>,
{
@ -332,9 +327,9 @@ impl<O: IsA<LFOControlSource>> LFOControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_waveform_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstLFOControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstLFOControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<LFOControlSource>,
{

View file

@ -9,14 +9,12 @@ use glib::object::Cast;
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
use glib::object::IsA;
use glib::translate::*;
use gst;
use gst_controller_sys;
glib_wrapper! {
pub struct ProxyControlBinding(Object<gst_controller_sys::GstProxyControlBinding, gst_controller_sys::GstProxyControlBindingClass>) @extends gst::ControlBinding, gst::Object;
glib::glib_wrapper! {
pub struct ProxyControlBinding(Object<ffi::GstProxyControlBinding, ffi::GstProxyControlBindingClass>) @extends gst::ControlBinding, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_proxy_control_binding_get_type(),
get_type => || ffi::gst_proxy_control_binding_get_type(),
}
}
@ -31,7 +29,7 @@ impl ProxyControlBinding {
) -> ProxyControlBinding {
assert_initialized_main_thread!();
unsafe {
gst::ControlBinding::from_glib_none(gst_controller_sys::gst_proxy_control_binding_new(
gst::ControlBinding::from_glib_none(ffi::gst_proxy_control_binding_new(
object.as_ref().to_glib_none().0,
property_name.to_glib_none().0,
ref_object.as_ref().to_glib_none().0,

View file

@ -2,23 +2,20 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::ControlPoint;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
use ControlPoint;
glib_wrapper! {
pub struct TimedValueControlSource(Object<gst_controller_sys::GstTimedValueControlSource, gst_controller_sys::GstTimedValueControlSourceClass>) @extends gst::ControlSource, gst::Object;
glib::glib_wrapper! {
pub struct TimedValueControlSource(Object<ffi::GstTimedValueControlSource, ffi::GstTimedValueControlSourceClass>) @extends gst::ControlSource, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_timed_value_control_source_get_type(),
get_type => || ffi::gst_timed_value_control_source_get_type(),
}
}
@ -60,24 +57,20 @@ pub trait TimedValueControlSourceExt: 'static {
impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
//fn find_control_point_iter(&self, timestamp: gst::ClockTime) -> /*Ignored*/Option<glib::SequenceIter> {
// unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_find_control_point_iter() }
// unsafe { TODO: call ffi:gst_timed_value_control_source_find_control_point_iter() }
//}
//fn get_all(&self) -> /*Ignored*/Vec<gst::TimedValue> {
// unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_get_all() }
// unsafe { TODO: call ffi:gst_timed_value_control_source_get_all() }
//}
fn get_count(&self) -> i32 {
unsafe {
gst_controller_sys::gst_timed_value_control_source_get_count(
self.as_ref().to_glib_none().0,
)
}
unsafe { ffi::gst_timed_value_control_source_get_count(self.as_ref().to_glib_none().0) }
}
fn set(&self, timestamp: gst::ClockTime, value: f64) -> bool {
unsafe {
from_glib(gst_controller_sys::gst_timed_value_control_source_set(
from_glib(ffi::gst_timed_value_control_source_set(
self.as_ref().to_glib_none().0,
timestamp.to_glib(),
value,
@ -86,12 +79,12 @@ impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
}
//fn set_from_list(&self, timedvalues: /*Ignored*/&[&gst::TimedValue]) -> bool {
// unsafe { TODO: call gst_controller_sys:gst_timed_value_control_source_set_from_list() }
// unsafe { TODO: call ffi:gst_timed_value_control_source_set_from_list() }
//}
fn unset(&self, timestamp: gst::ClockTime) -> bool {
unsafe {
from_glib(gst_controller_sys::gst_timed_value_control_source_unset(
from_glib(ffi::gst_timed_value_control_source_unset(
self.as_ref().to_glib_none().0,
timestamp.to_glib(),
))
@ -100,9 +93,7 @@ impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
fn unset_all(&self) {
unsafe {
gst_controller_sys::gst_timed_value_control_source_unset_all(
self.as_ref().to_glib_none().0,
);
ffi::gst_timed_value_control_source_unset_all(self.as_ref().to_glib_none().0);
}
}
@ -114,9 +105,9 @@ impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
P,
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstTimedValueControlSource,
timed_value: *mut gst_controller_sys::GstControlPoint,
f: glib_sys::gpointer,
this: *mut ffi::GstTimedValueControlSource,
timed_value: *mut ffi::GstControlPoint,
f: glib::ffi::gpointer,
) where
P: IsA<TimedValueControlSource>,
{
@ -147,9 +138,9 @@ impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
P,
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstTimedValueControlSource,
timed_value: *mut gst_controller_sys::GstControlPoint,
f: glib_sys::gpointer,
this: *mut ffi::GstTimedValueControlSource,
timed_value: *mut ffi::GstControlPoint,
f: glib::ffi::gpointer,
) where
P: IsA<TimedValueControlSource>,
{
@ -180,9 +171,9 @@ impl<O: IsA<TimedValueControlSource>> TimedValueControlSourceExt for O {
P,
F: Fn(&P, &ControlPoint) + Send + Sync + 'static,
>(
this: *mut gst_controller_sys::GstTimedValueControlSource,
timed_value: *mut gst_controller_sys::GstControlPoint,
f: glib_sys::gpointer,
this: *mut ffi::GstTimedValueControlSource,
timed_value: *mut ffi::GstControlPoint,
f: glib::ffi::gpointer,
) where
P: IsA<TimedValueControlSource>,
{

View file

@ -2,6 +2,7 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::TimedValueControlSource;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::connect_raw;
@ -9,19 +10,14 @@ use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
use gst;
use gst_controller_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
use TimedValueControlSource;
glib_wrapper! {
pub struct TriggerControlSource(Object<gst_controller_sys::GstTriggerControlSource, gst_controller_sys::GstTriggerControlSourceClass>) @extends TimedValueControlSource, gst::ControlSource, gst::Object;
glib::glib_wrapper! {
pub struct TriggerControlSource(Object<ffi::GstTriggerControlSource, ffi::GstTriggerControlSourceClass>) @extends TimedValueControlSource, gst::ControlSource, gst::Object;
match fn {
get_type => || gst_controller_sys::gst_trigger_control_source_get_type(),
get_type => || ffi::gst_trigger_control_source_get_type(),
}
}
@ -29,8 +25,7 @@ impl TriggerControlSource {
pub fn new() -> TriggerControlSource {
assert_initialized_main_thread!();
unsafe {
gst::ControlSource::from_glib_full(gst_controller_sys::gst_trigger_control_source_new())
.unsafe_cast()
gst::ControlSource::from_glib_full(ffi::gst_trigger_control_source_new()).unsafe_cast()
}
}
}
@ -61,8 +56,8 @@ impl<O: IsA<TriggerControlSource>> TriggerControlSourceExt for O {
fn get_property_tolerance(&self) -> i64 {
unsafe {
let mut value = Value::from_type(<i64 as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_get_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"tolerance\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
@ -75,8 +70,8 @@ impl<O: IsA<TriggerControlSource>> TriggerControlSourceExt for O {
fn set_property_tolerance(&self, tolerance: i64) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
glib::gobject_ffi::g_object_set_property(
self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
b"tolerance\0".as_ptr() as *const _,
Value::from(&tolerance).to_glib_none().0,
);
@ -88,9 +83,9 @@ impl<O: IsA<TriggerControlSource>> TriggerControlSourceExt for O {
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_tolerance_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_controller_sys::GstTriggerControlSource,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
this: *mut ffi::GstTriggerControlSource,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) where
P: IsA<TriggerControlSource>,
{

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
from gir-files (https://github.com/gtk-rs/gir-files @ eb37d44c)