mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-23 01:51:06 +00:00
gstreamer-app: Regenerate
This commit is contained in:
parent
88a7c18746
commit
e7843d68d0
4 changed files with 159 additions and 193 deletions
|
@ -2,26 +2,20 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib;
|
|
||||||
use glib::object::ObjectType as ObjectType_;
|
use glib::object::ObjectType as ObjectType_;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
|
||||||
use gobject_sys;
|
|
||||||
use gst;
|
|
||||||
use gst_app_sys;
|
|
||||||
use gst_base;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct AppSink(Object<gst_app_sys::GstAppSink, gst_app_sys::GstAppSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler;
|
pub struct AppSink(Object<ffi::GstAppSink, ffi::GstAppSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_app_sys::gst_app_sink_get_type(),
|
get_type => || ffi::gst_app_sink_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,59 +24,47 @@ impl AppSink {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||||
pub fn get_buffer_list_support(&self) -> bool {
|
pub fn get_buffer_list_support(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib(gst_app_sys::gst_app_sink_get_buffer_list_support(
|
from_glib(ffi::gst_app_sink_get_buffer_list_support(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_caps(&self) -> Option<gst::Caps> {
|
pub fn get_caps(&self) -> Option<gst::Caps> {
|
||||||
unsafe { from_glib_full(gst_app_sys::gst_app_sink_get_caps(self.to_glib_none().0)) }
|
unsafe { from_glib_full(ffi::gst_app_sink_get_caps(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_drop(&self) -> bool {
|
pub fn get_drop(&self) -> bool {
|
||||||
unsafe { from_glib(gst_app_sys::gst_app_sink_get_drop(self.to_glib_none().0)) }
|
unsafe { from_glib(ffi::gst_app_sink_get_drop(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_emit_signals(&self) -> bool {
|
pub fn get_emit_signals(&self) -> bool {
|
||||||
unsafe {
|
unsafe { from_glib(ffi::gst_app_sink_get_emit_signals(self.to_glib_none().0)) }
|
||||||
from_glib(gst_app_sys::gst_app_sink_get_emit_signals(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_max_buffers(&self) -> u32 {
|
pub fn get_max_buffers(&self) -> u32 {
|
||||||
unsafe { gst_app_sys::gst_app_sink_get_max_buffers(self.to_glib_none().0) }
|
unsafe { ffi::gst_app_sink_get_max_buffers(self.to_glib_none().0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_wait_on_eos(&self) -> bool {
|
pub fn get_wait_on_eos(&self) -> bool {
|
||||||
unsafe {
|
unsafe { from_glib(ffi::gst_app_sink_get_wait_on_eos(self.to_glib_none().0)) }
|
||||||
from_glib(gst_app_sys::gst_app_sink_get_wait_on_eos(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_eos(&self) -> bool {
|
pub fn is_eos(&self) -> bool {
|
||||||
unsafe { from_glib(gst_app_sys::gst_app_sink_is_eos(self.to_glib_none().0)) }
|
unsafe { from_glib(ffi::gst_app_sink_is_eos(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pull_preroll(&self) -> Result<gst::Sample, glib::BoolError> {
|
pub fn pull_preroll(&self) -> Result<gst::Sample, glib::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
Option::<_>::from_glib_full(gst_app_sys::gst_app_sink_pull_preroll(
|
Option::<_>::from_glib_full(ffi::gst_app_sink_pull_preroll(self.to_glib_none().0))
|
||||||
self.to_glib_none().0,
|
.ok_or_else(|| glib::glib_bool_error!("Failed to pull preroll sample"))
|
||||||
))
|
|
||||||
.ok_or_else(|| glib_bool_error!("Failed to pull preroll sample"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pull_sample(&self) -> Result<gst::Sample, glib::BoolError> {
|
pub fn pull_sample(&self) -> Result<gst::Sample, glib::BoolError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
Option::<_>::from_glib_full(gst_app_sys::gst_app_sink_pull_sample(
|
Option::<_>::from_glib_full(ffi::gst_app_sink_pull_sample(self.to_glib_none().0))
|
||||||
self.to_glib_none().0,
|
.ok_or_else(|| glib::glib_bool_error!("Failed to pull sample"))
|
||||||
))
|
|
||||||
.ok_or_else(|| glib_bool_error!("Failed to pull sample"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +72,7 @@ impl AppSink {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_12")))]
|
||||||
pub fn set_buffer_list_support(&self, enable_lists: bool) {
|
pub fn set_buffer_list_support(&self, enable_lists: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_buffer_list_support(
|
ffi::gst_app_sink_set_buffer_list_support(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
enable_lists.to_glib(),
|
enable_lists.to_glib(),
|
||||||
);
|
);
|
||||||
|
@ -98,36 +80,36 @@ impl AppSink {
|
||||||
}
|
}
|
||||||
|
|
||||||
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||||
// unsafe { TODO: call gst_app_sys:gst_app_sink_set_callbacks() }
|
// unsafe { TODO: call ffi:gst_app_sink_set_callbacks() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
ffi::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_drop(&self, drop: bool) {
|
pub fn set_drop(&self, drop: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib());
|
ffi::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_emit_signals(&self, emit: bool) {
|
pub fn set_emit_signals(&self, emit: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
ffi::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_max_buffers(&self, max: u32) {
|
pub fn set_max_buffers(&self, max: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_max_buffers(self.to_glib_none().0, max);
|
ffi::gst_app_sink_set_max_buffers(self.to_glib_none().0, max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_wait_on_eos(&self, wait: bool) {
|
pub fn set_wait_on_eos(&self, wait: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib());
|
ffi::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +117,7 @@ impl AppSink {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
||||||
pub fn try_pull_preroll(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
pub fn try_pull_preroll(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_app_sys::gst_app_sink_try_pull_preroll(
|
from_glib_full(ffi::gst_app_sink_try_pull_preroll(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
timeout.to_glib(),
|
timeout.to_glib(),
|
||||||
))
|
))
|
||||||
|
@ -146,7 +128,7 @@ impl AppSink {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
||||||
pub fn try_pull_sample(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
pub fn try_pull_sample(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_glib_full(gst_app_sys::gst_app_sink_try_pull_sample(
|
from_glib_full(ffi::gst_app_sink_try_pull_sample(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
timeout.to_glib(),
|
timeout.to_glib(),
|
||||||
))
|
))
|
||||||
|
@ -156,8 +138,8 @@ impl AppSink {
|
||||||
pub fn get_property_buffer_list(&self) -> bool {
|
pub fn get_property_buffer_list(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"buffer-list\0".as_ptr() as *const _,
|
b"buffer-list\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -170,8 +152,8 @@ impl AppSink {
|
||||||
|
|
||||||
pub fn set_property_buffer_list(&self, buffer_list: bool) {
|
pub fn set_property_buffer_list(&self, buffer_list: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"buffer-list\0".as_ptr() as *const _,
|
b"buffer-list\0".as_ptr() as *const _,
|
||||||
Value::from(&buffer_list).to_glib_none().0,
|
Value::from(&buffer_list).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -181,8 +163,8 @@ impl AppSink {
|
||||||
pub fn get_property_eos(&self) -> bool {
|
pub fn get_property_eos(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"eos\0".as_ptr() as *const _,
|
b"eos\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -195,8 +177,8 @@ impl AppSink {
|
||||||
|
|
||||||
pub fn connect_eos<F: Fn(&AppSink) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
pub fn connect_eos<F: Fn(&AppSink) + Send + 'static>(&self, f: F) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn eos_trampoline<F: Fn(&AppSink) + Send + 'static>(
|
unsafe extern "C" fn eos_trampoline<F: Fn(&AppSink) + Send + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -221,9 +203,9 @@ impl AppSink {
|
||||||
unsafe extern "C" fn notify_buffer_list_trampoline<
|
unsafe extern "C" fn notify_buffer_list_trampoline<
|
||||||
F: Fn(&AppSink) + Send + Sync + 'static,
|
F: Fn(&AppSink) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -246,9 +228,9 @@ impl AppSink {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -271,9 +253,9 @@ impl AppSink {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_drop_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_drop_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -298,9 +280,9 @@ impl AppSink {
|
||||||
unsafe extern "C" fn notify_emit_signals_trampoline<
|
unsafe extern "C" fn notify_emit_signals_trampoline<
|
||||||
F: Fn(&AppSink) + Send + Sync + 'static,
|
F: Fn(&AppSink) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -323,9 +305,9 @@ impl AppSink {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -350,9 +332,9 @@ impl AppSink {
|
||||||
unsafe extern "C" fn notify_max_buffers_trampoline<
|
unsafe extern "C" fn notify_max_buffers_trampoline<
|
||||||
F: Fn(&AppSink) + Send + Sync + 'static,
|
F: Fn(&AppSink) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -377,9 +359,9 @@ impl AppSink {
|
||||||
unsafe extern "C" fn notify_wait_on_eos_trampoline<
|
unsafe extern "C" fn notify_wait_on_eos_trampoline<
|
||||||
F: Fn(&AppSink) + Send + Sync + 'static,
|
F: Fn(&AppSink) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSink,
|
this: *mut ffi::GstAppSink,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
|
|
@ -2,76 +2,62 @@
|
||||||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
|
use crate::AppStreamType;
|
||||||
use glib::object::ObjectType as ObjectType_;
|
use glib::object::ObjectType as ObjectType_;
|
||||||
use glib::signal::connect_raw;
|
use glib::signal::connect_raw;
|
||||||
use glib::signal::SignalHandlerId;
|
use glib::signal::SignalHandlerId;
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Value;
|
use glib::Value;
|
||||||
use glib_sys;
|
|
||||||
use gobject_sys;
|
|
||||||
use gst;
|
|
||||||
use gst_app_sys;
|
|
||||||
use gst_base;
|
|
||||||
use libc;
|
|
||||||
use std::boxed::Box as Box_;
|
use std::boxed::Box as Box_;
|
||||||
use std::mem::transmute;
|
use std::mem::transmute;
|
||||||
use AppStreamType;
|
|
||||||
|
|
||||||
glib_wrapper! {
|
glib::glib_wrapper! {
|
||||||
pub struct AppSrc(Object<gst_app_sys::GstAppSrc, gst_app_sys::GstAppSrcClass>) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler;
|
pub struct AppSrc(Object<ffi::GstAppSrc, ffi::GstAppSrcClass>) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||||
|
|
||||||
match fn {
|
match fn {
|
||||||
get_type => || gst_app_sys::gst_app_src_get_type(),
|
get_type => || ffi::gst_app_src_get_type(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AppSrc {
|
impl AppSrc {
|
||||||
pub fn get_caps(&self) -> Option<gst::Caps> {
|
pub fn get_caps(&self) -> Option<gst::Caps> {
|
||||||
unsafe { from_glib_full(gst_app_sys::gst_app_src_get_caps(self.to_glib_none().0)) }
|
unsafe { from_glib_full(ffi::gst_app_src_get_caps(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_current_level_bytes(&self) -> u64 {
|
pub fn get_current_level_bytes(&self) -> u64 {
|
||||||
unsafe { gst_app_sys::gst_app_src_get_current_level_bytes(self.to_glib_none().0) }
|
unsafe { ffi::gst_app_src_get_current_level_bytes(self.to_glib_none().0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
||||||
pub fn get_duration(&self) -> gst::ClockTime {
|
pub fn get_duration(&self) -> gst::ClockTime {
|
||||||
unsafe { from_glib(gst_app_sys::gst_app_src_get_duration(self.to_glib_none().0)) }
|
unsafe { from_glib(ffi::gst_app_src_get_duration(self.to_glib_none().0)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_emit_signals(&self) -> bool {
|
pub fn get_emit_signals(&self) -> bool {
|
||||||
unsafe {
|
unsafe { from_glib(ffi::gst_app_src_get_emit_signals(self.to_glib_none().0)) }
|
||||||
from_glib(gst_app_sys::gst_app_src_get_emit_signals(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_max_bytes(&self) -> u64 {
|
pub fn get_max_bytes(&self) -> u64 {
|
||||||
unsafe { gst_app_sys::gst_app_src_get_max_bytes(self.to_glib_none().0) }
|
unsafe { ffi::gst_app_src_get_max_bytes(self.to_glib_none().0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_size(&self) -> i64 {
|
pub fn get_size(&self) -> i64 {
|
||||||
unsafe { gst_app_sys::gst_app_src_get_size(self.to_glib_none().0) }
|
unsafe { ffi::gst_app_src_get_size(self.to_glib_none().0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_stream_type(&self) -> AppStreamType {
|
pub fn get_stream_type(&self) -> AppStreamType {
|
||||||
unsafe {
|
unsafe { from_glib(ffi::gst_app_src_get_stream_type(self.to_glib_none().0)) }
|
||||||
from_glib(gst_app_sys::gst_app_src_get_stream_type(
|
|
||||||
self.to_glib_none().0,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSrcCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSrcCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||||
// unsafe { TODO: call gst_app_sys:gst_app_src_set_callbacks() }
|
// unsafe { TODO: call ffi:gst_app_src_set_callbacks() }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
ffi::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,39 +65,39 @@ impl AppSrc {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_10")))]
|
||||||
pub fn set_duration(&self, duration: gst::ClockTime) {
|
pub fn set_duration(&self, duration: gst::ClockTime) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib());
|
ffi::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_emit_signals(&self, emit: bool) {
|
pub fn set_emit_signals(&self, emit: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
ffi::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_max_bytes(&self, max: u64) {
|
pub fn set_max_bytes(&self, max: u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_max_bytes(self.to_glib_none().0, max);
|
ffi::gst_app_src_set_max_bytes(self.to_glib_none().0, max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_size(&self, size: i64) {
|
pub fn set_size(&self, size: i64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_size(self.to_glib_none().0, size);
|
ffi::gst_app_src_set_size(self.to_glib_none().0, size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_stream_type(&self, type_: AppStreamType) {
|
pub fn set_stream_type(&self, type_: AppStreamType) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gst_app_sys::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib());
|
ffi::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_property_block(&self) -> bool {
|
pub fn get_property_block(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"block\0".as_ptr() as *const _,
|
b"block\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -124,8 +110,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_block(&self, block: bool) {
|
pub fn set_property_block(&self, block: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"block\0".as_ptr() as *const _,
|
b"block\0".as_ptr() as *const _,
|
||||||
Value::from(&block).to_glib_none().0,
|
Value::from(&block).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -135,8 +121,8 @@ impl AppSrc {
|
||||||
pub fn get_property_format(&self) -> gst::Format {
|
pub fn get_property_format(&self) -> gst::Format {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<gst::Format as StaticType>::static_type());
|
let mut value = Value::from_type(<gst::Format as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"format\0".as_ptr() as *const _,
|
b"format\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -149,8 +135,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_format(&self, format: gst::Format) {
|
pub fn set_property_format(&self, format: gst::Format) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"format\0".as_ptr() as *const _,
|
b"format\0".as_ptr() as *const _,
|
||||||
Value::from(&format).to_glib_none().0,
|
Value::from(&format).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -162,8 +148,8 @@ impl AppSrc {
|
||||||
pub fn get_property_handle_segment_change(&self) -> bool {
|
pub fn get_property_handle_segment_change(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"handle-segment-change\0".as_ptr() as *const _,
|
b"handle-segment-change\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -178,8 +164,8 @@ impl AppSrc {
|
||||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))]
|
||||||
pub fn set_property_handle_segment_change(&self, handle_segment_change: bool) {
|
pub fn set_property_handle_segment_change(&self, handle_segment_change: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"handle-segment-change\0".as_ptr() as *const _,
|
b"handle-segment-change\0".as_ptr() as *const _,
|
||||||
Value::from(&handle_segment_change).to_glib_none().0,
|
Value::from(&handle_segment_change).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -189,8 +175,8 @@ impl AppSrc {
|
||||||
pub fn get_property_is_live(&self) -> bool {
|
pub fn get_property_is_live(&self) -> bool {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"is-live\0".as_ptr() as *const _,
|
b"is-live\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -203,8 +189,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_is_live(&self, is_live: bool) {
|
pub fn set_property_is_live(&self, is_live: bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"is-live\0".as_ptr() as *const _,
|
b"is-live\0".as_ptr() as *const _,
|
||||||
Value::from(&is_live).to_glib_none().0,
|
Value::from(&is_live).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -214,8 +200,8 @@ impl AppSrc {
|
||||||
pub fn get_property_max_latency(&self) -> i64 {
|
pub fn get_property_max_latency(&self) -> i64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"max-latency\0".as_ptr() as *const _,
|
b"max-latency\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -228,8 +214,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_max_latency(&self, max_latency: i64) {
|
pub fn set_property_max_latency(&self, max_latency: i64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"max-latency\0".as_ptr() as *const _,
|
b"max-latency\0".as_ptr() as *const _,
|
||||||
Value::from(&max_latency).to_glib_none().0,
|
Value::from(&max_latency).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -239,8 +225,8 @@ impl AppSrc {
|
||||||
pub fn get_property_min_latency(&self) -> i64 {
|
pub fn get_property_min_latency(&self) -> i64 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"min-latency\0".as_ptr() as *const _,
|
b"min-latency\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -253,8 +239,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_min_latency(&self, min_latency: i64) {
|
pub fn set_property_min_latency(&self, min_latency: i64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"min-latency\0".as_ptr() as *const _,
|
b"min-latency\0".as_ptr() as *const _,
|
||||||
Value::from(&min_latency).to_glib_none().0,
|
Value::from(&min_latency).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -264,8 +250,8 @@ impl AppSrc {
|
||||||
pub fn get_property_min_percent(&self) -> u32 {
|
pub fn get_property_min_percent(&self) -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||||
gobject_sys::g_object_get_property(
|
glib::gobject_ffi::g_object_get_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"min-percent\0".as_ptr() as *const _,
|
b"min-percent\0".as_ptr() as *const _,
|
||||||
value.to_glib_none_mut().0,
|
value.to_glib_none_mut().0,
|
||||||
);
|
);
|
||||||
|
@ -278,8 +264,8 @@ impl AppSrc {
|
||||||
|
|
||||||
pub fn set_property_min_percent(&self, min_percent: u32) {
|
pub fn set_property_min_percent(&self, min_percent: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
gobject_sys::g_object_set_property(
|
glib::gobject_ffi::g_object_set_property(
|
||||||
self.as_ptr() as *mut gobject_sys::GObject,
|
self.as_ptr() as *mut glib::gobject_ffi::GObject,
|
||||||
b"min-percent\0".as_ptr() as *const _,
|
b"min-percent\0".as_ptr() as *const _,
|
||||||
Value::from(&min_percent).to_glib_none().0,
|
Value::from(&min_percent).to_glib_none().0,
|
||||||
);
|
);
|
||||||
|
@ -291,8 +277,8 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn enough_data_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn enough_data_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -315,9 +301,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn need_data_trampoline<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(
|
unsafe extern "C" fn need_data_trampoline<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
object: libc::c_uint,
|
object: libc::c_uint,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this), object)
|
f(&from_glib_borrow(this), object)
|
||||||
|
@ -342,10 +328,10 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn seek_data_trampoline<
|
unsafe extern "C" fn seek_data_trampoline<
|
||||||
F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static,
|
F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
object: u64,
|
object: u64,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) -> glib_sys::gboolean {
|
) -> glib::ffi::gboolean {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this), object).to_glib()
|
f(&from_glib_borrow(this), object).to_glib()
|
||||||
}
|
}
|
||||||
|
@ -367,9 +353,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_block_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_block_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -392,9 +378,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -419,9 +405,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_current_level_bytes_trampoline<
|
unsafe extern "C" fn notify_current_level_bytes_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -446,9 +432,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -473,9 +459,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_emit_signals_trampoline<
|
unsafe extern "C" fn notify_emit_signals_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -498,9 +484,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_format_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_format_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -527,9 +513,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_handle_segment_change_trampoline<
|
unsafe extern "C" fn notify_handle_segment_change_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -552,9 +538,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_is_live_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_is_live_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -577,9 +563,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_max_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_max_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -604,9 +590,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_max_latency_trampoline<
|
unsafe extern "C" fn notify_max_latency_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -631,9 +617,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_min_latency_trampoline<
|
unsafe extern "C" fn notify_min_latency_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -658,9 +644,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_min_percent_trampoline<
|
unsafe extern "C" fn notify_min_percent_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -683,9 +669,9 @@ impl AppSrc {
|
||||||
f: F,
|
f: F,
|
||||||
) -> SignalHandlerId {
|
) -> SignalHandlerId {
|
||||||
unsafe extern "C" fn notify_size_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
unsafe extern "C" fn notify_size_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
@ -710,9 +696,9 @@ impl AppSrc {
|
||||||
unsafe extern "C" fn notify_stream_type_trampoline<
|
unsafe extern "C" fn notify_stream_type_trampoline<
|
||||||
F: Fn(&AppSrc) + Send + Sync + 'static,
|
F: Fn(&AppSrc) + Send + Sync + 'static,
|
||||||
>(
|
>(
|
||||||
this: *mut gst_app_sys::GstAppSrc,
|
this: *mut ffi::GstAppSrc,
|
||||||
_param_spec: glib_sys::gpointer,
|
_param_spec: glib::ffi::gpointer,
|
||||||
f: glib_sys::gpointer,
|
f: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let f: &F = &*(f as *const F);
|
let f: &F = &*(f as *const F);
|
||||||
f(&from_glib_borrow(this))
|
f(&from_glib_borrow(this))
|
||||||
|
|
|
@ -9,8 +9,6 @@ use glib::value::SetValue;
|
||||||
use glib::value::Value;
|
use glib::value::Value;
|
||||||
use glib::StaticType;
|
use glib::StaticType;
|
||||||
use glib::Type;
|
use glib::Type;
|
||||||
use gobject_sys;
|
|
||||||
use gst_app_sys;
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
@ -24,21 +22,21 @@ pub enum AppStreamType {
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl ToGlib for AppStreamType {
|
impl ToGlib for AppStreamType {
|
||||||
type GlibType = gst_app_sys::GstAppStreamType;
|
type GlibType = ffi::GstAppStreamType;
|
||||||
|
|
||||||
fn to_glib(&self) -> gst_app_sys::GstAppStreamType {
|
fn to_glib(&self) -> ffi::GstAppStreamType {
|
||||||
match *self {
|
match *self {
|
||||||
AppStreamType::Stream => gst_app_sys::GST_APP_STREAM_TYPE_STREAM,
|
AppStreamType::Stream => ffi::GST_APP_STREAM_TYPE_STREAM,
|
||||||
AppStreamType::Seekable => gst_app_sys::GST_APP_STREAM_TYPE_SEEKABLE,
|
AppStreamType::Seekable => ffi::GST_APP_STREAM_TYPE_SEEKABLE,
|
||||||
AppStreamType::RandomAccess => gst_app_sys::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
|
AppStreamType::RandomAccess => ffi::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
|
||||||
AppStreamType::__Unknown(value) => value,
|
AppStreamType::__Unknown(value) => value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
impl FromGlib<gst_app_sys::GstAppStreamType> for AppStreamType {
|
impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
|
||||||
fn from_glib(value: gst_app_sys::GstAppStreamType) -> Self {
|
fn from_glib(value: ffi::GstAppStreamType) -> Self {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
match value {
|
match value {
|
||||||
0 => AppStreamType::Stream,
|
0 => AppStreamType::Stream,
|
||||||
|
@ -51,7 +49,7 @@ impl FromGlib<gst_app_sys::GstAppStreamType> for AppStreamType {
|
||||||
|
|
||||||
impl StaticType for AppStreamType {
|
impl StaticType for AppStreamType {
|
||||||
fn static_type() -> Type {
|
fn static_type() -> Type {
|
||||||
unsafe { from_glib(gst_app_sys::gst_app_stream_type_get_type()) }
|
unsafe { from_glib(ffi::gst_app_stream_type_get_type()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,12 +61,12 @@ impl<'a> FromValueOptional<'a> for AppStreamType {
|
||||||
|
|
||||||
impl<'a> FromValue<'a> for AppStreamType {
|
impl<'a> FromValue<'a> for AppStreamType {
|
||||||
unsafe fn from_value(value: &Value) -> Self {
|
unsafe fn from_value(value: &Value) -> Self {
|
||||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SetValue for AppStreamType {
|
impl SetValue for AppStreamType {
|
||||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 062b3d6)
|
Generated by gir (https://github.com/gtk-rs/gir @ 694b4b8)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ b84cead5)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 58bda97d)
|
||||||
|
|
Loading…
Reference in a new issue