mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
Regenerate
This commit is contained in:
parent
2c254c633b
commit
ec4a43be89
66 changed files with 1570 additions and 166 deletions
2
gir
2
gir
|
@ -1 +1 @@
|
|||
Subproject commit 2abca1147143e5f5986f14bf6bc794e438bef193
|
||||
Subproject commit 4c1faa04ddb97fdd11a090509a85632b03ebdaf6
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -39,6 +39,9 @@ pub trait AggregatorExt: 'static {
|
|||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn get_latency(&self) -> gst::ClockTime;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn negotiate(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime);
|
||||
|
||||
|
@ -48,6 +51,9 @@ pub trait AggregatorExt: 'static {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn simple_get_next_time(&self) -> gst::ClockTime;
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn update_segment(&self, segment: /*Ignored*/&mut gst::Segment);
|
||||
|
||||
fn get_property_start_time(&self) -> u64;
|
||||
|
||||
fn set_property_start_time(&self, start_time: u64);
|
||||
|
@ -88,6 +94,15 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn negotiate(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_base_sys::gst_aggregator_negotiate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn set_latency(&self, min_latency: gst::ClockTime, max_latency: gst::ClockTime) {
|
||||
unsafe {
|
||||
|
@ -118,6 +133,11 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn update_segment(&self, segment: /*Ignored*/&mut gst::Segment) {
|
||||
// unsafe { TODO: call gst_base_sys:gst_aggregator_update_segment() }
|
||||
//}
|
||||
|
||||
fn get_property_start_time(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
|
|
|
@ -50,6 +50,9 @@ pub trait BaseSinkExt: 'static {
|
|||
|
||||
fn get_render_delay(&self) -> gst::ClockTime;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_stats(&self) -> Option<gst::Structure>;
|
||||
|
||||
fn get_sync(&self) -> bool;
|
||||
|
||||
fn get_throttle_time(&self) -> u64;
|
||||
|
@ -146,6 +149,12 @@ pub trait BaseSinkExt: 'static {
|
|||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_stats_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_sync_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -221,6 +230,15 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_stats(&self) -> Option<gst::Structure> {
|
||||
unsafe {
|
||||
from_glib_full(gst_base_sys::gst_base_sink_get_stats(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_sync(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_base_sys::gst_base_sink_get_sync(
|
||||
|
@ -684,6 +702,34 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_stats_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_stats_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_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::stats\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_stats_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_sync_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -43,6 +43,9 @@ pub trait BaseSrcExt: 'static {
|
|||
|
||||
fn is_live(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn negotiate(&self) -> bool;
|
||||
|
||||
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool;
|
||||
|
||||
fn set_async(&self, async: bool);
|
||||
|
@ -131,6 +134,15 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn negotiate(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_base_sys::gst_base_src_negotiate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_base_sys::gst_base_src_new_seamless_segment(
|
||||
|
|
|
@ -41,6 +41,9 @@ pub trait BaseTransformExt: 'static {
|
|||
|
||||
fn is_qos_enabled(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn reconfigure(&self) -> bool;
|
||||
|
||||
fn reconfigure_sink(&self);
|
||||
|
||||
fn reconfigure_src(&self);
|
||||
|
@ -106,6 +109,15 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn reconfigure(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_base_sys::gst_base_transform_reconfigure(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn reconfigure_sink(&self) {
|
||||
unsafe {
|
||||
gst_base_sys::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0);
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -70,6 +70,11 @@ impl TestClock {
|
|||
// unsafe { TODO: call gst_check_sys:gst_test_clock_peek_next_pending_id() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//pub fn process_id(&self, pending_id: /*Ignored*/gst::ClockID) -> bool {
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_process_id() }
|
||||
//}
|
||||
|
||||
//pub fn process_id_list(&self, pending_list: /*Ignored*/&[&gst::ClockID]) -> u32 {
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_process_id_list() }
|
||||
//}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
8
gstreamer-editing-services/src/auto/alias.rs
Normal file
8
gstreamer-editing-services/src/auto/alias.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use auto::*;
|
||||
|
||||
pub type FrameNumber = i64;
|
|
@ -11,9 +11,7 @@ use glib::object::IsA;
|
|||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::value::SetValueOptional;
|
||||
use glib::GString;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
|
@ -31,7 +29,7 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl Asset {
|
||||
pub fn needs_reload(extractable_type: glib::types::Type, id: &str) -> bool {
|
||||
pub fn needs_reload(extractable_type: glib::types::Type, id: Option<&str>) -> bool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_asset_needs_reload(
|
||||
|
@ -66,7 +64,7 @@ impl Asset {
|
|||
Q: FnOnce(Result<Asset, glib::Error>) + Send + 'static,
|
||||
>(
|
||||
extractable_type: glib::types::Type,
|
||||
id: &str,
|
||||
id: Option<&str>,
|
||||
cancellable: Option<&P>,
|
||||
callback: Q,
|
||||
) {
|
||||
|
@ -103,15 +101,20 @@ impl Asset {
|
|||
|
||||
pub fn request_async_future(
|
||||
extractable_type: glib::types::Type,
|
||||
id: &str,
|
||||
id: Option<&str>,
|
||||
) -> Pin<Box_<dyn std::future::Future<Output = Result<Asset, glib::Error>> + 'static>> {
|
||||
skip_assert_initialized!();
|
||||
let id = String::from(id);
|
||||
let id = id.map(ToOwned::to_owned);
|
||||
Box_::pin(gio::GioFuture::new(&(), move |_obj, send| {
|
||||
let cancellable = gio::Cancellable::new();
|
||||
Self::request_async(extractable_type, &id, Some(&cancellable), move |res| {
|
||||
send.resolve(res);
|
||||
});
|
||||
Self::request_async(
|
||||
extractable_type,
|
||||
id.as_ref().map(::std::borrow::Borrow::borrow),
|
||||
Some(&cancellable),
|
||||
move |res| {
|
||||
send.resolve(res);
|
||||
},
|
||||
);
|
||||
|
||||
cancellable
|
||||
}))
|
||||
|
@ -121,7 +124,7 @@ impl Asset {
|
|||
pub const NONE_ASSET: Option<&Asset> = None;
|
||||
|
||||
pub trait AssetExt: 'static {
|
||||
fn extract(&self) -> Result<Option<Extractable>, glib::Error>;
|
||||
fn extract(&self) -> Result<Extractable, glib::Error>;
|
||||
|
||||
fn get_error(&self) -> Option<glib::Error>;
|
||||
|
||||
|
@ -139,8 +142,6 @@ pub trait AssetExt: 'static {
|
|||
|
||||
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_property_proxy_target<P: IsA<Asset> + SetValueOptional>(&self, proxy_target: Option<&P>);
|
||||
|
||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_proxy_target_notify<F: Fn(&Self) + 'static>(&self, f: F)
|
||||
|
@ -148,7 +149,7 @@ pub trait AssetExt: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<Asset>> AssetExt for O {
|
||||
fn extract(&self) -> Result<Option<Extractable>, glib::Error> {
|
||||
fn extract(&self) -> Result<Extractable, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||
|
@ -220,19 +221,6 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_property_proxy_target<P: IsA<Asset> + SetValueOptional>(
|
||||
&self,
|
||||
proxy_target: Option<&P>,
|
||||
) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"proxy-target\0".as_ptr() as *const _,
|
||||
Value::from(proxy_target).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_proxy_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESAsset,
|
||||
|
|
|
@ -10,12 +10,15 @@ use glib::signal::connect_raw;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
use Asset;
|
||||
use BaseEffect;
|
||||
use Container;
|
||||
use Extractable;
|
||||
use FrameNumber;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
use Track;
|
||||
|
@ -35,6 +38,12 @@ pub const NONE_CLIP: Option<&Clip> = None;
|
|||
pub trait ClipExt: 'static {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<TrackElement, glib::BoolError>;
|
||||
|
||||
fn add_child_to_track<P: IsA<TrackElement>, Q: IsA<Track>>(
|
||||
&self,
|
||||
child: &P,
|
||||
track: &Q,
|
||||
) -> Result<TrackElement, glib::Error>;
|
||||
|
||||
fn find_track_element<P: IsA<Track>>(
|
||||
&self,
|
||||
track: Option<&P>,
|
||||
|
@ -52,6 +61,11 @@ pub trait ClipExt: 'static {
|
|||
|
||||
fn get_supported_formats(&self) -> TrackType;
|
||||
|
||||
fn get_timeline_time_from_source_frame(
|
||||
&self,
|
||||
frame_number: FrameNumber,
|
||||
) -> Result<gst::ClockTime, glib::Error>;
|
||||
|
||||
fn get_top_effect_index<P: IsA<BaseEffect>>(&self, effect: &P) -> i32;
|
||||
|
||||
fn get_top_effect_position<P: IsA<BaseEffect>>(&self, effect: &P) -> i32;
|
||||
|
@ -95,6 +109,27 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn add_child_to_track<P: IsA<TrackElement>, Q: IsA<Track>>(
|
||||
&self,
|
||||
child: &P,
|
||||
track: &Q,
|
||||
) -> Result<TrackElement, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_add_child_to_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
child.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0,
|
||||
&mut error,
|
||||
);
|
||||
if error.is_null() {
|
||||
Ok(from_glib_none(ret))
|
||||
} else {
|
||||
Err(from_glib_full(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn find_track_element<P: IsA<Track>>(
|
||||
&self,
|
||||
track: Option<&P>,
|
||||
|
@ -137,6 +172,25 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_timeline_time_from_source_frame(
|
||||
&self,
|
||||
frame_number: FrameNumber,
|
||||
) -> Result<gst::ClockTime, glib::Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ges_sys::ges_clip_get_timeline_time_from_source_frame(
|
||||
self.as_ref().to_glib_none().0,
|
||||
frame_number,
|
||||
&mut error,
|
||||
);
|
||||
if error.is_null() {
|
||||
Ok(from_glib(ret))
|
||||
} else {
|
||||
Err(from_glib_full(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn get_top_effect_index<P: IsA<BaseEffect>>(&self, effect: &P) -> i32 {
|
||||
unsafe {
|
||||
ges_sys::ges_clip_get_top_effect_index(
|
||||
|
|
|
@ -41,6 +41,7 @@ pub const NONE_CONTAINER: Option<&Container> = None;
|
|||
pub trait GESContainerExt: 'static {
|
||||
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
#[cfg_attr(feature = "v1_18", deprecated)]
|
||||
fn edit(
|
||||
&self,
|
||||
layers: &[Layer],
|
||||
|
|
|
@ -17,6 +17,7 @@ use Asset;
|
|||
use Clip;
|
||||
use Extractable;
|
||||
use Timeline;
|
||||
use Track;
|
||||
use TrackType;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -54,6 +55,8 @@ pub trait LayerExt: 'static {
|
|||
|
||||
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn get_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool;
|
||||
|
||||
fn get_auto_transition(&self) -> bool;
|
||||
|
||||
fn get_clips(&self) -> Vec<Clip>;
|
||||
|
@ -70,6 +73,8 @@ pub trait LayerExt: 'static {
|
|||
|
||||
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool;
|
||||
|
||||
fn set_auto_transition(&self, auto_transition: bool);
|
||||
|
||||
#[cfg_attr(feature = "v1_16", deprecated)]
|
||||
|
@ -77,6 +82,8 @@ pub trait LayerExt: 'static {
|
|||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P);
|
||||
|
||||
//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;
|
||||
|
||||
fn connect_clip_removed<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
@ -124,6 +131,15 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_active_for_track<P: IsA<Track>>(&self, track: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_get_active_for_track(
|
||||
self.as_ref().to_glib_none().0,
|
||||
track.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_auto_transition(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_get_auto_transition(
|
||||
|
@ -186,6 +202,16 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn set_active_for_tracks(&self, active: bool, tracks: &[Track]) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_layer_set_active_for_tracks(
|
||||
self.as_ref().to_glib_none().0,
|
||||
active.to_glib(),
|
||||
tracks.to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_auto_transition(&self, auto_transition: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_layer_set_auto_transition(
|
||||
|
@ -210,6 +236,10 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//fn connect_active_changed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Empty ctype tracks: *.PtrArray TypeId { ns_id: 1, id: 17 }
|
||||
//}
|
||||
|
||||
fn connect_clip_added<F: Fn(&Self, &Clip) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn clip_added_trampoline<P, F: Fn(&P, &Clip) + 'static>(
|
||||
this: *mut ges_sys::GESLayer,
|
||||
|
|
|
@ -77,6 +77,9 @@ mod flags;
|
|||
pub use self::flags::PipelineFlags;
|
||||
pub use self::flags::TrackType;
|
||||
|
||||
mod alias;
|
||||
pub use self::alias::FrameNumber;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod traits {
|
||||
pub use super::AssetExt;
|
||||
|
|
|
@ -44,6 +44,9 @@ pub trait ProjectExt: 'static {
|
|||
profile: &P,
|
||||
) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn add_formatter(&self, formatter: /*Ignored*/&Formatter);
|
||||
|
||||
fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool;
|
||||
|
||||
fn create_asset_sync(
|
||||
|
@ -80,6 +83,12 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
fn connect_asset_removed<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_error_loading<F: Fn(&Self, &Timeline, &glib::Error) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_error_loading_asset<F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -87,6 +96,9 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
fn connect_loaded<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_loading<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -118,6 +130,11 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn add_formatter(&self, formatter: /*Ignored*/&Formatter) {
|
||||
// unsafe { TODO: call ges_sys:ges_project_add_formatter() }
|
||||
//}
|
||||
|
||||
fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_project_create_asset(
|
||||
|
@ -322,6 +339,42 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_error_loading<F: Fn(&Self, &Timeline, &glib::Error) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn error_loading_trampoline<
|
||||
P,
|
||||
F: Fn(&P, &Timeline, &glib::Error) + 'static,
|
||||
>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
timeline: *mut ges_sys::GESTimeline,
|
||||
error: *mut glib_sys::GError,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
&Project::from_glib_borrow(this).unsafe_cast_ref(),
|
||||
&from_glib_borrow(timeline),
|
||||
&from_glib_borrow(error),
|
||||
)
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"error-loading\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
error_loading_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_error_loading_asset<
|
||||
F: Fn(&Self, &glib::Error, &str, glib::types::Type) + 'static,
|
||||
>(
|
||||
|
@ -388,6 +441,34 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_loading<F: Fn(&Self, &Timeline) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn loading_trampoline<P, F: Fn(&P, &Timeline) + 'static>(
|
||||
this: *mut ges_sys::GESProject,
|
||||
timeline: *mut ges_sys::GESTimeline,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<Project>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
&Project::from_glib_borrow(this).unsafe_cast_ref(),
|
||||
&from_glib_borrow(timeline),
|
||||
)
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"loading\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
loading_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_missing_uri<F: Fn(&Self, &glib::Error, &Asset) -> Option<GString> + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -16,6 +16,7 @@ use std::mem::transmute;
|
|||
use std::ptr;
|
||||
use Asset;
|
||||
use Extractable;
|
||||
use FrameNumber;
|
||||
use Group;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
|
@ -64,6 +65,7 @@ impl Default for Timeline {
|
|||
pub const NONE_TIMELINE: Option<&Timeline> = None;
|
||||
|
||||
pub trait TimelineExt: 'static {
|
||||
#[cfg_attr(feature = "v1_18", deprecated)]
|
||||
fn add_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
@ -80,6 +82,10 @@ pub trait TimelineExt: 'static {
|
|||
|
||||
fn get_element(&self, name: &str) -> Option<TimelineElement>;
|
||||
|
||||
fn get_frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber;
|
||||
|
||||
fn get_frame_time(&self, frame_number: FrameNumber) -> gst::ClockTime;
|
||||
|
||||
fn get_groups(&self) -> Vec<Group>;
|
||||
|
||||
fn get_layer(&self, priority: u32) -> Option<Layer>;
|
||||
|
@ -236,6 +242,21 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_frame_at(&self, timestamp: gst::ClockTime) -> FrameNumber {
|
||||
unsafe {
|
||||
ges_sys::ges_timeline_get_frame_at(self.as_ref().to_glib_none().0, timestamp.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
fn get_frame_time(&self, frame_number: FrameNumber) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_get_frame_time(
|
||||
self.as_ref().to_glib_none().0,
|
||||
frame_number,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_groups(&self) -> Vec<Group> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_timeline_get_groups(
|
||||
|
@ -344,7 +365,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
layer_priority: i32,
|
||||
) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_timeline_paste_element(
|
||||
from_glib_full(ges_sys::ges_timeline_paste_element(
|
||||
self.as_ref().to_glib_none().0,
|
||||
element.as_ref().to_glib_none().0,
|
||||
position.to_glib(),
|
||||
|
@ -469,7 +490,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
}
|
||||
|
||||
//fn connect_group_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 51 }
|
||||
// Empty ctype children: *.PtrArray TypeId { ns_id: 1, id: 52 }
|
||||
//}
|
||||
|
||||
fn connect_layer_added<F: Fn(&Self, &Layer) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
|
@ -527,7 +548,7 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
}
|
||||
|
||||
//fn connect_select_tracks_for_object<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Empty ctype return value *.PtrArray TypeId { ns_id: 1, id: 16 }
|
||||
// Empty ctype return value *.PtrArray TypeId { ns_id: 1, id: 17 }
|
||||
//}
|
||||
|
||||
fn connect_snapping_ended<F: Fn(&Self, &TrackElement, &TrackElement, u64) + 'static>(
|
||||
|
|
|
@ -16,8 +16,16 @@ use glib_sys;
|
|||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use Edge;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use EditMode;
|
||||
use Extractable;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use Layer;
|
||||
use Timeline;
|
||||
use TrackType;
|
||||
|
||||
|
@ -36,6 +44,16 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn edit(
|
||||
&self,
|
||||
layers: &[Layer],
|
||||
new_layer_priority: i64,
|
||||
mode: EditMode,
|
||||
edge: Edge,
|
||||
position: u64,
|
||||
) -> bool;
|
||||
|
||||
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs);
|
||||
|
||||
//fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool;
|
||||
|
@ -55,6 +73,9 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn get_name(&self) -> Option<GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_natural_framerate(&self) -> Option<(i32, i32)>;
|
||||
|
||||
fn get_parent(&self) -> Option<TimelineElement>;
|
||||
|
||||
fn get_priority(&self) -> u32;
|
||||
|
@ -102,6 +123,7 @@ pub trait TimelineElementExt: 'static {
|
|||
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P)
|
||||
-> Result<(), glib::error::BoolError>;
|
||||
|
||||
#[cfg_attr(feature = "v1_10", deprecated)]
|
||||
fn set_priority(&self, priority: u32) -> bool;
|
||||
|
||||
fn set_start(&self, start: gst::ClockTime) -> bool;
|
||||
|
@ -118,6 +140,10 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn set_property_serialize(&self, serialize: bool);
|
||||
|
||||
//fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
//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;
|
||||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
@ -131,6 +157,7 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
#[cfg_attr(feature = "v1_10", deprecated)]
|
||||
fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
@ -155,6 +182,27 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn edit(
|
||||
&self,
|
||||
layers: &[Layer],
|
||||
new_layer_priority: i64,
|
||||
mode: EditMode,
|
||||
edge: Edge,
|
||||
position: u64,
|
||||
) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_timeline_element_edit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
layers.to_glib_none().0,
|
||||
new_layer_priority,
|
||||
mode.to_glib(),
|
||||
edge.to_glib(),
|
||||
position,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() }
|
||||
//}
|
||||
|
@ -208,6 +256,26 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_natural_framerate(&self) -> Option<(i32, i32)> {
|
||||
unsafe {
|
||||
let mut framerate_n = mem::MaybeUninit::uninit();
|
||||
let mut framerate_d = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(ges_sys::ges_timeline_element_get_natural_framerate(
|
||||
self.as_ref().to_glib_none().0,
|
||||
framerate_n.as_mut_ptr(),
|
||||
framerate_d.as_mut_ptr(),
|
||||
));
|
||||
let framerate_n = framerate_n.assume_init();
|
||||
let framerate_d = framerate_d.assume_init();
|
||||
if ret {
|
||||
Some((framerate_n, framerate_d))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn get_parent(&self) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_parent(
|
||||
|
@ -481,6 +549,14 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Ignored prop: GObject.ParamSpec
|
||||
//}
|
||||
|
||||
//fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Ignored prop: GObject.ParamSpec
|
||||
//}
|
||||
|
||||
//fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Ignored prop: GObject.ParamSpec
|
||||
//}
|
||||
|
|
|
@ -9,6 +9,8 @@ use glib::object::IsA;
|
|||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
|
@ -48,6 +50,9 @@ pub trait GESTrackExt: 'static {
|
|||
|
||||
fn get_mixing(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_restriction_caps(&self) -> Option<gst::Caps>;
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline>;
|
||||
|
||||
fn remove_element<P: IsA<TrackElement>>(
|
||||
|
@ -67,6 +72,12 @@ pub trait GESTrackExt: 'static {
|
|||
|
||||
fn get_property_duration(&self) -> u64;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_id(&self) -> Option<GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_property_id(&self, id: Option<&str>);
|
||||
|
||||
fn get_property_restriction_caps(&self) -> Option<gst::Caps>;
|
||||
|
||||
fn get_property_track_type(&self) -> TrackType;
|
||||
|
@ -85,6 +96,9 @@ pub trait GESTrackExt: 'static {
|
|||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_restriction_caps_notify<F: Fn(&Self) + 'static>(
|
||||
|
@ -130,6 +144,15 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_restriction_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ges_sys::ges_track_get_restriction_caps(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_none(ges_sys::ges_track_get_timeline(
|
||||
|
@ -205,6 +228,30 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_id(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"id\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value.get().expect("Return Value for property `id` getter")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_property_id(&self, id: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"id\0".as_ptr() as *const _,
|
||||
Value::from(id).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_restriction_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Caps as StaticType>::static_type());
|
||||
|
@ -344,6 +391,31 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_id_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<Track>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Track::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::id\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_id_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_mixing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_mixing_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrack,
|
||||
|
|
|
@ -43,6 +43,7 @@ pub trait TrackElementExt: 'static {
|
|||
whitelist: &[&str],
|
||||
);
|
||||
|
||||
#[cfg_attr(feature = "v1_18", deprecated)]
|
||||
fn edit(
|
||||
&self,
|
||||
layers: &[Layer],
|
||||
|
@ -65,6 +66,8 @@ pub trait TrackElementExt: 'static {
|
|||
|
||||
fn get_track_type(&self) -> TrackType;
|
||||
|
||||
fn has_internal_source(&self) -> bool;
|
||||
|
||||
fn is_active(&self) -> bool;
|
||||
|
||||
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element>;
|
||||
|
@ -75,16 +78,25 @@ pub trait TrackElementExt: 'static {
|
|||
|
||||
//fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool;
|
||||
|
||||
fn set_has_internal_source(&self, has_internal_source: bool);
|
||||
|
||||
fn set_track_type(&self, type_: TrackType);
|
||||
|
||||
fn get_property_active(&self) -> bool;
|
||||
|
||||
fn get_property_has_internal_source(&self) -> bool;
|
||||
|
||||
//fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
//fn connect_control_binding_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
@ -178,6 +190,14 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn has_internal_source(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_has_internal_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_active(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_track_element_is_active(
|
||||
|
@ -215,6 +235,15 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
// unsafe { TODO: call ges_sys:ges_track_element_set_control_source() }
|
||||
//}
|
||||
|
||||
fn set_has_internal_source(&self, has_internal_source: bool) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_set_has_internal_source(
|
||||
self.as_ref().to_glib_none().0,
|
||||
has_internal_source.to_glib(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_track_type(&self, type_: TrackType) {
|
||||
unsafe {
|
||||
ges_sys::ges_track_element_set_track_type(
|
||||
|
@ -239,6 +268,21 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_has_internal_source(&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"has-internal-source\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `has-internal-source` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
//fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
|
||||
// Ignored control_binding: Gst.ControlBinding
|
||||
//}
|
||||
|
@ -271,6 +315,33 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_has_internal_source_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<TrackElement>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::has-internal-source\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_has_internal_source_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_track_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESTrackElement,
|
||||
|
|
|
@ -9,6 +9,8 @@ use glib::object::IsA;
|
|||
use glib::signal::connect_raw;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
|
@ -59,13 +61,25 @@ pub trait UriClipAssetExt: 'static {
|
|||
|
||||
fn get_info(&self) -> Option<gst_pbutils::DiscovererInfo>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_max_duration(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_stream_assets(&self) -> Vec<UriSourceAsset>;
|
||||
|
||||
fn is_image(&self) -> bool;
|
||||
|
||||
fn set_property_duration(&self, duration: u64);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_is_nested_timeline(&self) -> bool;
|
||||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_is_nested_timeline_notify<F: Fn(&Self) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
||||
|
@ -85,6 +99,15 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_max_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_clip_asset_get_max_duration(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_assets(&self) -> Vec<UriSourceAsset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_uri_clip_asset_get_stream_assets(
|
||||
|
@ -111,6 +134,22 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_is_nested_timeline(&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"is-nested-timeline\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `is-nested-timeline` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClipAsset,
|
||||
|
@ -134,4 +173,32 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_is_nested_timeline_notify<F: Fn(&Self) + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_is_nested_timeline_trampoline<P, F: Fn(&P) + 'static>(
|
||||
this: *mut ges_sys::GESUriClipAsset,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<UriClipAsset>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&UriClipAsset::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::is-nested-timeline\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_is_nested_timeline_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@ pub trait UriSourceAssetExt: 'static {
|
|||
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo>;
|
||||
|
||||
fn get_stream_uri(&self) -> Option<GString>;
|
||||
|
||||
fn is_image(&self) -> bool;
|
||||
}
|
||||
|
||||
impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
||||
|
@ -52,4 +54,12 @@ impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
|||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ges_sys::ges_uri_source_asset_is_image(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -41,12 +41,6 @@ pub fn init() -> Result<(), glib::BoolError> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Deinitialize GStreamer Editing Services
|
||||
///
|
||||
/// # Safety
|
||||
///
|
||||
/// This must only be called once during the lifetime of the process, once no GStreamer threads
|
||||
/// are running anymore and all GStreamer resources are released.
|
||||
pub unsafe fn deinit() {
|
||||
ges_sys::ges_deinit();
|
||||
}
|
||||
|
|
|
@ -129,6 +129,9 @@ pub enum GLFormat {
|
|||
Rgba16,
|
||||
DepthComponent16,
|
||||
Depth24Stencil8,
|
||||
Rgb10A2,
|
||||
R16,
|
||||
Rg16,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -155,6 +158,9 @@ impl ToGlib for GLFormat {
|
|||
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::Rgb10A2 => gst_gl_sys::GST_GL_RGB10_A2,
|
||||
GLFormat::R16 => gst_gl_sys::GST_GL_R16,
|
||||
GLFormat::Rg16 => gst_gl_sys::GST_GL_RG16,
|
||||
GLFormat::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
|
@ -181,6 +187,9 @@ impl FromGlib<gst_gl_sys::GstGLFormat> for GLFormat {
|
|||
32859 => GLFormat::Rgba16,
|
||||
33189 => GLFormat::DepthComponent16,
|
||||
35056 => GLFormat::Depth24Stencil8,
|
||||
32857 => GLFormat::Rgb10A2,
|
||||
33322 => GLFormat::R16,
|
||||
33324 => GLFormat::Rg16,
|
||||
value => GLFormat::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ bitflags! {
|
|||
const EGL = 32;
|
||||
const VIV_FB = 64;
|
||||
const GBM = 128;
|
||||
const EGL_DEVICE = 256;
|
||||
const ANY = 4294967295;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@ pub trait GLBaseFilterExt: 'static {
|
|||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn find_gl_context(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_gl_context(&self) -> Option<GLContext>;
|
||||
|
||||
fn get_property_context(&self) -> Option<GLContext>;
|
||||
|
||||
fn connect_property_context_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
|
@ -52,6 +55,15 @@ impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_gl_context(&self) -> Option<GLContext> {
|
||||
unsafe {
|
||||
from_glib_full(gst_gl_sys::gst_gl_base_filter_get_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());
|
||||
|
|
|
@ -57,14 +57,23 @@ pub trait GLDisplayExt: 'static {
|
|||
|
||||
fn filter_gl_api(&self, gl_api: GLAPI);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_foreign_display(&self) -> bool;
|
||||
|
||||
fn get_gl_api(&self) -> GLAPI;
|
||||
|
||||
fn get_gl_api_unlocked(&self) -> GLAPI;
|
||||
|
||||
fn get_handle_type(&self) -> GLDisplayType;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn remove_context<P: IsA<GLContext>>(&self, context: &P);
|
||||
|
||||
fn remove_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn retrieve_window(&self, data: /*Unimplemented*/Option<Fundamental: Pointer>, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option<Fundamental: Pointer>, /*Unimplemented*/Option<Fundamental: Pointer>) -> i32) -> Option<GLWindow>;
|
||||
|
||||
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -123,6 +132,15 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_foreign_display(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_gl_sys::gst_gl_display_get_foreign_display(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gl_api(&self) -> GLAPI {
|
||||
unsafe {
|
||||
from_glib(gst_gl_sys::gst_gl_display_get_gl_api(
|
||||
|
@ -147,6 +165,16 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn remove_context<P: IsA<GLContext>>(&self, context: &P) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_display_remove_context(
|
||||
self.as_ref().to_glib_none().0,
|
||||
context.as_ref().to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
|
@ -159,6 +187,11 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn retrieve_window(&self, data: /*Unimplemented*/Option<Fundamental: Pointer>, compare_func: /*Unimplemented*/FnMut(/*Unimplemented*/Option<Fundamental: Pointer>, /*Unimplemented*/Option<Fundamental: Pointer>) -> i32) -> Option<GLWindow> {
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_display_retrieve_window() }
|
||||
//}
|
||||
|
||||
fn connect_create_context<F: Fn(&Self, &GLContext) -> GLContext + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -55,6 +55,9 @@ pub trait GLWindowExt: 'static {
|
|||
|
||||
fn handle_events(&self, handle_events: bool);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn has_output_surface(&self) -> bool;
|
||||
|
||||
fn queue_resize(&self);
|
||||
|
||||
fn quit(&self);
|
||||
|
@ -67,6 +70,8 @@ pub trait GLWindowExt: 'static {
|
|||
|
||||
fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64);
|
||||
|
||||
fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64);
|
||||
|
||||
fn set_preferred_size(&self, width: i32, height: i32);
|
||||
|
||||
fn set_render_rectangle(
|
||||
|
@ -88,6 +93,12 @@ pub trait GLWindowExt: 'static {
|
|||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_scroll_event<F: Fn(&Self, f64, f64, f64, f64) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
impl<O: IsA<GLWindow>> GLWindowExt for O {
|
||||
|
@ -138,6 +149,15 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn has_output_surface(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_gl_sys::gst_gl_window_has_output_surface(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn queue_resize(&self) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0);
|
||||
|
@ -184,6 +204,18 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn send_scroll_event(&self, posx: f64, posy: f64, delta_x: f64, delta_y: f64) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_window_send_scroll_event(
|
||||
self.as_ref().to_glib_none().0,
|
||||
posx,
|
||||
posy,
|
||||
delta_x,
|
||||
delta_y,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_preferred_size(&self, width: i32, height: i32) {
|
||||
unsafe {
|
||||
gst_gl_sys::gst_gl_window_set_preferred_size(
|
||||
|
@ -294,4 +326,44 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_scroll_event<F: Fn(&Self, f64, f64, f64, f64) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn scroll_event_trampoline<
|
||||
P,
|
||||
F: Fn(&P, f64, f64, f64, f64) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_gl_sys::GstGLWindow,
|
||||
x: libc::c_double,
|
||||
y: libc::c_double,
|
||||
delta_x: libc::c_double,
|
||||
delta_y: libc::c_double,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<GLWindow>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(
|
||||
&GLWindow::from_glib_borrow(this).unsafe_cast_ref(),
|
||||
x,
|
||||
y,
|
||||
delta_x,
|
||||
delta_y,
|
||||
)
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"scroll-event\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
scroll_event_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -72,6 +72,9 @@ pub trait EncodingProfileExt: 'static {
|
|||
|
||||
fn get_preset_name(&self) -> Option<GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_single_segment(&self) -> bool;
|
||||
|
||||
fn get_type_nick(&self) -> Option<GString>;
|
||||
|
||||
fn is_enabled(&self) -> bool;
|
||||
|
@ -161,6 +164,15 @@ impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_single_segment(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_pbutils_sys::gst_encoding_profile_get_single_segment(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_type_nick(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_type_nick(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -20,8 +20,8 @@ pub enum RTCPFBType {
|
|||
RtpfbTypeTmmbr,
|
||||
RtpfbTypeTmmbn,
|
||||
RtpfbTypeRtcpSrReq,
|
||||
RtpfbTypeTwcc,
|
||||
PsfbTypeSli,
|
||||
PsfbTypeAfb,
|
||||
PsfbTypeTstn,
|
||||
PsfbTypeVbcn,
|
||||
#[doc(hidden)]
|
||||
|
@ -39,8 +39,8 @@ impl ToGlib for RTCPFBType {
|
|||
RTCPFBType::RtpfbTypeTmmbr => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBR,
|
||||
RTCPFBType::RtpfbTypeTmmbn => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TMMBN,
|
||||
RTCPFBType::RtpfbTypeRtcpSrReq => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_RTCP_SR_REQ,
|
||||
RTCPFBType::RtpfbTypeTwcc => gst_rtp_sys::GST_RTCP_RTPFB_TYPE_TWCC,
|
||||
RTCPFBType::PsfbTypeSli => gst_rtp_sys::GST_RTCP_PSFB_TYPE_SLI,
|
||||
RTCPFBType::PsfbTypeAfb => gst_rtp_sys::GST_RTCP_PSFB_TYPE_AFB,
|
||||
RTCPFBType::PsfbTypeTstn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_TSTN,
|
||||
RTCPFBType::PsfbTypeVbcn => gst_rtp_sys::GST_RTCP_PSFB_TYPE_VBCN,
|
||||
RTCPFBType::__Unknown(value) => value,
|
||||
|
@ -58,8 +58,8 @@ impl FromGlib<gst_rtp_sys::GstRTCPFBType> for RTCPFBType {
|
|||
3 => RTCPFBType::RtpfbTypeTmmbr,
|
||||
4 => RTCPFBType::RtpfbTypeTmmbn,
|
||||
5 => RTCPFBType::RtpfbTypeRtcpSrReq,
|
||||
15 => RTCPFBType::RtpfbTypeTwcc,
|
||||
2 => RTCPFBType::PsfbTypeSli,
|
||||
15 => RTCPFBType::PsfbTypeAfb,
|
||||
6 => RTCPFBType::PsfbTypeTstn,
|
||||
7 => RTCPFBType::PsfbTypeVbcn,
|
||||
value => RTCPFBType::__Unknown(value),
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -24,6 +24,8 @@ use RTSPFilterResult;
|
|||
use RTSPMountPoints;
|
||||
use RTSPSession;
|
||||
use RTSPSessionPool;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use RTSPStreamTransport;
|
||||
use RTSPThreadPool;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -59,10 +61,16 @@ pub trait RTSPClientExt: 'static {
|
|||
|
||||
//fn get_connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_content_length_limit(&self) -> u32;
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints>;
|
||||
|
||||
fn get_session_pool(&self) -> Option<RTSPSessionPool>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport>;
|
||||
|
||||
fn get_thread_pool(&self) -> Option<RTSPThreadPool>;
|
||||
|
||||
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
||||
|
@ -78,6 +86,9 @@ pub trait RTSPClientExt: 'static {
|
|||
|
||||
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_content_length_limit(&self, limit: u32);
|
||||
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>);
|
||||
|
||||
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>);
|
||||
|
@ -93,6 +104,10 @@ pub trait RTSPClientExt: 'static {
|
|||
|
||||
fn set_property_drop_backlog(&self, drop_backlog: bool);
|
||||
|
||||
fn get_property_post_session_timeout(&self) -> i32;
|
||||
|
||||
fn set_property_post_session_timeout(&self, post_session_timeout: i32);
|
||||
|
||||
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -249,6 +264,11 @@ pub trait RTSPClientExt: 'static {
|
|||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -274,6 +294,15 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_get_connection() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_content_length_limit(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_get_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_mount_points(
|
||||
|
@ -290,6 +319,16 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_stream_transport(&self, channel: u8) -> Option<RTSPStreamTransport> {
|
||||
unsafe {
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_client_get_stream_transport(
|
||||
self.as_ref().to_glib_none().0,
|
||||
channel,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_thread_pool(&self) -> Option<RTSPThreadPool> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_thread_pool(
|
||||
|
@ -362,6 +401,16 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_connection() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_content_length_limit(&self, limit: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
limit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_mount_points(
|
||||
|
@ -423,6 +472,31 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_post_session_timeout(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"post-session-timeout\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `post-session-timeout` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_post_session_timeout(&self, post_session_timeout: i32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"post-session-timeout\0".as_ptr() as *const _,
|
||||
Value::from(&post_session_timeout).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_announce_request<F: Fn(&Self, &RTSPContext) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -1284,6 +1358,36 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_property_post_session_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_post_session_timeout_trampoline<
|
||||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPClient,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPClient>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::post-session-timeout\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_post_session_timeout_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_session_pool_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -18,6 +18,8 @@ use gst_rtsp;
|
|||
use gst_rtsp_server_sys;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
use RTSPAddressPool;
|
||||
use RTSPMediaStatus;
|
||||
|
@ -96,6 +98,12 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<GString>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rate_control(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rates(&self) -> Option<(f64, f64)>;
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime;
|
||||
|
||||
fn get_status(&self) -> RTSPMediaStatus;
|
||||
|
@ -110,11 +118,17 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
//fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn has_completed_sender(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn is_bind_mcast_address(&self) -> bool;
|
||||
|
||||
fn is_eos_shutdown(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn is_receive_only(&self) -> bool;
|
||||
|
||||
fn is_reusable(&self) -> bool;
|
||||
|
||||
fn is_shared(&self) -> bool;
|
||||
|
@ -123,15 +137,21 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
fn is_time_provider(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn lock(&self);
|
||||
|
||||
fn n_streams(&self) -> u32;
|
||||
|
||||
fn prepare(&self, thread: Option<&RTSPThread>) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool;
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool;
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: gst::ClockTime) -> bool;
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff;
|
||||
|
||||
|
@ -166,6 +186,9 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_rate_control(&self, enabled: bool);
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime);
|
||||
|
||||
fn set_reusable(&self, reusable: bool);
|
||||
|
@ -184,6 +207,9 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
fn suspend(&self) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn unlock(&self);
|
||||
|
||||
fn unprepare(&self) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn unsuspend(&self) -> Result<(), glib::error::BoolError>;
|
||||
|
@ -440,6 +466,35 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rate_control(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rates(&self) -> Option<(f64, f64)> {
|
||||
unsafe {
|
||||
let mut rate = mem::MaybeUninit::uninit();
|
||||
let mut applied_rate = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_rates(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rate.as_mut_ptr(),
|
||||
applied_rate.as_mut_ptr(),
|
||||
));
|
||||
let rate = rate.assume_init();
|
||||
let applied_rate = applied_rate.assume_init();
|
||||
if ret {
|
||||
Some((rate, applied_rate))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_retransmission_time(
|
||||
|
@ -489,6 +544,15 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn has_completed_sender(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_has_completed_sender(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
fn is_bind_mcast_address(&self) -> bool {
|
||||
unsafe {
|
||||
|
@ -506,6 +570,15 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn is_receive_only(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_receive_only(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_reusable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_reusable(
|
||||
|
@ -538,6 +611,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn lock(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_lock(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn n_streams(&self) -> u32 {
|
||||
unsafe { gst_rtsp_server_sys::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) }
|
||||
}
|
||||
|
@ -558,11 +638,16 @@ 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"))]
|
||||
//#[cfg(any(feature = "v1_18", 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_18", feature = "dox"))]
|
||||
//fn seek_trickmode(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags, rate: f64, trickmode_interval: gst::ClockTime) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_trickmode() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() }
|
||||
|
@ -692,6 +777,16 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_rate_control(&self, enabled: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
enabled.to_glib(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_retransmission_time(
|
||||
|
@ -769,6 +864,13 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn unlock(&self) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_media_unlock(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn unprepare(&self) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(
|
||||
|
|
|
@ -10,7 +10,10 @@ use glib::signal::connect_raw;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
@ -90,6 +93,9 @@ pub trait RTSPServerExt: 'static {
|
|||
|
||||
fn get_bound_port(&self) -> i32;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_content_length_limit(&self) -> u32;
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints>;
|
||||
|
||||
fn get_service(&self) -> Option<GString>;
|
||||
|
@ -104,6 +110,9 @@ pub trait RTSPServerExt: 'static {
|
|||
|
||||
fn set_backlog(&self, backlog: i32);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_content_length_limit(&self, limit: u32);
|
||||
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>);
|
||||
|
||||
fn set_service(&self, service: &str);
|
||||
|
@ -120,6 +129,10 @@ pub trait RTSPServerExt: 'static {
|
|||
initial_buffer: Option<&str>,
|
||||
) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn get_property_content_length_limit(&self) -> u32;
|
||||
|
||||
fn set_property_content_length_limit(&self, content_length_limit: u32);
|
||||
|
||||
fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -140,6 +153,11 @@ pub trait RTSPServerExt: 'static {
|
|||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_content_length_limit_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -264,6 +282,15 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_content_length_limit(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_get_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_server_get_mount_points(
|
||||
|
@ -323,6 +350,16 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_content_length_limit(&self, limit: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_content_length_limit(
|
||||
self.as_ref().to_glib_none().0,
|
||||
limit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_server_set_mount_points(
|
||||
|
@ -380,6 +417,31 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_content_length_limit(&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"content-length-limit\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `content-length-limit` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_content_length_limit(&self, content_length_limit: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"content-length-limit\0".as_ptr() as *const _,
|
||||
Value::from(&content_length_limit).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_client_connected<F: Fn(&Self, &RTSPClient) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -494,6 +556,36 @@ impl<O: IsA<RTSPServer>> RTSPServerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_property_content_length_limit_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_content_length_limit_trampoline<
|
||||
P,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPServer,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPServer>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPServer::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::content-length-limit\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_content_length_limit_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_mount_points_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -83,10 +83,19 @@ pub trait RTSPSessionExt: 'static {
|
|||
|
||||
fn touch(&self);
|
||||
|
||||
fn get_property_extra_timeout(&self) -> u32;
|
||||
|
||||
fn set_property_extra_timeout(&self, extra_timeout: u32);
|
||||
|
||||
fn get_property_timeout_always_visible(&self) -> bool;
|
||||
|
||||
fn set_property_timeout_always_visible(&self, timeout_always_visible: bool);
|
||||
|
||||
fn connect_property_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
@ -253,6 +262,31 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_property_extra_timeout(&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"extra-timeout\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `extra-timeout` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_extra_timeout(&self, extra_timeout: u32) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"extra-timeout\0".as_ptr() as *const _,
|
||||
Value::from(&extra_timeout).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_timeout_always_visible(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
|
@ -278,6 +312,33 @@ impl<O: IsA<RTSPSession>> RTSPSessionExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
fn connect_property_extra_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_extra_timeout_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(
|
||||
this: *mut gst_rtsp_server_sys::GstRTSPSession,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) where
|
||||
P: IsA<RTSPSession>,
|
||||
{
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPSession::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::extra-timeout\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_extra_timeout_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_property_timeout_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
|
@ -110,6 +110,12 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rate_control(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rates(&self) -> Option<(f64, f64)>;
|
||||
|
||||
fn get_retransmission_pt(&self) -> u32;
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime;
|
||||
|
@ -242,6 +248,9 @@ pub trait RTSPStreamExt: 'static {
|
|||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_rate_control(&self, enabled: bool);
|
||||
|
||||
fn set_retransmission_pt(&self, rtx_pt: u32);
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime);
|
||||
|
@ -466,6 +475,35 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rate_control(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_rates(&self) -> Option<(f64, f64)> {
|
||||
unsafe {
|
||||
let mut rate = mem::MaybeUninit::uninit();
|
||||
let mut applied_rate = mem::MaybeUninit::uninit();
|
||||
let ret = from_glib(gst_rtsp_server_sys::gst_rtsp_stream_get_rates(
|
||||
self.as_ref().to_glib_none().0,
|
||||
rate.as_mut_ptr(),
|
||||
applied_rate.as_mut_ptr(),
|
||||
));
|
||||
let rate = rate.assume_init();
|
||||
let applied_rate = applied_rate.assume_init();
|
||||
if ret {
|
||||
Some((rate, applied_rate))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn get_retransmission_pt(&self) -> u32 {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_get_retransmission_pt(
|
||||
|
@ -948,6 +986,16 @@ impl<O: IsA<RTSPStream>> RTSPStreamExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_rate_control(&self, enabled: bool) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_rate_control(
|
||||
self.as_ref().to_glib_none().0,
|
||||
enabled.to_glib(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_retransmission_pt(&self, rtx_pt: u32) {
|
||||
unsafe {
|
||||
gst_rtsp_server_sys::gst_rtsp_stream_set_retransmission_pt(
|
||||
|
|
|
@ -47,12 +47,12 @@ pub trait RTSPStreamTransportExt: 'static {
|
|||
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_rtcp_list(&self, buffer_list: /*Ignored*/&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 send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool;
|
||||
|
||||
fn set_active(&self, active: bool) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -140,7 +140,7 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//fn send_rtcp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool {
|
||||
//fn send_rtcp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtcp_list() }
|
||||
//}
|
||||
|
||||
|
@ -157,7 +157,7 @@ impl<O: IsA<RTSPStreamTransport>> RTSPStreamTransportExt for O {
|
|||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
//fn send_rtp_list(&self, buffer_list: /*Ignored*/&mut gst::BufferList) -> bool {
|
||||
//fn send_rtp_list(&self, buffer_list: /*Ignored*/&gst::BufferList) -> bool {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_stream_transport_send_rtp_list() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -36,6 +36,15 @@ impl RTSPUrl {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_request_uri_with_control(&self, control_path: &str) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(gst_rtsp_sys::gst_rtsp_url_get_request_uri_with_control(
|
||||
self.to_glib_none().0,
|
||||
control_path.to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_port(&mut self, port: u16) -> RTSPResult {
|
||||
unsafe {
|
||||
from_glib(gst_rtsp_sys::gst_rtsp_url_set_port(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -14,66 +14,6 @@ use gst_video_sys;
|
|||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum VideoAlphaMode {
|
||||
Copy,
|
||||
Set,
|
||||
Mult,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for VideoAlphaMode {
|
||||
type GlibType = gst_video_sys::GstVideoAlphaMode;
|
||||
|
||||
fn to_glib(&self) -> gst_video_sys::GstVideoAlphaMode {
|
||||
match *self {
|
||||
VideoAlphaMode::Copy => gst_video_sys::GST_VIDEO_ALPHA_MODE_COPY,
|
||||
VideoAlphaMode::Set => gst_video_sys::GST_VIDEO_ALPHA_MODE_SET,
|
||||
VideoAlphaMode::Mult => gst_video_sys::GST_VIDEO_ALPHA_MODE_MULT,
|
||||
VideoAlphaMode::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_video_sys::GstVideoAlphaMode> for VideoAlphaMode {
|
||||
fn from_glib(value: gst_video_sys::GstVideoAlphaMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => VideoAlphaMode::Copy,
|
||||
1 => VideoAlphaMode::Set,
|
||||
2 => VideoAlphaMode::Mult,
|
||||
value => VideoAlphaMode::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticType for VideoAlphaMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_video_sys::gst_video_alpha_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FromValueOptional<'a> for VideoAlphaMode {
|
||||
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
|
||||
Some(FromValue::from_value(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FromValue<'a> for VideoAlphaMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for VideoAlphaMode {
|
||||
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, Clone, Copy)]
|
||||
pub enum VideoAFDSpec {
|
||||
DvbEtsi,
|
||||
AtscA53,
|
||||
|
@ -135,6 +75,7 @@ impl SetValue for VideoAFDSpec {
|
|||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum VideoAFDValue {
|
||||
Unavailable,
|
||||
_169TopAligned,
|
||||
|
@ -230,6 +171,67 @@ impl SetValue for VideoAFDValue {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum VideoAlphaMode {
|
||||
Copy,
|
||||
Set,
|
||||
Mult,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for VideoAlphaMode {
|
||||
type GlibType = gst_video_sys::GstVideoAlphaMode;
|
||||
|
||||
fn to_glib(&self) -> gst_video_sys::GstVideoAlphaMode {
|
||||
match *self {
|
||||
VideoAlphaMode::Copy => gst_video_sys::GST_VIDEO_ALPHA_MODE_COPY,
|
||||
VideoAlphaMode::Set => gst_video_sys::GST_VIDEO_ALPHA_MODE_SET,
|
||||
VideoAlphaMode::Mult => gst_video_sys::GST_VIDEO_ALPHA_MODE_MULT,
|
||||
VideoAlphaMode::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<gst_video_sys::GstVideoAlphaMode> for VideoAlphaMode {
|
||||
fn from_glib(value: gst_video_sys::GstVideoAlphaMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => VideoAlphaMode::Copy,
|
||||
1 => VideoAlphaMode::Set,
|
||||
2 => VideoAlphaMode::Mult,
|
||||
value => VideoAlphaMode::__Unknown(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticType for VideoAlphaMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_video_sys::gst_video_alpha_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FromValueOptional<'a> for VideoAlphaMode {
|
||||
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
|
||||
Some(FromValue::from_value(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> FromValue<'a> for VideoAlphaMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for VideoAlphaMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_16", feature = "dox"))]
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
|
@ -758,6 +760,17 @@ pub enum VideoFormat {
|
|||
Y410,
|
||||
Vuya,
|
||||
Bgr10a2Le,
|
||||
Rgb10a2Le,
|
||||
Y44416be,
|
||||
Y44416le,
|
||||
P016Be,
|
||||
P016Le,
|
||||
P012Be,
|
||||
P012Le,
|
||||
Y212Be,
|
||||
Y212Le,
|
||||
Y412Be,
|
||||
Y412Le,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -854,6 +867,17 @@ impl ToGlib for VideoFormat {
|
|||
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::Rgb10a2Le => gst_video_sys::GST_VIDEO_FORMAT_RGB10A2_LE,
|
||||
VideoFormat::Y44416be => gst_video_sys::GST_VIDEO_FORMAT_Y444_16BE,
|
||||
VideoFormat::Y44416le => gst_video_sys::GST_VIDEO_FORMAT_Y444_16LE,
|
||||
VideoFormat::P016Be => gst_video_sys::GST_VIDEO_FORMAT_P016_BE,
|
||||
VideoFormat::P016Le => gst_video_sys::GST_VIDEO_FORMAT_P016_LE,
|
||||
VideoFormat::P012Be => gst_video_sys::GST_VIDEO_FORMAT_P012_BE,
|
||||
VideoFormat::P012Le => gst_video_sys::GST_VIDEO_FORMAT_P012_LE,
|
||||
VideoFormat::Y212Be => gst_video_sys::GST_VIDEO_FORMAT_Y212_BE,
|
||||
VideoFormat::Y212Le => gst_video_sys::GST_VIDEO_FORMAT_Y212_LE,
|
||||
VideoFormat::Y412Be => gst_video_sys::GST_VIDEO_FORMAT_Y412_BE,
|
||||
VideoFormat::Y412Le => gst_video_sys::GST_VIDEO_FORMAT_Y412_LE,
|
||||
VideoFormat::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
|
@ -950,6 +974,17 @@ impl FromGlib<gst_video_sys::GstVideoFormat> for VideoFormat {
|
|||
83 => VideoFormat::Y410,
|
||||
84 => VideoFormat::Vuya,
|
||||
85 => VideoFormat::Bgr10a2Le,
|
||||
86 => VideoFormat::Rgb10a2Le,
|
||||
87 => VideoFormat::Y44416be,
|
||||
88 => VideoFormat::Y44416le,
|
||||
89 => VideoFormat::P016Be,
|
||||
90 => VideoFormat::P016Le,
|
||||
91 => VideoFormat::P012Be,
|
||||
92 => VideoFormat::P012Le,
|
||||
93 => VideoFormat::Y212Be,
|
||||
94 => VideoFormat::Y212Le,
|
||||
95 => VideoFormat::Y412Be,
|
||||
96 => VideoFormat::Y412Le,
|
||||
value => VideoFormat::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
@ -1575,6 +1610,9 @@ pub enum VideoTransferFunction {
|
|||
Log316,
|
||||
Bt202012,
|
||||
Adobergb,
|
||||
Bt202010,
|
||||
Smpte2084,
|
||||
AribStdB67,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -1598,6 +1636,9 @@ impl ToGlib for VideoTransferFunction {
|
|||
VideoTransferFunction::Log316 => gst_video_sys::GST_VIDEO_TRANSFER_LOG316,
|
||||
VideoTransferFunction::Bt202012 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_12,
|
||||
VideoTransferFunction::Adobergb => gst_video_sys::GST_VIDEO_TRANSFER_ADOBERGB,
|
||||
VideoTransferFunction::Bt202010 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_10,
|
||||
VideoTransferFunction::Smpte2084 => gst_video_sys::GST_VIDEO_TRANSFER_SMPTE2084,
|
||||
VideoTransferFunction::AribStdB67 => gst_video_sys::GST_VIDEO_TRANSFER_ARIB_STD_B67,
|
||||
VideoTransferFunction::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
|
@ -1621,6 +1662,9 @@ impl FromGlib<gst_video_sys::GstVideoTransferFunction> for VideoTransferFunction
|
|||
10 => VideoTransferFunction::Log316,
|
||||
11 => VideoTransferFunction::Bt202012,
|
||||
12 => VideoTransferFunction::Adobergb,
|
||||
13 => VideoTransferFunction::Bt202010,
|
||||
14 => VideoTransferFunction::Smpte2084,
|
||||
15 => VideoTransferFunction::AribStdB67,
|
||||
value => VideoTransferFunction::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ bitflags! {
|
|||
const FIRST_IN_BUNDLE = 33554432;
|
||||
const TOP_FIELD = 10485760;
|
||||
const BOTTOM_FIELD = 8388608;
|
||||
const MARKER = 512;
|
||||
const LAST = 268435456;
|
||||
}
|
||||
}
|
||||
|
@ -486,3 +487,31 @@ impl FromGlib<gst_video_sys::GstVideoTimeCodeFlags> for VideoTimeCodeFlags {
|
|||
VideoTimeCodeFlags::from_bits_truncate(value)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl StaticType for VideoTimeCodeFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(gst_video_sys::gst_video_time_code_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl<'a> FromValueOptional<'a> for VideoTimeCodeFlags {
|
||||
unsafe fn from_value_optional(value: &Value) -> Option<Self> {
|
||||
Some(FromValue::from_value(value))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl<'a> FromValue<'a> for VideoTimeCodeFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
impl SetValue for VideoTimeCodeFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -3,10 +3,28 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use glib;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::signal::connect_raw;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::StaticType;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::Value;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_video_sys;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::mem::transmute;
|
||||
use VideoCodecFrame;
|
||||
|
||||
glib_wrapper! {
|
||||
|
@ -56,6 +74,18 @@ pub trait VideoDecoderExt: 'static {
|
|||
fn set_packetized(&self, packetized: bool);
|
||||
|
||||
fn set_use_default_pad_acceptcaps(&self, use_: bool);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_qos(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_property_qos(&self, qos: bool);
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
}
|
||||
|
||||
impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
||||
|
@ -190,4 +220,59 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExt for O {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_property_qos(&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"qos\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `qos` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn set_property_qos(&self, qos: bool) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.to_glib_none().0 as *mut gobject_sys::GObject,
|
||||
b"qos\0".as_ptr() as *const _,
|
||||
Value::from(&qos).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn connect_property_qos_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_qos_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::qos\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_qos_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ pub trait VideoEncoderExtManual: 'static {
|
|||
frame: Option<VideoCodecFrame>,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn finish_subframe(&self, frame: &VideoCodecFrame) -> Result<gst::FlowSuccess, gst::FlowError>;
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -3,13 +3,25 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use glib::object::ObjectType as ObjectType_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::signal::connect_raw;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::translate::*;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_web_rtc_sys;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::boxed::Box as Box_;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use std::mem::transmute;
|
||||
use WebRTCRTPReceiver;
|
||||
use WebRTCRTPSender;
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
use WebRTCRTPTransceiverDirection;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct WebRTCRTPTransceiver(Object<gst_web_rtc_sys::GstWebRTCRTPTransceiver, gst_web_rtc_sys::GstWebRTCRTPTransceiverClass, WebRTCRTPTransceiverClass>);
|
||||
|
@ -20,6 +32,34 @@ glib_wrapper! {
|
|||
}
|
||||
|
||||
impl WebRTCRTPTransceiver {
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn get_property_direction(&self) -> WebRTCRTPTransceiverDirection {
|
||||
unsafe {
|
||||
let mut value =
|
||||
Value::from_type(<WebRTCRTPTransceiverDirection as StaticType>::static_type());
|
||||
gobject_sys::g_object_get_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
b"direction\0".as_ptr() as *const _,
|
||||
value.to_glib_none_mut().0,
|
||||
);
|
||||
value
|
||||
.get()
|
||||
.expect("Return Value for property `direction` getter")
|
||||
.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn set_property_direction(&self, direction: WebRTCRTPTransceiverDirection) {
|
||||
unsafe {
|
||||
gobject_sys::g_object_set_property(
|
||||
self.as_ptr() as *mut gobject_sys::GObject,
|
||||
b"direction\0".as_ptr() as *const _,
|
||||
Value::from(&direction).to_glib_none().0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_mlineindex(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
|
@ -62,6 +102,36 @@ impl WebRTCRTPTransceiver {
|
|||
.expect("Return Value for property `sender` getter")
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn connect_property_direction_notify<
|
||||
F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static,
|
||||
>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_direction_trampoline<
|
||||
F: Fn(&WebRTCRTPTransceiver) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut gst_web_rtc_sys::GstWebRTCRTPTransceiver,
|
||||
_param_spec: glib_sys::gpointer,
|
||||
f: glib_sys::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::direction\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_direction_trampoline::<F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl Send for WebRTCRTPTransceiver {}
|
||||
|
|
|
@ -40,7 +40,7 @@ pub const NONE_ALLOCATOR: Option<&Allocator> = None;
|
|||
pub trait AllocatorExt: 'static {
|
||||
//fn alloc(&self, size: usize, params: /*Ignored*/Option<&mut AllocationParams>) -> /*Ignored*/Option<Memory>;
|
||||
|
||||
//fn free(&self, memory: /*Ignored*/&mut Memory);
|
||||
//fn free(&self, memory: /*Ignored*/&Memory);
|
||||
|
||||
fn set_default(&self);
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ impl<O: IsA<Allocator>> AllocatorExt for O {
|
|||
// unsafe { TODO: call gst_sys:gst_allocator_alloc() }
|
||||
//}
|
||||
|
||||
//fn free(&self, memory: /*Ignored*/&mut Memory) {
|
||||
//fn free(&self, memory: /*Ignored*/&Memory) {
|
||||
// unsafe { TODO: call gst_sys:gst_allocator_free() }
|
||||
//}
|
||||
|
||||
|
|
|
@ -61,6 +61,9 @@ pub trait GstBinExt: 'static {
|
|||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
fn get_suppressed_flags(&self) -> ElementFlags;
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> /*Ignored*/Option<Iterator>;
|
||||
|
||||
//fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option<Iterator>;
|
||||
|
||||
//fn iterate_elements(&self) -> /*Ignored*/Option<Iterator>;
|
||||
|
@ -187,6 +190,11 @@ impl<O: IsA<Bin>> GstBinExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> /*Ignored*/Option<Iterator> {
|
||||
// unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_element_factory_name() }
|
||||
//}
|
||||
|
||||
//fn iterate_all_by_interface(&self, iface: glib::types::Type) -> /*Ignored*/Option<Iterator> {
|
||||
// unsafe { TODO: call gst_sys:gst_bin_iterate_all_by_interface() }
|
||||
//}
|
||||
|
|
|
@ -62,11 +62,27 @@ impl DateTime {
|
|||
unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_local_time(secs)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn new_from_unix_epoch_local_time_usecs(usecs: i64) -> DateTime {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_local_time_usecs(
|
||||
usecs,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_from_unix_epoch_utc(secs: i64) -> DateTime {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_utc(secs)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
pub fn new_from_unix_epoch_utc_usecs(usecs: i64) -> DateTime {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe { from_glib_full(gst_sys::gst_date_time_new_from_unix_epoch_utc_usecs(usecs)) }
|
||||
}
|
||||
|
||||
pub fn new_local_time(
|
||||
year: i32,
|
||||
month: i32,
|
||||
|
|
|
@ -338,6 +338,7 @@ pub enum ClockType {
|
|||
Realtime,
|
||||
Monotonic,
|
||||
Other,
|
||||
Tai,
|
||||
#[doc(hidden)]
|
||||
__Unknown(i32),
|
||||
}
|
||||
|
@ -351,6 +352,7 @@ impl ToGlib for ClockType {
|
|||
ClockType::Realtime => gst_sys::GST_CLOCK_TYPE_REALTIME,
|
||||
ClockType::Monotonic => gst_sys::GST_CLOCK_TYPE_MONOTONIC,
|
||||
ClockType::Other => gst_sys::GST_CLOCK_TYPE_OTHER,
|
||||
ClockType::Tai => gst_sys::GST_CLOCK_TYPE_TAI,
|
||||
ClockType::__Unknown(value) => value,
|
||||
}
|
||||
}
|
||||
|
@ -364,6 +366,7 @@ impl FromGlib<gst_sys::GstClockType> for ClockType {
|
|||
0 => ClockType::Realtime,
|
||||
1 => ClockType::Monotonic,
|
||||
2 => ClockType::Other,
|
||||
3 => ClockType::Tai,
|
||||
value => ClockType::__Unknown(value),
|
||||
}
|
||||
}
|
||||
|
@ -624,6 +627,7 @@ pub enum EventType {
|
|||
Protection,
|
||||
SegmentDone,
|
||||
Gap,
|
||||
InstantRateChange,
|
||||
Qos,
|
||||
Seek,
|
||||
Navigation,
|
||||
|
@ -632,6 +636,7 @@ pub enum EventType {
|
|||
Reconfigure,
|
||||
TocSelect,
|
||||
SelectStreams,
|
||||
InstantRateSyncTime,
|
||||
CustomUpstream,
|
||||
CustomDownstream,
|
||||
CustomDownstreamOob,
|
||||
|
@ -664,6 +669,7 @@ impl ToGlib for EventType {
|
|||
EventType::Protection => gst_sys::GST_EVENT_PROTECTION,
|
||||
EventType::SegmentDone => gst_sys::GST_EVENT_SEGMENT_DONE,
|
||||
EventType::Gap => gst_sys::GST_EVENT_GAP,
|
||||
EventType::InstantRateChange => gst_sys::GST_EVENT_INSTANT_RATE_CHANGE,
|
||||
EventType::Qos => gst_sys::GST_EVENT_QOS,
|
||||
EventType::Seek => gst_sys::GST_EVENT_SEEK,
|
||||
EventType::Navigation => gst_sys::GST_EVENT_NAVIGATION,
|
||||
|
@ -672,6 +678,7 @@ impl ToGlib for EventType {
|
|||
EventType::Reconfigure => gst_sys::GST_EVENT_RECONFIGURE,
|
||||
EventType::TocSelect => gst_sys::GST_EVENT_TOC_SELECT,
|
||||
EventType::SelectStreams => gst_sys::GST_EVENT_SELECT_STREAMS,
|
||||
EventType::InstantRateSyncTime => gst_sys::GST_EVENT_INSTANT_RATE_SYNC_TIME,
|
||||
EventType::CustomUpstream => gst_sys::GST_EVENT_CUSTOM_UPSTREAM,
|
||||
EventType::CustomDownstream => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM,
|
||||
EventType::CustomDownstreamOob => gst_sys::GST_EVENT_CUSTOM_DOWNSTREAM_OOB,
|
||||
|
@ -704,6 +711,7 @@ impl FromGlib<gst_sys::GstEventType> for EventType {
|
|||
33310 => EventType::Protection,
|
||||
38406 => EventType::SegmentDone,
|
||||
40966 => EventType::Gap,
|
||||
46090 => EventType::InstantRateChange,
|
||||
48641 => EventType::Qos,
|
||||
51201 => EventType::Seek,
|
||||
53761 => EventType::Navigation,
|
||||
|
@ -712,6 +720,7 @@ impl FromGlib<gst_sys::GstEventType> for EventType {
|
|||
61441 => EventType::Reconfigure,
|
||||
64001 => EventType::TocSelect,
|
||||
66561 => EventType::SelectStreams,
|
||||
66817 => EventType::InstantRateSyncTime,
|
||||
69121 => EventType::CustomUpstream,
|
||||
71686 => EventType::CustomDownstream,
|
||||
74242 => EventType::CustomDownstreamOob,
|
||||
|
|
|
@ -992,6 +992,8 @@ bitflags! {
|
|||
const SNAP_NEAREST = 96;
|
||||
const TRICKMODE_KEY_UNITS = 128;
|
||||
const TRICKMODE_NO_AUDIO = 256;
|
||||
const TRICKMODE_FORWARD_PREDICTED = 512;
|
||||
const INSTANT_RATE_CHANGE = 1024;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1045,6 +1047,7 @@ bitflags! {
|
|||
const SKIP = 16;
|
||||
const SEGMENT = 8;
|
||||
const TRICKMODE_KEY_UNITS = 128;
|
||||
const TRICKMODE_FORWARD_PREDICTED = 512;
|
||||
const TRICKMODE_NO_AUDIO = 256;
|
||||
}
|
||||
}
|
||||
|
@ -1093,6 +1096,7 @@ impl SetValue for SegmentFlags {
|
|||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
bitflags! {
|
||||
pub struct StackTraceFlags: u32 {
|
||||
const NONE = 0;
|
||||
const FULL = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -210,6 +210,15 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, glib::Error> {
|
|||
}
|
||||
}
|
||||
|
||||
//#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
//pub fn tracing_get_active_tracers() -> /*Ignored*/Vec<Tracer> {
|
||||
// unsafe { TODO: call gst_sys:gst_tracing_get_active_tracers() }
|
||||
//}
|
||||
|
||||
//pub fn tracing_register_hook<P: FnOnce() + Send + Sync + 'static>(tracer: /*Ignored*/&Tracer, detail: &str, func: P) {
|
||||
// unsafe { TODO: call gst_sys:gst_tracing_register_hook() }
|
||||
//}
|
||||
|
||||
pub fn update_registry() -> Result<(), glib::error::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
|
|
|
@ -103,6 +103,9 @@ pub trait PadExt: 'static {
|
|||
|
||||
fn get_peer(&self) -> Option<Pad>;
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_single_internal_link(&self) -> Option<Pad>;
|
||||
|
||||
fn get_sticky_event(&self, event_type: EventType, idx: u32) -> Option<Event>;
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
|
@ -325,6 +328,15 @@ impl<O: IsA<Pad>> PadExt for O {
|
|||
unsafe { from_glib_full(gst_sys::gst_pad_get_peer(self.as_ref().to_glib_none().0)) }
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
fn get_single_internal_link(&self) -> Option<Pad> {
|
||||
unsafe {
|
||||
from_glib_full(gst_sys::gst_pad_get_single_internal_link(
|
||||
self.as_ref().to_glib_none().0,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_sticky_event(&self, event_type: EventType, idx: u32) -> Option<Event> {
|
||||
unsafe {
|
||||
from_glib_full(gst_sys::gst_pad_get_sticky_event(
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ b3eb90b)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 5ccbec37)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 4c1faa0)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ 333658f7)
|
||||
|
|
|
@ -31,7 +31,6 @@ pub trait UnixBusExtManual: 'static {
|
|||
}
|
||||
|
||||
impl UnixBusExtManual for Bus {
|
||||
/// This is supported on **Unix** only.
|
||||
fn get_pollfd(&self) -> unix::io::RawFd {
|
||||
#[cfg(unix)]
|
||||
unsafe {
|
||||
|
|
|
@ -31,7 +31,6 @@ pub trait WindowsBusExtManual: 'static {
|
|||
}
|
||||
|
||||
impl WindowsBusExtManual for Bus {
|
||||
/// This is supported on **Windows** only.
|
||||
fn get_pollfd(&self) -> windows::io::RawHandle {
|
||||
#[cfg(windows)]
|
||||
unsafe {
|
||||
|
|
|
@ -13,7 +13,6 @@ use std::fmt;
|
|||
use DateTime;
|
||||
|
||||
impl DateTime {
|
||||
/// Get the [`DateTime`](struct.DateTime.html) in UTC
|
||||
pub fn to_utc(&self) -> Result<DateTime, glib::BoolError> {
|
||||
if !self.has_time() {
|
||||
// No time => no TZ offset
|
||||
|
@ -67,25 +66,25 @@ impl DateTime {
|
|||
}
|
||||
|
||||
impl cmp::PartialOrd for DateTime {
|
||||
/// *NOTE 1:* When comparing a partially defined [`DateTime`](struct.DateTime.html) `d1`
|
||||
/// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) with a time part `d2`
|
||||
/// such as *"2019/8/20 21:10"*:
|
||||
///
|
||||
/// - `d1` includes `d2`,
|
||||
/// - neither `d1` < `d2` nor `d1` > `d2`,
|
||||
/// - and `d1` != `d2`,
|
||||
///
|
||||
/// so we can only return `None`.
|
||||
///
|
||||
/// This is the reason why [`DateTime`](struct.DateTime.html) neither implements
|
||||
/// [`Ord`](https://doc.rust-lang.org/nightly/std/cmp/trait.Ord.html)
|
||||
/// nor [`Eq`](https://doc.rust-lang.org/nightly/std/cmp/trait.Eq.html).
|
||||
///
|
||||
/// *NOTE 2:* When comparing a [`DateTime`](struct.DateTime.html) `d1` without a TZ offset
|
||||
/// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) `d2` with a TZ offset
|
||||
/// such as *"2019/8/20 21:10 +02:00"*, we can't tell in which TZ `d1` is expressed and which
|
||||
/// time should be considered for an offset, therefore the two [`DateTime`s](struct.DateTime.html)
|
||||
/// are compared in the same TZ.
|
||||
// *NOTE 1:* When comparing a partially defined [`DateTime`](struct.DateTime.html) `d1`
|
||||
// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) with a time part `d2`
|
||||
// such as *"2019/8/20 21:10"*:
|
||||
//
|
||||
// - `d1` includes `d2`,
|
||||
// - neither `d1` < `d2` nor `d1` > `d2`,
|
||||
// - and `d1` != `d2`,
|
||||
//
|
||||
// so we can only return `None`.
|
||||
//
|
||||
// This is the reason why [`DateTime`](struct.DateTime.html) neither implements
|
||||
// [`Ord`](https://doc.rust-lang.org/nightly/std/cmp/trait.Ord.html)
|
||||
// nor [`Eq`](https://doc.rust-lang.org/nightly/std/cmp/trait.Eq.html).
|
||||
//
|
||||
// *NOTE 2:* When comparing a [`DateTime`](struct.DateTime.html) `d1` without a TZ offset
|
||||
// such as *"2019/8/20"* with a [`DateTime`](struct.DateTime.html) `d2` with a TZ offset
|
||||
// such as *"2019/8/20 21:10 +02:00"*, we can't tell in which TZ `d1` is expressed and which
|
||||
// time should be considered for an offset, therefore the two [`DateTime`s](struct.DateTime.html)
|
||||
// are compared in the same TZ.
|
||||
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
|
||||
#[inline]
|
||||
fn get_cmp(delta: i32) -> Option<cmp::Ordering> {
|
||||
|
@ -187,7 +186,6 @@ impl cmp::PartialOrd for DateTime {
|
|||
}
|
||||
|
||||
impl cmp::PartialEq for DateTime {
|
||||
/// See the notes for the [`DateTime` `PartialOrd` trait](struct.DateTime.html#impl-PartialOrd%3CDateTime%3E)
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.partial_cmp(other)
|
||||
.map_or_else(|| false, |cmp| cmp == cmp::Ordering::Equal)
|
||||
|
|
|
@ -28,9 +28,6 @@ use glib_sys::gpointer;
|
|||
use gobject_sys;
|
||||
use gst_sys;
|
||||
|
||||
/// An error returned from the [`get`](struct.StructureRef.html#method.get)
|
||||
/// or [`get_some`](struct.StructureRef.html#method.get_some) functions
|
||||
/// on a [`StructureRef`](struct.StructureRef.html)
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub enum GetError<'name> {
|
||||
FieldNotFound {
|
||||
|
|
Loading…
Reference in a new issue