Regenerate

This commit is contained in:
Sebastian Dröge 2020-07-06 11:37:14 +03:00
parent 3bf5215872
commit 448c1e10a0
32 changed files with 440 additions and 86 deletions

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -83,6 +83,12 @@ pub trait AudioDecoderExt: 'static {
fn set_use_default_pad_acceptcaps(&self, use_: bool);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId;
fn connect_property_min_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
@ -324,6 +330,34 @@ impl<O: IsA<AudioDecoder>> AudioDecoderExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_max_errors_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_audio_sys::GstAudioDecoder,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<AudioDecoder>,
{
let f: &F = &*(f as *const F);
f(&AudioDecoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::max-errors\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_max_errors_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
fn connect_property_min_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -15,6 +15,8 @@ use gst;
use gst_base_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use AggregatorStartTimeSelection;
glib_wrapper! {
pub struct Aggregator(Object<gst_base_sys::GstAggregator, gst_base_sys::GstAggregatorClass, AggregatorClass>) @extends gst::Element, gst::Object;
@ -58,6 +60,12 @@ pub trait AggregatorExt: 'static {
fn set_property_start_time(&self, start_time: u64);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_property_start_time_selection(&self) -> AggregatorStartTimeSelection;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_property_start_time_selection(&self, start_time_selection: AggregatorStartTimeSelection);
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
@ -68,6 +76,12 @@ pub trait AggregatorExt: 'static {
&self,
f: F,
) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_start_time_selection_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId;
}
impl<O: IsA<Aggregator>> AggregatorExt for O {
@ -163,6 +177,37 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_property_start_time_selection(&self) -> AggregatorStartTimeSelection {
unsafe {
let mut value =
Value::from_type(<AggregatorStartTimeSelection as StaticType>::static_type());
gobject_sys::g_object_get_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
b"start-time-selection\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `start-time-selection` getter")
.unwrap()
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_property_start_time_selection(
&self,
start_time_selection: AggregatorStartTimeSelection,
) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
b"start-time-selection\0".as_ptr() as *const _,
Value::from(&start_time_selection).to_glib_none().0,
);
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn connect_property_latency_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
@ -217,4 +262,35 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
)
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_start_time_selection_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_start_time_selection_trampoline<
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_base_sys::GstAggregator,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<Aggregator>,
{
let f: &F = &*(f as *const F);
f(&Aggregator::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::start-time-selection\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_start_time_selection_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
}

View file

@ -2,6 +2,86 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use gst_base_sys;
use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_base_sys;
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum AggregatorStartTimeSelection {
Zero,
First,
Set,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for AggregatorStartTimeSelection {
type GlibType = gst_base_sys::GstAggregatorStartTimeSelection;
fn to_glib(&self) -> gst_base_sys::GstAggregatorStartTimeSelection {
match *self {
AggregatorStartTimeSelection::Zero => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_ZERO
}
AggregatorStartTimeSelection::First => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_FIRST
}
AggregatorStartTimeSelection::Set => {
gst_base_sys::GST_AGGREGATOR_START_TIME_SELECTION_SET
}
AggregatorStartTimeSelection::__Unknown(value) => value,
}
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_base_sys::GstAggregatorStartTimeSelection> for AggregatorStartTimeSelection {
fn from_glib(value: gst_base_sys::GstAggregatorStartTimeSelection) -> Self {
skip_assert_initialized!();
match value {
0 => AggregatorStartTimeSelection::Zero,
1 => AggregatorStartTimeSelection::First,
2 => AggregatorStartTimeSelection::Set,
value => AggregatorStartTimeSelection::__Unknown(value),
}
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl StaticType for AggregatorStartTimeSelection {
fn static_type() -> Type {
unsafe { from_glib(gst_base_sys::gst_aggregator_start_time_selection_get_type()) }
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValueOptional<'a> for AggregatorStartTimeSelection {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValue<'a> for AggregatorStartTimeSelection {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl SetValue for AggregatorStartTimeSelection {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}

View file

@ -38,6 +38,11 @@ pub use self::base_transform::{BaseTransform, BaseTransformClass, NONE_BASE_TRAN
mod push_src;
pub use self::push_src::{PushSrc, PushSrcClass, NONE_PUSH_SRC};
#[cfg(any(feature = "v1_18", feature = "dox"))]
mod enums;
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub use self::enums::AggregatorStartTimeSelection;
mod flags;
pub use self::flags::BaseParseFrameFlags;

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -9,10 +9,7 @@ use glib::object::IsA;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::StaticType;
use glib::Value;
use glib_sys;
use gobject_sys;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use gst;
use std::boxed::Box as Box_;
@ -135,8 +132,7 @@ pub trait ClipExt: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn split_full(&self, position: u64) -> Result<Option<Clip>, glib::Error>;
fn get_property_duration_limit(&self) -> u64;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_duration_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
@ -481,21 +477,7 @@ impl<O: IsA<Clip>> ClipExt for O {
}
}
fn get_property_duration_limit(&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,
b"duration-limit\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `duration-limit` getter")
.unwrap()
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_duration_limit_notify<F: Fn(&Self) + 'static>(
&self,
f: F,

View file

@ -100,6 +100,7 @@ pub trait LayerExt: 'static {
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P);
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_active_changed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId;
@ -301,6 +302,7 @@ impl<O: IsA<Layer>> LayerExt for O {
}
}
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_active_changed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Empty ctype tracks: *.PtrArray TypeId { ns_id: 1, id: 17 }
//}

View file

@ -154,8 +154,10 @@ pub trait TimelineElementExt: 'static {
fn set_property_serialize(&self, serialize: bool);
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
@ -594,10 +596,12 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
}
}
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored prop: GObject.ParamSpec
//}
//#[cfg(any(feature = "v1_18", feature = "dox"))]
//fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
// Ignored prop: GObject.ParamSpec
//}

View file

@ -92,16 +92,13 @@ pub trait TrackElementExt: 'static {
//fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_has_internal_source(&self, has_internal_source: bool);
fn set_has_internal_source(&self, has_internal_source: bool) -> bool;
fn set_track_type(&self, type_: TrackType);
fn get_property_active(&self) -> bool;
fn get_property_auto_clamp_control_sources(&self) -> bool;
fn set_property_auto_clamp_control_sources(&self, auto_clamp_control_sources: bool);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_property_has_internal_source(&self) -> bool;
//fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
@ -110,11 +107,13 @@ pub trait TrackElementExt: 'static {
fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
@ -298,12 +297,12 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
//}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_has_internal_source(&self, has_internal_source: bool) {
fn set_has_internal_source(&self, has_internal_source: bool) -> bool {
unsafe {
ges_sys::ges_track_element_set_has_internal_source(
from_glib(ges_sys::ges_track_element_set_has_internal_source(
self.as_ref().to_glib_none().0,
has_internal_source.to_glib(),
);
))
}
}
@ -331,31 +330,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
}
}
fn get_property_auto_clamp_control_sources(&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"auto-clamp-control-sources\0".as_ptr() as *const _,
value.to_glib_none_mut().0,
);
value
.get()
.expect("Return Value for property `auto-clamp-control-sources` getter")
.unwrap()
}
}
fn set_property_auto_clamp_control_sources(&self, auto_clamp_control_sources: bool) {
unsafe {
gobject_sys::g_object_set_property(
self.to_glib_none().0 as *mut gobject_sys::GObject,
b"auto-clamp-control-sources\0".as_ptr() as *const _,
Value::from(&auto_clamp_control_sources).to_glib_none().0,
);
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_property_has_internal_source(&self) -> bool {
unsafe {
let mut value = Value::from_type(<bool as StaticType>::static_type());
@ -403,6 +378,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
@ -430,6 +406,7 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F,

View file

@ -66,6 +66,7 @@ pub trait UriClipAssetExt: 'static {
fn get_stream_assets(&self) -> Vec<UriSourceAsset>;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn is_image(&self) -> bool;
fn set_property_duration(&self, duration: u64);
@ -116,6 +117,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn is_image(&self) -> bool {
unsafe {
from_glib(ges_sys::ges_uri_clip_asset_is_image(

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -60,6 +60,15 @@ impl EncodingTarget {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub fn get_path(&self) -> Option<GString> {
unsafe {
from_glib_none(gst_pbutils_sys::gst_encoding_target_get_path(
self.to_glib_none().0,
))
}
}
pub fn get_profile(&self, name: &str) -> Option<EncodingProfile> {
unsafe {
from_glib_full(gst_pbutils_sys::gst_encoding_target_get_profile(

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -81,6 +81,12 @@ pub trait VideoDecoderExt: 'static {
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_property_qos(&self, qos: bool);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
@ -248,6 +254,34 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_max_errors_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_max_errors_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
this: *mut gst_video_sys::GstVideoDecoder,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<VideoDecoder>,
{
let f: &F = &*(f as *const F);
f(&VideoDecoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::max-errors\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_max_errors_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,

View file

@ -38,6 +38,9 @@ pub trait VideoEncoderExt: 'static {
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn get_max_encode_time(&self, frame: &VideoCodecFrame) -> gst::ClockTimeDiff;
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_min_force_key_unit_interval(&self) -> gst::ClockTime;
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_qos_enabled(&self) -> bool;
@ -47,6 +50,9 @@ pub trait VideoEncoderExt: 'static {
fn set_headers(&self, headers: &[&gst::Buffer]);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime);
fn set_min_pts(&self, min_pts: gst::ClockTime);
#[cfg(any(feature = "v1_14", feature = "dox"))]
@ -56,6 +62,12 @@ pub trait VideoEncoderExt: 'static {
fn set_property_qos(&self, qos: bool);
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_min_force_key_unit_interval_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,
@ -83,6 +95,17 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn get_min_force_key_unit_interval(&self) -> gst::ClockTime {
unsafe {
from_glib(
gst_video_sys::gst_video_encoder_get_min_force_key_unit_interval(
self.as_ref().to_glib_none().0,
),
)
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
fn is_qos_enabled(&self) -> bool {
unsafe {
@ -121,6 +144,16 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn set_min_force_key_unit_interval(&self, interval: gst::ClockTime) {
unsafe {
gst_video_sys::gst_video_encoder_set_min_force_key_unit_interval(
self.as_ref().to_glib_none().0,
interval.to_glib(),
);
}
}
fn set_min_pts(&self, min_pts: gst::ClockTime) {
unsafe {
gst_video_sys::gst_video_encoder_set_min_pts(
@ -165,6 +198,37 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExt for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn connect_property_min_force_key_unit_interval_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_min_force_key_unit_interval_trampoline<
P,
F: Fn(&P) + Send + Sync + 'static,
>(
this: *mut gst_video_sys::GstVideoEncoder,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<VideoEncoder>,
{
let f: &F = &*(f as *const F);
f(&VideoEncoder::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::min-force-key-unit-interval\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_min_force_key_unit_interval_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)

View file

@ -819,6 +819,60 @@ impl SetValue for PipelineFlags {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
bitflags! {
pub struct PluginAPIFlags: u32 {
const MEMBERS = 1;
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for PluginAPIFlags {
type GlibType = gst_sys::GstPluginAPIFlags;
fn to_glib(&self) -> gst_sys::GstPluginAPIFlags {
self.bits()
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_sys::GstPluginAPIFlags> for PluginAPIFlags {
fn from_glib(value: gst_sys::GstPluginAPIFlags) -> PluginAPIFlags {
skip_assert_initialized!();
PluginAPIFlags::from_bits_truncate(value)
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl StaticType for PluginAPIFlags {
fn static_type() -> Type {
unsafe { from_glib(gst_sys::gst_plugin_api_flags_get_type()) }
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValueOptional<'a> for PluginAPIFlags {
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
Some(FromValue::from_value(value))
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValue<'a> for PluginAPIFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
impl SetValue for PluginAPIFlags {
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 PluginDependencyFlags: u32 {
const RECURSE = 1;

View file

@ -15,6 +15,8 @@ use ClockTime;
use DebugGraphDetails;
use DebugLevel;
use Element;
#[cfg(any(feature = "v1_18", feature = "dox"))]
use PluginAPIFlags;
#[cfg(any(feature = "v1_12", feature = "dox"))]
use StackTraceFlags;
@ -219,6 +221,14 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, glib::Error> {
// unsafe { TODO: call gst_sys:gst_tracing_register_hook() }
//}
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub fn type_mark_as_plugin_api(type_: glib::types::Type, flags: PluginAPIFlags) {
assert_initialized_main_thread!();
unsafe {
gst_sys::gst_type_mark_as_plugin_api(type_.to_glib(), flags.to_glib());
}
}
pub fn update_registry() -> Result<(), glib::error::BoolError> {
assert_initialized_main_thread!();
unsafe {

View file

@ -176,6 +176,8 @@ pub use self::flags::PadLinkCheck;
pub use self::flags::PadProbeType;
pub use self::flags::ParseFlags;
pub use self::flags::PipelineFlags;
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub use self::flags::PluginAPIFlags;
pub use self::flags::PluginDependencyFlags;
pub use self::flags::PluginFlags;
pub use self::flags::SchedulingFlags;

View file

@ -74,6 +74,15 @@ impl PadTemplate {
unsafe { from_glib_full(gst_sys::gst_pad_template_get_caps(self.to_glib_none().0)) }
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub fn get_documentation_caps(&self) -> Option<Caps> {
unsafe {
from_glib_full(gst_sys::gst_pad_template_get_documentation_caps(
self.to_glib_none().0,
))
}
}
pub fn pad_created<P: IsA<Pad>>(&self, pad: &P) {
unsafe {
gst_sys::gst_pad_template_pad_created(
@ -83,6 +92,16 @@ impl PadTemplate {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
pub fn set_documentation_caps(&self, caps: &Caps) {
unsafe {
gst_sys::gst_pad_template_set_documentation_caps(
self.to_glib_none().0,
caps.to_glib_none().0,
);
}
}
pub fn get_property_direction(&self) -> PadDirection {
unsafe {
let mut value = Value::from_type(<PadDirection as StaticType>::static_type());

View file

@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5)
from gir-files (https://github.com/gtk-rs/gir-files @ 4ac5b6f0)
Generated by gir (https://github.com/gtk-rs/gir @ 60cbef0)
from gir-files (https://github.com/gtk-rs/gir-files @ 2d4abeba)