forked from mirrors/gstreamer-rs
Regenerate everything with latest gir
This commit is contained in:
parent
2a6343a671
commit
24305a19e8
161 changed files with 4265 additions and 4363 deletions
|
@ -2,25 +2,25 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_app_sys;
|
||||
use gst_base;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct AppSink(Object<ffi::GstAppSink, ffi::GstAppSinkClass, AppSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||
pub struct AppSink(Object<gst_app_sys::GstAppSink, gst_app_sys::GstAppSinkClass, AppSinkClass>) @extends gst_base::BaseSink, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_app_sink_get_type(),
|
||||
get_type => || gst_app_sys::gst_app_sink_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,132 +28,131 @@ impl AppSink {
|
|||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
pub fn get_buffer_list_support(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_app_sink_get_buffer_list_support(self.to_glib_none().0))
|
||||
from_glib(gst_app_sys::gst_app_sink_get_buffer_list_support(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_sink_get_caps(self.to_glib_none().0))
|
||||
from_glib_full(gst_app_sys::gst_app_sink_get_caps(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_drop(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_app_sink_get_drop(self.to_glib_none().0))
|
||||
from_glib(gst_app_sys::gst_app_sink_get_drop(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_emit_signals(&self) -> bool {
|
||||
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 {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_get_max_buffers(self.to_glib_none().0)
|
||||
gst_app_sys::gst_app_sink_get_max_buffers(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_wait_on_eos(&self) -> bool {
|
||||
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 {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_app_sink_is_eos(self.to_glib_none().0))
|
||||
from_glib(gst_app_sys::gst_app_sink_is_eos(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pull_preroll(&self) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_sink_pull_preroll(self.to_glib_none().0))
|
||||
from_glib_full(gst_app_sys::gst_app_sink_pull_preroll(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pull_sample(&self) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_sink_pull_sample(self.to_glib_none().0))
|
||||
from_glib_full(gst_app_sys::gst_app_sink_pull_sample(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
pub fn set_buffer_list_support(&self, enable_lists: bool) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_buffer_list_support(self.to_glib_none().0, enable_lists.to_glib());
|
||||
gst_app_sys::gst_app_sink_set_buffer_list_support(self.to_glib_none().0, enable_lists.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn set_callbacks(&self, callbacks: /*Ignored*/&mut AppSinkCallbacks, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||
// unsafe { TODO: call ffi::gst_app_sink_set_callbacks() }
|
||||
// unsafe { TODO: call gst_app_sys:gst_app_sink_set_callbacks() }
|
||||
//}
|
||||
|
||||
pub fn set_caps<'a, P: Into<Option<&'a gst::Caps>>>(&self, caps: P) {
|
||||
let caps = caps.into();
|
||||
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||
gst_app_sys::gst_app_sink_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_drop(&self, drop: bool) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib());
|
||||
gst_app_sys::gst_app_sink_set_drop(self.to_glib_none().0, drop.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_emit_signals(&self, emit: bool) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||
gst_app_sys::gst_app_sink_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_max_buffers(&self, max: u32) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_max_buffers(self.to_glib_none().0, max);
|
||||
gst_app_sys::gst_app_sink_set_max_buffers(self.to_glib_none().0, max);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_wait_on_eos(&self, wait: bool) {
|
||||
unsafe {
|
||||
ffi::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib());
|
||||
gst_app_sys::gst_app_sink_set_wait_on_eos(self.to_glib_none().0, wait.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn try_pull_preroll(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_sink_try_pull_preroll(self.to_glib_none().0, timeout.to_glib()))
|
||||
from_glib_full(gst_app_sys::gst_app_sink_try_pull_preroll(self.to_glib_none().0, timeout.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn try_pull_sample(&self, timeout: gst::ClockTime) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_sink_try_pull_sample(self.to_glib_none().0, timeout.to_glib()))
|
||||
from_glib_full(gst_app_sys::gst_app_sink_try_pull_sample(self.to_glib_none().0, timeout.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_buffer_list(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"buffer-list\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_buffer_list(&self, buffer_list: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"buffer-list\0".as_ptr() as *const _, Value::from(&buffer_list).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_eos(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"eos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -226,42 +225,42 @@ impl AppSink {
|
|||
unsafe impl Send for AppSink {}
|
||||
unsafe impl Sync for AppSink {}
|
||||
|
||||
unsafe extern "C" fn eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_buffer_list_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_buffer_list_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_drop_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_drop_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_emit_signals_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_emit_signals_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_buffers_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_max_buffers_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_wait_on_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut ffi::GstAppSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_wait_on_eos_trampoline<F: Fn(&AppSink) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -3,210 +3,209 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use AppStreamType;
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
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::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct AppSrc(Object<ffi::GstAppSrc, ffi::GstAppSrcClass, AppSrcClass>) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||
pub struct AppSrc(Object<gst_app_sys::GstAppSrc, gst_app_sys::GstAppSrcClass, AppSrcClass>) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_app_src_get_type(),
|
||||
get_type => || gst_app_sys::gst_app_src_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl AppSrc {
|
||||
pub fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_app_src_get_caps(self.to_glib_none().0))
|
||||
from_glib_full(gst_app_sys::gst_app_src_get_caps(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current_level_bytes(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_app_src_get_current_level_bytes(self.to_glib_none().0)
|
||||
gst_app_sys::gst_app_src_get_current_level_bytes(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_app_src_get_duration(self.to_glib_none().0))
|
||||
from_glib(gst_app_sys::gst_app_src_get_duration(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_emit_signals(&self) -> bool {
|
||||
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 {
|
||||
unsafe {
|
||||
ffi::gst_app_src_get_max_bytes(self.to_glib_none().0)
|
||||
gst_app_sys::gst_app_src_get_max_bytes(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_size(&self) -> i64 {
|
||||
unsafe {
|
||||
ffi::gst_app_src_get_size(self.to_glib_none().0)
|
||||
gst_app_sys::gst_app_src_get_size(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_stream_type(&self) -> AppStreamType {
|
||||
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>) {
|
||||
// unsafe { TODO: call ffi::gst_app_src_set_callbacks() }
|
||||
// unsafe { TODO: call gst_app_sys:gst_app_src_set_callbacks() }
|
||||
//}
|
||||
|
||||
pub fn set_caps<'a, P: Into<Option<&'a gst::Caps>>>(&self, caps: P) {
|
||||
let caps = caps.into();
|
||||
pub fn set_caps(&self, caps: Option<&gst::Caps>) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||
gst_app_sys::gst_app_src_set_caps(self.to_glib_none().0, caps.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn set_duration(&self, duration: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib());
|
||||
gst_app_sys::gst_app_src_set_duration(self.to_glib_none().0, duration.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_emit_signals(&self, emit: bool) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||
gst_app_sys::gst_app_src_set_emit_signals(self.to_glib_none().0, emit.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_max_bytes(&self, max: u64) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_max_bytes(self.to_glib_none().0, max);
|
||||
gst_app_sys::gst_app_src_set_max_bytes(self.to_glib_none().0, max);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_size(&self, size: i64) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_size(self.to_glib_none().0, size);
|
||||
gst_app_sys::gst_app_src_set_size(self.to_glib_none().0, size);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_stream_type(&self, type_: AppStreamType) {
|
||||
unsafe {
|
||||
ffi::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib());
|
||||
gst_app_sys::gst_app_src_set_stream_type(self.to_glib_none().0, type_.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_block(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"block\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_block(&self, block: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"block\0".as_ptr() as *const _, Value::from(&block).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_format(&self) -> gst::Format {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Format as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"format\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_format(&self, format: gst::Format) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"format\0".as_ptr() as *const _, Value::from(&format).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_is_live(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"is-live\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_is_live(&self, is_live: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"is-live\0".as_ptr() as *const _, Value::from(&is_live).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_max_latency(&self) -> i64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"max-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_max_latency(&self, max_latency: i64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"max-latency\0".as_ptr() as *const _, Value::from(&max_latency).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_min_latency(&self) -> i64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-latency\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_min_latency(&self, min_latency: i64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-latency\0".as_ptr() as *const _, Value::from(&min_latency).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_min_percent(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-percent\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_min_percent(&self, min_percent: u32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"min-percent\0".as_ptr() as *const _, Value::from(&min_percent).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,82 +341,82 @@ impl AppSrc {
|
|||
unsafe impl Send for AppSrc {}
|
||||
unsafe impl Sync for AppSrc {}
|
||||
|
||||
unsafe extern "C" fn enough_data_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn enough_data_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn need_data_trampoline<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, length: libc::c_uint, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn need_data_trampoline<F: Fn(&AppSrc, u32) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, length: libc::c_uint, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), length)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn seek_data_trampoline<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, offset: u64, f: glib_ffi::gpointer) -> glib_ffi::gboolean {
|
||||
unsafe extern "C" fn seek_data_trampoline<F: Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, offset: u64, f: glib_sys::gpointer) -> glib_sys::gboolean {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), offset).to_glib()
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_block_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_block_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_caps_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_current_level_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_current_level_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_emit_signals_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_emit_signals_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_format_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_format_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_is_live_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_is_live_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_max_bytes_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_latency_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_max_latency_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_min_latency_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_min_latency_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_min_percent_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_min_percent_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_size_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_size_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stream_type_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut ffi::GstAppSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_stream_type_trampoline<F: Fn(&AppSrc) + Send + Sync + 'static>(this: *mut gst_app_sys::GstAppSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_app_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -24,21 +24,21 @@ pub enum AppStreamType {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AppStreamType {
|
||||
type GlibType = ffi::GstAppStreamType;
|
||||
type GlibType = gst_app_sys::GstAppStreamType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAppStreamType {
|
||||
fn to_glib(&self) -> gst_app_sys::GstAppStreamType {
|
||||
match *self {
|
||||
AppStreamType::Stream => ffi::GST_APP_STREAM_TYPE_STREAM,
|
||||
AppStreamType::Seekable => ffi::GST_APP_STREAM_TYPE_SEEKABLE,
|
||||
AppStreamType::RandomAccess => ffi::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
|
||||
AppStreamType::Stream => gst_app_sys::GST_APP_STREAM_TYPE_STREAM,
|
||||
AppStreamType::Seekable => gst_app_sys::GST_APP_STREAM_TYPE_SEEKABLE,
|
||||
AppStreamType::RandomAccess => gst_app_sys::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
|
||||
AppStreamType::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
|
||||
fn from_glib(value: ffi::GstAppStreamType) -> Self {
|
||||
impl FromGlib<gst_app_sys::GstAppStreamType> for AppStreamType {
|
||||
fn from_glib(value: gst_app_sys::GstAppStreamType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => AppStreamType::Stream,
|
||||
|
@ -51,7 +51,7 @@ impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
|
|||
|
||||
impl StaticType for AppStreamType {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_app_stream_type_get_type()) }
|
||||
unsafe { from_glib(gst_app_sys::gst_app_stream_type_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for AppStreamType {
|
|||
|
||||
impl<'a> FromValue<'a> for AppStreamType {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AppStreamType {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::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 @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,20 +2,20 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
use glib::translate::*;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
use gst;
|
||||
use gst_audio_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct AudioStreamAlign(Boxed<ffi::GstAudioStreamAlign>);
|
||||
pub struct AudioStreamAlign(Boxed<gst_audio_sys::GstAudioStreamAlign>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| ffi::gst_audio_stream_align_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_audio_stream_align_free(ptr),
|
||||
get_type => || ffi::gst_audio_stream_align_get_type(),
|
||||
copy => |ptr| gst_audio_sys::gst_audio_stream_align_copy(mut_override(ptr)),
|
||||
free => |ptr| gst_audio_sys::gst_audio_stream_align_free(ptr),
|
||||
get_type => || gst_audio_sys::gst_audio_stream_align_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,70 +24,70 @@ impl AudioStreamAlign {
|
|||
pub fn new(rate: i32, alignment_threshold: gst::ClockTime, discont_wait: gst::ClockTime) -> AudioStreamAlign {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib()))
|
||||
from_glib_full(gst_audio_sys::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_alignment_threshold(&mut self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0))
|
||||
from_glib(gst_audio_sys::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_discont_wait(&mut self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0))
|
||||
from_glib(gst_audio_sys::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_rate(&mut self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0)
|
||||
gst_audio_sys::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_samples_since_discont(&mut self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0)
|
||||
gst_audio_sys::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_timestamp_at_discont(&mut self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0))
|
||||
from_glib(gst_audio_sys::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn mark_discont(&mut self) {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0);
|
||||
gst_audio_sys::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn set_alignment_threshold(&mut self, alignment_threshold: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib());
|
||||
gst_audio_sys::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn set_discont_wait(&mut self, discont_wait: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib());
|
||||
gst_audio_sys::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn set_rate(&mut self, rate: i32) {
|
||||
unsafe {
|
||||
ffi::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate);
|
||||
gst_audio_sys::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_audio_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -52,49 +52,49 @@ pub enum AudioChannelPosition {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioChannelPosition {
|
||||
type GlibType = ffi::GstAudioChannelPosition;
|
||||
type GlibType = gst_audio_sys::GstAudioChannelPosition;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioChannelPosition {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioChannelPosition {
|
||||
match *self {
|
||||
AudioChannelPosition::None => ffi::GST_AUDIO_CHANNEL_POSITION_NONE,
|
||||
AudioChannelPosition::Mono => ffi::GST_AUDIO_CHANNEL_POSITION_MONO,
|
||||
AudioChannelPosition::Invalid => ffi::GST_AUDIO_CHANNEL_POSITION_INVALID,
|
||||
AudioChannelPosition::FrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||
AudioChannelPosition::FrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||
AudioChannelPosition::FrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||
AudioChannelPosition::Lfe1 => ffi::GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||
AudioChannelPosition::RearLeft => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||
AudioChannelPosition::RearRight => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
||||
AudioChannelPosition::FrontLeftOfCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER,
|
||||
AudioChannelPosition::FrontRightOfCenter => ffi::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER,
|
||||
AudioChannelPosition::RearCenter => ffi::GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
||||
AudioChannelPosition::Lfe2 => ffi::GST_AUDIO_CHANNEL_POSITION_LFE2,
|
||||
AudioChannelPosition::SideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||
AudioChannelPosition::SideRight => ffi::GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||
AudioChannelPosition::TopFrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT,
|
||||
AudioChannelPosition::TopFrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT,
|
||||
AudioChannelPosition::TopFrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER,
|
||||
AudioChannelPosition::TopCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_CENTER,
|
||||
AudioChannelPosition::TopRearLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT,
|
||||
AudioChannelPosition::TopRearRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT,
|
||||
AudioChannelPosition::TopSideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT,
|
||||
AudioChannelPosition::TopSideRight => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT,
|
||||
AudioChannelPosition::TopRearCenter => ffi::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER,
|
||||
AudioChannelPosition::BottomFrontCenter => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER,
|
||||
AudioChannelPosition::BottomFrontLeft => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT,
|
||||
AudioChannelPosition::BottomFrontRight => ffi::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT,
|
||||
AudioChannelPosition::WideLeft => ffi::GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT,
|
||||
AudioChannelPosition::WideRight => ffi::GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT,
|
||||
AudioChannelPosition::SurroundLeft => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT,
|
||||
AudioChannelPosition::SurroundRight => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT,
|
||||
AudioChannelPosition::None => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_NONE,
|
||||
AudioChannelPosition::Mono => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_MONO,
|
||||
AudioChannelPosition::Invalid => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID,
|
||||
AudioChannelPosition::FrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||
AudioChannelPosition::FrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||
AudioChannelPosition::FrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||
AudioChannelPosition::Lfe1 => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_LFE1,
|
||||
AudioChannelPosition::RearLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,
|
||||
AudioChannelPosition::RearRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
|
||||
AudioChannelPosition::FrontLeftOfCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER,
|
||||
AudioChannelPosition::FrontRightOfCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER,
|
||||
AudioChannelPosition::RearCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_REAR_CENTER,
|
||||
AudioChannelPosition::Lfe2 => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_LFE2,
|
||||
AudioChannelPosition::SideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT,
|
||||
AudioChannelPosition::SideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT,
|
||||
AudioChannelPosition::TopFrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT,
|
||||
AudioChannelPosition::TopFrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT,
|
||||
AudioChannelPosition::TopFrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER,
|
||||
AudioChannelPosition::TopCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_CENTER,
|
||||
AudioChannelPosition::TopRearLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT,
|
||||
AudioChannelPosition::TopRearRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT,
|
||||
AudioChannelPosition::TopSideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT,
|
||||
AudioChannelPosition::TopSideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT,
|
||||
AudioChannelPosition::TopRearCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER,
|
||||
AudioChannelPosition::BottomFrontCenter => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER,
|
||||
AudioChannelPosition::BottomFrontLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT,
|
||||
AudioChannelPosition::BottomFrontRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT,
|
||||
AudioChannelPosition::WideLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT,
|
||||
AudioChannelPosition::WideRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT,
|
||||
AudioChannelPosition::SurroundLeft => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT,
|
||||
AudioChannelPosition::SurroundRight => gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT,
|
||||
AudioChannelPosition::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioChannelPosition> for AudioChannelPosition {
|
||||
fn from_glib(value: ffi::GstAudioChannelPosition) -> Self {
|
||||
impl FromGlib<gst_audio_sys::GstAudioChannelPosition> for AudioChannelPosition {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioChannelPosition) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
-3 => AudioChannelPosition::None,
|
||||
|
@ -135,7 +135,7 @@ impl FromGlib<ffi::GstAudioChannelPosition> for AudioChannelPosition {
|
|||
|
||||
impl StaticType for AudioChannelPosition {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_channel_position_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_channel_position_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,13 +147,13 @@ impl<'a> FromValueOptional<'a> for AudioChannelPosition {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioChannelPosition {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioChannelPosition {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,50 +198,50 @@ pub enum AudioFormat {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioFormat {
|
||||
type GlibType = ffi::GstAudioFormat;
|
||||
type GlibType = gst_audio_sys::GstAudioFormat;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioFormat {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioFormat {
|
||||
match *self {
|
||||
AudioFormat::Unknown => ffi::GST_AUDIO_FORMAT_UNKNOWN,
|
||||
AudioFormat::Encoded => ffi::GST_AUDIO_FORMAT_ENCODED,
|
||||
AudioFormat::S8 => ffi::GST_AUDIO_FORMAT_S8,
|
||||
AudioFormat::U8 => ffi::GST_AUDIO_FORMAT_U8,
|
||||
AudioFormat::S16le => ffi::GST_AUDIO_FORMAT_S16LE,
|
||||
AudioFormat::S16be => ffi::GST_AUDIO_FORMAT_S16BE,
|
||||
AudioFormat::U16le => ffi::GST_AUDIO_FORMAT_U16LE,
|
||||
AudioFormat::U16be => ffi::GST_AUDIO_FORMAT_U16BE,
|
||||
AudioFormat::S2432le => ffi::GST_AUDIO_FORMAT_S24_32LE,
|
||||
AudioFormat::S2432be => ffi::GST_AUDIO_FORMAT_S24_32BE,
|
||||
AudioFormat::U2432le => ffi::GST_AUDIO_FORMAT_U24_32LE,
|
||||
AudioFormat::U2432be => ffi::GST_AUDIO_FORMAT_U24_32BE,
|
||||
AudioFormat::S32le => ffi::GST_AUDIO_FORMAT_S32LE,
|
||||
AudioFormat::S32be => ffi::GST_AUDIO_FORMAT_S32BE,
|
||||
AudioFormat::U32le => ffi::GST_AUDIO_FORMAT_U32LE,
|
||||
AudioFormat::U32be => ffi::GST_AUDIO_FORMAT_U32BE,
|
||||
AudioFormat::S24le => ffi::GST_AUDIO_FORMAT_S24LE,
|
||||
AudioFormat::S24be => ffi::GST_AUDIO_FORMAT_S24BE,
|
||||
AudioFormat::U24le => ffi::GST_AUDIO_FORMAT_U24LE,
|
||||
AudioFormat::U24be => ffi::GST_AUDIO_FORMAT_U24BE,
|
||||
AudioFormat::S20le => ffi::GST_AUDIO_FORMAT_S20LE,
|
||||
AudioFormat::S20be => ffi::GST_AUDIO_FORMAT_S20BE,
|
||||
AudioFormat::U20le => ffi::GST_AUDIO_FORMAT_U20LE,
|
||||
AudioFormat::U20be => ffi::GST_AUDIO_FORMAT_U20BE,
|
||||
AudioFormat::S18le => ffi::GST_AUDIO_FORMAT_S18LE,
|
||||
AudioFormat::S18be => ffi::GST_AUDIO_FORMAT_S18BE,
|
||||
AudioFormat::U18le => ffi::GST_AUDIO_FORMAT_U18LE,
|
||||
AudioFormat::U18be => ffi::GST_AUDIO_FORMAT_U18BE,
|
||||
AudioFormat::F32le => ffi::GST_AUDIO_FORMAT_F32LE,
|
||||
AudioFormat::F32be => ffi::GST_AUDIO_FORMAT_F32BE,
|
||||
AudioFormat::F64le => ffi::GST_AUDIO_FORMAT_F64LE,
|
||||
AudioFormat::F64be => ffi::GST_AUDIO_FORMAT_F64BE,
|
||||
AudioFormat::Unknown => gst_audio_sys::GST_AUDIO_FORMAT_UNKNOWN,
|
||||
AudioFormat::Encoded => gst_audio_sys::GST_AUDIO_FORMAT_ENCODED,
|
||||
AudioFormat::S8 => gst_audio_sys::GST_AUDIO_FORMAT_S8,
|
||||
AudioFormat::U8 => gst_audio_sys::GST_AUDIO_FORMAT_U8,
|
||||
AudioFormat::S16le => gst_audio_sys::GST_AUDIO_FORMAT_S16LE,
|
||||
AudioFormat::S16be => gst_audio_sys::GST_AUDIO_FORMAT_S16BE,
|
||||
AudioFormat::U16le => gst_audio_sys::GST_AUDIO_FORMAT_U16LE,
|
||||
AudioFormat::U16be => gst_audio_sys::GST_AUDIO_FORMAT_U16BE,
|
||||
AudioFormat::S2432le => gst_audio_sys::GST_AUDIO_FORMAT_S24_32LE,
|
||||
AudioFormat::S2432be => gst_audio_sys::GST_AUDIO_FORMAT_S24_32BE,
|
||||
AudioFormat::U2432le => gst_audio_sys::GST_AUDIO_FORMAT_U24_32LE,
|
||||
AudioFormat::U2432be => gst_audio_sys::GST_AUDIO_FORMAT_U24_32BE,
|
||||
AudioFormat::S32le => gst_audio_sys::GST_AUDIO_FORMAT_S32LE,
|
||||
AudioFormat::S32be => gst_audio_sys::GST_AUDIO_FORMAT_S32BE,
|
||||
AudioFormat::U32le => gst_audio_sys::GST_AUDIO_FORMAT_U32LE,
|
||||
AudioFormat::U32be => gst_audio_sys::GST_AUDIO_FORMAT_U32BE,
|
||||
AudioFormat::S24le => gst_audio_sys::GST_AUDIO_FORMAT_S24LE,
|
||||
AudioFormat::S24be => gst_audio_sys::GST_AUDIO_FORMAT_S24BE,
|
||||
AudioFormat::U24le => gst_audio_sys::GST_AUDIO_FORMAT_U24LE,
|
||||
AudioFormat::U24be => gst_audio_sys::GST_AUDIO_FORMAT_U24BE,
|
||||
AudioFormat::S20le => gst_audio_sys::GST_AUDIO_FORMAT_S20LE,
|
||||
AudioFormat::S20be => gst_audio_sys::GST_AUDIO_FORMAT_S20BE,
|
||||
AudioFormat::U20le => gst_audio_sys::GST_AUDIO_FORMAT_U20LE,
|
||||
AudioFormat::U20be => gst_audio_sys::GST_AUDIO_FORMAT_U20BE,
|
||||
AudioFormat::S18le => gst_audio_sys::GST_AUDIO_FORMAT_S18LE,
|
||||
AudioFormat::S18be => gst_audio_sys::GST_AUDIO_FORMAT_S18BE,
|
||||
AudioFormat::U18le => gst_audio_sys::GST_AUDIO_FORMAT_U18LE,
|
||||
AudioFormat::U18be => gst_audio_sys::GST_AUDIO_FORMAT_U18BE,
|
||||
AudioFormat::F32le => gst_audio_sys::GST_AUDIO_FORMAT_F32LE,
|
||||
AudioFormat::F32be => gst_audio_sys::GST_AUDIO_FORMAT_F32BE,
|
||||
AudioFormat::F64le => gst_audio_sys::GST_AUDIO_FORMAT_F64LE,
|
||||
AudioFormat::F64be => gst_audio_sys::GST_AUDIO_FORMAT_F64BE,
|
||||
AudioFormat::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioFormat> for AudioFormat {
|
||||
fn from_glib(value: ffi::GstAudioFormat) -> Self {
|
||||
impl FromGlib<gst_audio_sys::GstAudioFormat> for AudioFormat {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioFormat) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => AudioFormat::Unknown,
|
||||
|
@ -283,7 +283,7 @@ impl FromGlib<ffi::GstAudioFormat> for AudioFormat {
|
|||
|
||||
impl StaticType for AudioFormat {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_format_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_format_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,13 +295,13 @@ impl<'a> FromValueOptional<'a> for AudioFormat {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioFormat {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioFormat {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,20 +316,20 @@ pub enum AudioLayout {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioLayout {
|
||||
type GlibType = ffi::GstAudioLayout;
|
||||
type GlibType = gst_audio_sys::GstAudioLayout;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioLayout {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioLayout {
|
||||
match *self {
|
||||
AudioLayout::Interleaved => ffi::GST_AUDIO_LAYOUT_INTERLEAVED,
|
||||
AudioLayout::NonInterleaved => ffi::GST_AUDIO_LAYOUT_NON_INTERLEAVED,
|
||||
AudioLayout::Interleaved => gst_audio_sys::GST_AUDIO_LAYOUT_INTERLEAVED,
|
||||
AudioLayout::NonInterleaved => gst_audio_sys::GST_AUDIO_LAYOUT_NON_INTERLEAVED,
|
||||
AudioLayout::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioLayout> for AudioLayout {
|
||||
fn from_glib(value: ffi::GstAudioLayout) -> Self {
|
||||
impl FromGlib<gst_audio_sys::GstAudioLayout> for AudioLayout {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioLayout) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => AudioLayout::Interleaved,
|
||||
|
@ -341,7 +341,7 @@ impl FromGlib<ffi::GstAudioLayout> for AudioLayout {
|
|||
|
||||
impl StaticType for AudioLayout {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_layout_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_layout_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,13 +353,13 @@ impl<'a> FromValueOptional<'a> for AudioLayout {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioLayout {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioLayout {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -375,21 +375,21 @@ pub enum StreamVolumeFormat {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for StreamVolumeFormat {
|
||||
type GlibType = ffi::GstStreamVolumeFormat;
|
||||
type GlibType = gst_audio_sys::GstStreamVolumeFormat;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstStreamVolumeFormat {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstStreamVolumeFormat {
|
||||
match *self {
|
||||
StreamVolumeFormat::Linear => ffi::GST_STREAM_VOLUME_FORMAT_LINEAR,
|
||||
StreamVolumeFormat::Cubic => ffi::GST_STREAM_VOLUME_FORMAT_CUBIC,
|
||||
StreamVolumeFormat::Db => ffi::GST_STREAM_VOLUME_FORMAT_DB,
|
||||
StreamVolumeFormat::Linear => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_LINEAR,
|
||||
StreamVolumeFormat::Cubic => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_CUBIC,
|
||||
StreamVolumeFormat::Db => gst_audio_sys::GST_STREAM_VOLUME_FORMAT_DB,
|
||||
StreamVolumeFormat::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstStreamVolumeFormat> for StreamVolumeFormat {
|
||||
fn from_glib(value: ffi::GstStreamVolumeFormat) -> Self {
|
||||
impl FromGlib<gst_audio_sys::GstStreamVolumeFormat> for StreamVolumeFormat {
|
||||
fn from_glib(value: gst_audio_sys::GstStreamVolumeFormat) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => StreamVolumeFormat::Linear,
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_audio_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct AudioFlags: u32 {
|
||||
|
@ -21,16 +21,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioFlags {
|
||||
type GlibType = ffi::GstAudioFlags;
|
||||
type GlibType = gst_audio_sys::GstAudioFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioFlags {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioFlags> for AudioFlags {
|
||||
fn from_glib(value: ffi::GstAudioFlags) -> AudioFlags {
|
||||
impl FromGlib<gst_audio_sys::GstAudioFlags> for AudioFlags {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioFlags) -> AudioFlags {
|
||||
skip_assert_initialized!();
|
||||
AudioFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ impl FromGlib<ffi::GstAudioFlags> for AudioFlags {
|
|||
|
||||
impl StaticType for AudioFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_flags_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,13 +50,13 @@ impl<'a> FromValueOptional<'a> for AudioFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,16 +72,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioFormatFlags {
|
||||
type GlibType = ffi::GstAudioFormatFlags;
|
||||
type GlibType = gst_audio_sys::GstAudioFormatFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioFormatFlags {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioFormatFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioFormatFlags> for AudioFormatFlags {
|
||||
fn from_glib(value: ffi::GstAudioFormatFlags) -> AudioFormatFlags {
|
||||
impl FromGlib<gst_audio_sys::GstAudioFormatFlags> for AudioFormatFlags {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioFormatFlags) -> AudioFormatFlags {
|
||||
skip_assert_initialized!();
|
||||
AudioFormatFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ impl FromGlib<ffi::GstAudioFormatFlags> for AudioFormatFlags {
|
|||
|
||||
impl StaticType for AudioFormatFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_format_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,13 +101,13 @@ impl<'a> FromValueOptional<'a> for AudioFormatFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioFormatFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioFormatFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,16 +120,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for AudioPackFlags {
|
||||
type GlibType = ffi::GstAudioPackFlags;
|
||||
type GlibType = gst_audio_sys::GstAudioPackFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstAudioPackFlags {
|
||||
fn to_glib(&self) -> gst_audio_sys::GstAudioPackFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstAudioPackFlags> for AudioPackFlags {
|
||||
fn from_glib(value: ffi::GstAudioPackFlags) -> AudioPackFlags {
|
||||
impl FromGlib<gst_audio_sys::GstAudioPackFlags> for AudioPackFlags {
|
||||
fn from_glib(value: gst_audio_sys::GstAudioPackFlags) -> AudioPackFlags {
|
||||
skip_assert_initialized!();
|
||||
AudioPackFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ impl FromGlib<ffi::GstAudioPackFlags> for AudioPackFlags {
|
|||
|
||||
impl StaticType for AudioPackFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) }
|
||||
unsafe { from_glib(gst_audio_sys::gst_audio_pack_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,13 +149,13 @@ impl<'a> FromValueOptional<'a> for AudioPackFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for AudioPackFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for AudioPackFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use StreamVolumeFormat;
|
||||
use ffi;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst_audio_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct StreamVolume(Interface<ffi::GstStreamVolume>);
|
||||
pub struct StreamVolume(Interface<gst_audio_sys::GstStreamVolume>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_stream_volume_get_type(),
|
||||
get_type => || gst_audio_sys::gst_stream_volume_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ impl StreamVolume {
|
|||
pub fn convert_volume(from: StreamVolumeFormat, to: StreamVolumeFormat, val: f64) -> f64 {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
ffi::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val)
|
||||
gst_audio_sys::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,25 +52,25 @@ pub trait StreamVolumeExt: 'static {
|
|||
impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
|
||||
fn get_mute(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_audio_sys::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_volume(&self, format: StreamVolumeFormat) -> f64 {
|
||||
unsafe {
|
||||
ffi::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib())
|
||||
gst_audio_sys::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mute(&self, mute: bool) {
|
||||
unsafe {
|
||||
ffi::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
gst_audio_sys::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_volume(&self, format: StreamVolumeFormat, val: f64) {
|
||||
unsafe {
|
||||
ffi::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val);
|
||||
gst_audio_sys::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,13 +91,13 @@ impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<StreamVolume> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_volume_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_volume_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<StreamVolume> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::ObjectExt;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::mem;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass, AdapterClass>);
|
||||
pub struct Adapter(Object<gst_base_sys::GstAdapter, gst_base_sys::GstAdapterClass, AdapterClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_adapter_get_type(),
|
||||
get_type => || gst_base_sys::gst_adapter_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,87 +21,87 @@ impl Adapter {
|
|||
pub fn new() -> Adapter {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_new())
|
||||
from_glib_full(gst_base_sys::gst_adapter_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn available(&self) -> usize {
|
||||
unsafe {
|
||||
ffi::gst_adapter_available(self.to_glib_none().0)
|
||||
gst_base_sys::gst_adapter_available(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn available_fast(&self) -> usize {
|
||||
unsafe {
|
||||
ffi::gst_adapter_available_fast(self.to_glib_none().0)
|
||||
gst_base_sys::gst_adapter_available_fast(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn clear(&self) {
|
||||
unsafe {
|
||||
ffi::gst_adapter_clear(self.to_glib_none().0);
|
||||
gst_base_sys::gst_adapter_clear(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn copy_bytes(&self, offset: usize, size: usize) -> Option<glib::Bytes> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size))
|
||||
from_glib_full(gst_base_sys::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn distance_from_discont(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_adapter_distance_from_discont(self.to_glib_none().0)
|
||||
gst_base_sys::gst_adapter_distance_from_discont(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn dts_at_discont(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_adapter_dts_at_discont(self.to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_adapter_dts_at_discont(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn flush(&self, flush: usize) {
|
||||
unsafe {
|
||||
ffi::gst_adapter_flush(self.to_glib_none().0, flush);
|
||||
gst_base_sys::gst_adapter_flush(self.to_glib_none().0, flush);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_buffer(&self, nbytes: usize) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_get_buffer(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_get_buffer(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_buffer_fast(&self, nbytes: usize) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_buffer_list(&self, nbytes: usize) -> Option<gst::BufferList> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_get_list(self.to_glib_none().0, nbytes))
|
||||
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_get_list(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn masked_scan_uint32(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> isize {
|
||||
unsafe {
|
||||
ffi::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size)
|
||||
gst_base_sys::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn masked_scan_uint32_peek(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> (isize, u32) {
|
||||
unsafe {
|
||||
let mut value = mem::uninitialized();
|
||||
let ret = ffi::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value);
|
||||
let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value);
|
||||
(ret, value)
|
||||
}
|
||||
}
|
||||
|
@ -109,14 +109,14 @@ impl Adapter {
|
|||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn offset_at_discont(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_adapter_offset_at_discont(self.to_glib_none().0)
|
||||
gst_base_sys::gst_adapter_offset_at_discont(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prev_dts(&self) -> (gst::ClockTime, u64) {
|
||||
unsafe {
|
||||
let mut distance = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance));
|
||||
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance));
|
||||
(ret, distance)
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ impl Adapter {
|
|||
pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
|
||||
unsafe {
|
||||
let mut distance = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance));
|
||||
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance));
|
||||
(ret, distance)
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ impl Adapter {
|
|||
pub fn prev_offset(&self) -> (u64, u64) {
|
||||
unsafe {
|
||||
let mut distance = mem::uninitialized();
|
||||
let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance);
|
||||
let ret = gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance);
|
||||
(ret, distance)
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ impl Adapter {
|
|||
pub fn prev_pts(&self) -> (gst::ClockTime, u64) {
|
||||
unsafe {
|
||||
let mut distance = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance));
|
||||
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance));
|
||||
(ret, distance)
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ impl Adapter {
|
|||
pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
|
||||
unsafe {
|
||||
let mut distance = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance));
|
||||
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance));
|
||||
(ret, distance)
|
||||
}
|
||||
}
|
||||
|
@ -157,31 +157,31 @@ impl Adapter {
|
|||
#[cfg(any(feature = "v1_10", feature = "dox"))]
|
||||
pub fn pts_at_discont(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_adapter_pts_at_discont(self.to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_adapter_pts_at_discont(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take_buffer(&self, nbytes: usize) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_take_buffer(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_take_buffer(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take_buffer_fast(&self, nbytes: usize) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take_buffer_list(&self, nbytes: usize) -> Option<gst::BufferList> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes))
|
||||
from_glib_full(gst_base_sys::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn take_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_take_list(self.to_glib_none().0, nbytes))
|
||||
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_take_list(self.to_glib_none().0, nbytes))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -10,17 +9,18 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Aggregator(Object<ffi::GstAggregator, ffi::GstAggregatorClass, AggregatorClass>) @extends gst::Element, gst::Object;
|
||||
pub struct Aggregator(Object<gst_base_sys::GstAggregator, gst_base_sys::GstAggregatorClass, AggregatorClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_aggregator_get_type(),
|
||||
get_type => || gst_base_sys::gst_aggregator_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,48 +58,48 @@ pub trait AggregatorExt: 'static {
|
|||
impl<O: IsA<Aggregator>> AggregatorExt for O {
|
||||
//#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||
// unsafe { TODO: call ffi::gst_aggregator_get_allocator() }
|
||||
// unsafe { TODO: call gst_base_sys:gst_aggregator_get_allocator() }
|
||||
//}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_aggregator_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_aggregator_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn get_latency(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_aggregator_get_latency(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_aggregator_get_latency(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 {
|
||||
ffi::gst_aggregator_set_latency(self.as_ref().to_glib_none().0, min_latency.to_glib(), max_latency.to_glib());
|
||||
gst_base_sys::gst_aggregator_set_latency(self.as_ref().to_glib_none().0, min_latency.to_glib(), max_latency.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn set_src_caps(&self, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
ffi::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
gst_base_sys::gst_aggregator_set_src_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_start_time(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_start_time(&self, start_time: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, Value::from(&start_time).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,13 +122,13 @@ impl<O: IsA<Aggregator>> AggregatorExt for O {
|
|||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstAggregator, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Aggregator> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_start_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstAggregator, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_start_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstAggregator, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Aggregator> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Aggregator::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct AggregatorPad(Object<ffi::GstAggregatorPad, ffi::GstAggregatorPadClass, AggregatorPadClass>) @extends gst::Pad, gst::Object;
|
||||
pub struct AggregatorPad(Object<gst_base_sys::GstAggregatorPad, gst_base_sys::GstAggregatorPadClass, AggregatorPadClass>) @extends gst::Pad, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_aggregator_pad_get_type(),
|
||||
get_type => || gst_base_sys::gst_aggregator_pad_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,35 +41,35 @@ impl<O: IsA<AggregatorPad>> AggregatorPadExt for O {
|
|||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn drop_buffer(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_aggregator_pad_drop_buffer(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_aggregator_pad_drop_buffer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14_1", feature = "dox"))]
|
||||
fn has_buffer(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_aggregator_pad_has_buffer(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_aggregator_pad_has_buffer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn is_eos(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_aggregator_pad_is_eos(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_aggregator_pad_is_eos(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn peek_buffer(&self) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_aggregator_pad_peek_buffer(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_aggregator_pad_peek_buffer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
fn pop_buffer(&self) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_aggregator_pad_pop_buffer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -10,18 +9,19 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct BaseSink(Object<ffi::GstBaseSink, ffi::GstBaseSinkClass, BaseSinkClass>) @extends gst::Element, gst::Object;
|
||||
pub struct BaseSink(Object<gst_base_sys::GstBaseSink, gst_base_sys::GstBaseSinkClass, BaseSinkClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_base_sink_get_type(),
|
||||
get_type => || gst_base_sys::gst_base_sink_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,85 +124,85 @@ pub trait BaseSinkExt: 'static {
|
|||
|
||||
impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
||||
//fn do_preroll(&self, obj: /*Ignored*/&gst::MiniObject) -> gst::FlowReturn {
|
||||
// unsafe { TODO: call ffi::gst_base_sink_do_preroll() }
|
||||
// unsafe { TODO: call gst_base_sys:gst_base_sink_do_preroll() }
|
||||
//}
|
||||
|
||||
fn get_blocksize(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_sink_get_blocksize(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn get_drop_out_of_segment(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_get_drop_out_of_segment(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_get_drop_out_of_segment(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_last_sample(&self) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_base_sink_get_last_sample(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_base_sink_get_last_sample(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_latency(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_get_latency(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_get_latency(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_max_bitrate(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_sink_get_max_bitrate(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_max_lateness(&self) -> i64 {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_sink_get_max_lateness(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_render_delay(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_get_render_delay(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_sync(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_get_sync(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_get_sync(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_throttle_time(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_sink_get_throttle_time(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_ts_offset(&self) -> gst::ClockTimeDiff {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_sink_get_ts_offset(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn is_async_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_is_async_enabled(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_is_async_enabled(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_last_sample_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_is_last_sample_enabled(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_is_last_sample_enabled(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_qos_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_sink_is_qos_enabled(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_sink_is_qos_enabled(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,82 +212,82 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
let mut upstream_live = mem::uninitialized();
|
||||
let mut min_latency = mem::uninitialized();
|
||||
let mut max_latency = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_base_sink_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut upstream_live, &mut min_latency, &mut max_latency));
|
||||
let ret = from_glib(gst_base_sys::gst_base_sink_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut upstream_live, &mut min_latency, &mut max_latency));
|
||||
if ret { Some((from_glib(live), from_glib(upstream_live), from_glib(min_latency), from_glib(max_latency))) } else { None }
|
||||
}
|
||||
}
|
||||
|
||||
fn set_async_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_async_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_async_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_blocksize(&self, blocksize: u32) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
|
||||
gst_base_sys::gst_base_sink_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn set_drop_out_of_segment(&self, drop_out_of_segment: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_drop_out_of_segment(self.as_ref().to_glib_none().0, drop_out_of_segment.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_drop_out_of_segment(self.as_ref().to_glib_none().0, drop_out_of_segment.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_last_sample_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_last_sample_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_last_sample_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_max_bitrate(&self, max_bitrate: u64) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate);
|
||||
gst_base_sys::gst_base_sink_set_max_bitrate(self.as_ref().to_glib_none().0, max_bitrate);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_max_lateness(&self, max_lateness: i64) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness);
|
||||
gst_base_sys::gst_base_sink_set_max_lateness(self.as_ref().to_glib_none().0, max_lateness);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_qos_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_render_delay(&self, delay: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_render_delay(self.as_ref().to_glib_none().0, delay.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_sync(&self, sync: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib());
|
||||
gst_base_sys::gst_base_sink_set_sync(self.as_ref().to_glib_none().0, sync.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_throttle_time(&self, throttle: u64) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle);
|
||||
gst_base_sys::gst_base_sink_set_throttle_time(self.as_ref().to_glib_none().0, throttle);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_ts_offset(&self, offset: gst::ClockTimeDiff) {
|
||||
unsafe {
|
||||
ffi::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset);
|
||||
gst_base_sys::gst_base_sink_set_ts_offset(self.as_ref().to_glib_none().0, offset);
|
||||
}
|
||||
}
|
||||
|
||||
fn wait_clock(&self, time: gst::ClockTime) -> (gst::ClockReturn, gst::ClockTimeDiff) {
|
||||
unsafe {
|
||||
let mut jitter = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_base_sink_wait_clock(self.as_ref().to_glib_none().0, time.to_glib(), &mut jitter));
|
||||
let ret = from_glib(gst_base_sys::gst_base_sink_wait_clock(self.as_ref().to_glib_none().0, time.to_glib(), &mut jitter));
|
||||
(ret, jitter)
|
||||
}
|
||||
}
|
||||
|
@ -295,42 +295,42 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
fn get_property_async(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_async(&self, async: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"async\0".as_ptr() as *const _, Value::from(&async).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_enable_last_sample(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"enable-last-sample\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_enable_last_sample(&self, enable_last_sample: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"enable-last-sample\0".as_ptr() as *const _, Value::from(&enable_last_sample).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_qos(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
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().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_qos(&self, qos: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -423,67 +423,67 @@ impl<O: IsA<BaseSink>> BaseSinkExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_async_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_async_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_enable_last_sample_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_enable_last_sample_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_last_sample_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_last_sample_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_bitrate_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_max_bitrate_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_lateness_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_max_lateness_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_render_delay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_render_delay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_sync_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_sync_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_throttle_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_throttle_time_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSink, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSink> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSink::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_ts_offset_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSink, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_ts_offset_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())
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -11,18 +10,19 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct BaseSrc(Object<ffi::GstBaseSrc, ffi::GstBaseSrcClass, BaseSrcClass>) @extends gst::Element, gst::Object;
|
||||
pub struct BaseSrc(Object<gst_base_sys::GstBaseSrc, gst_base_sys::GstBaseSrcClass, BaseSrcClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_base_src_get_type(),
|
||||
get_type => || gst_base_sys::gst_base_src_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,42 +83,42 @@ pub trait BaseSrcExt: 'static {
|
|||
|
||||
impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||
// unsafe { TODO: call ffi::gst_base_src_get_allocator() }
|
||||
// unsafe { TODO: call gst_base_sys:gst_base_src_get_allocator() }
|
||||
//}
|
||||
|
||||
fn get_blocksize(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0)
|
||||
gst_base_sys::gst_base_src_get_blocksize(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_base_src_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_base_src_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_do_timestamp(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_src_get_do_timestamp(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_src_get_do_timestamp(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_async(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_src_is_async(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_src_is_async(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_live(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_src_is_live(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_src_is_live(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_src_new_seamless_segment(self.as_ref().to_glib_none().0, start, stop, time))
|
||||
from_glib(gst_base_sys::gst_base_src_new_seamless_segment(self.as_ref().to_glib_none().0, start, stop, time))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,84 +127,84 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
|||
let mut live = mem::uninitialized();
|
||||
let mut min_latency = mem::uninitialized();
|
||||
let mut max_latency = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_base_src_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut min_latency, &mut max_latency));
|
||||
let ret = from_glib(gst_base_sys::gst_base_src_query_latency(self.as_ref().to_glib_none().0, &mut live, &mut min_latency, &mut max_latency));
|
||||
if ret { Some((from_glib(live), from_glib(min_latency), from_glib(max_latency))) } else { None }
|
||||
}
|
||||
}
|
||||
|
||||
fn set_async(&self, async: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_async(self.as_ref().to_glib_none().0, async.to_glib());
|
||||
gst_base_sys::gst_base_src_set_async(self.as_ref().to_glib_none().0, async.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_automatic_eos(&self, automatic_eos: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_automatic_eos(self.as_ref().to_glib_none().0, automatic_eos.to_glib());
|
||||
gst_base_sys::gst_base_src_set_automatic_eos(self.as_ref().to_glib_none().0, automatic_eos.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_blocksize(&self, blocksize: u32) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
|
||||
gst_base_sys::gst_base_src_set_blocksize(self.as_ref().to_glib_none().0, blocksize);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_caps(&self, caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0), "Failed to set caps")
|
||||
glib_result_from_gboolean!(gst_base_sys::gst_base_src_set_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0), "Failed to set caps")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_do_timestamp(&self, timestamp: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_do_timestamp(self.as_ref().to_glib_none().0, timestamp.to_glib());
|
||||
gst_base_sys::gst_base_src_set_do_timestamp(self.as_ref().to_glib_none().0, timestamp.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_dynamic_size(&self, dynamic: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.to_glib());
|
||||
gst_base_sys::gst_base_src_set_dynamic_size(self.as_ref().to_glib_none().0, dynamic.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_format(&self, format: gst::Format) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib());
|
||||
gst_base_sys::gst_base_src_set_format(self.as_ref().to_glib_none().0, format.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_live(&self, live: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib());
|
||||
gst_base_sys::gst_base_src_set_live(self.as_ref().to_glib_none().0, live.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_num_buffers(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"num-buffers\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_num_buffers(&self, num_buffers: i32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"num-buffers\0".as_ptr() as *const _, Value::from(&num_buffers).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_typefind(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"typefind\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_typefind(&self, typefind: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"typefind\0".as_ptr() as *const _, Value::from(&typefind).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,25 +241,25 @@ impl<O: IsA<BaseSrc>> BaseSrcExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_blocksize_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSrc> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_do_timestamp_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_do_timestamp_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSrc> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_num_buffers_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_num_buffers_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSrc> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_typefind_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseSrc, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_typefind_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseSrc, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseSrc> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseSrc::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -11,17 +10,18 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct BaseTransform(Object<ffi::GstBaseTransform, ffi::GstBaseTransformClass, BaseTransformClass>) @extends gst::Element, gst::Object;
|
||||
pub struct BaseTransform(Object<gst_base_sys::GstBaseTransform, gst_base_sys::GstBaseTransformClass, BaseTransformClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_base_transform_get_type(),
|
||||
get_type => || gst_base_sys::gst_base_transform_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,98 +68,98 @@ pub trait BaseTransformExt: 'static {
|
|||
|
||||
impl<O: IsA<BaseTransform>> BaseTransformExt for O {
|
||||
//fn get_allocator(&self, allocator: /*Ignored*/gst::Allocator, params: /*Ignored*/gst::AllocationParams) {
|
||||
// unsafe { TODO: call ffi::gst_base_transform_get_allocator() }
|
||||
// unsafe { TODO: call gst_base_sys:gst_base_transform_get_allocator() }
|
||||
//}
|
||||
|
||||
fn get_buffer_pool(&self) -> Option<gst::BufferPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_base_transform_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_base_transform_get_buffer_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_in_place(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_transform_is_in_place(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_transform_is_in_place(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_passthrough(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_transform_is_passthrough(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_transform_is_passthrough(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_qos_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_base_transform_is_qos_enabled(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_base_sys::gst_base_transform_is_qos_enabled(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn reconfigure_sink(&self) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0);
|
||||
gst_base_sys::gst_base_transform_reconfigure_sink(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn reconfigure_src(&self) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0);
|
||||
gst_base_sys::gst_base_transform_reconfigure_src(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_gap_aware(&self, gap_aware: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_set_gap_aware(self.as_ref().to_glib_none().0, gap_aware.to_glib());
|
||||
gst_base_sys::gst_base_transform_set_gap_aware(self.as_ref().to_glib_none().0, gap_aware.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_in_place(&self, in_place: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_set_in_place(self.as_ref().to_glib_none().0, in_place.to_glib());
|
||||
gst_base_sys::gst_base_transform_set_in_place(self.as_ref().to_glib_none().0, in_place.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_passthrough(&self, passthrough: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_set_passthrough(self.as_ref().to_glib_none().0, passthrough.to_glib());
|
||||
gst_base_sys::gst_base_transform_set_passthrough(self.as_ref().to_glib_none().0, passthrough.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_prefer_passthrough(&self, prefer_passthrough: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_set_prefer_passthrough(self.as_ref().to_glib_none().0, prefer_passthrough.to_glib());
|
||||
gst_base_sys::gst_base_transform_set_prefer_passthrough(self.as_ref().to_glib_none().0, prefer_passthrough.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_qos_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
gst_base_sys::gst_base_transform_set_qos_enabled(self.as_ref().to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn update_qos(&self, proportion: f64, diff: gst::ClockTimeDiff, timestamp: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_base_transform_update_qos(self.as_ref().to_glib_none().0, proportion, diff, timestamp.to_glib());
|
||||
gst_base_sys::gst_base_transform_update_qos(self.as_ref().to_glib_none().0, proportion, diff, timestamp.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn update_src_caps(&self, updated_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0), "Failed to update src caps")
|
||||
glib_result_from_gboolean!(gst_base_sys::gst_base_transform_update_src_caps(self.as_ref().to_glib_none().0, updated_caps.to_glib_none().0), "Failed to update src caps")
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_qos(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
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().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_qos(&self, qos: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"qos\0".as_ptr() as *const _, Value::from(&qos).to_glib_none().0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,7 @@ impl<O: IsA<BaseTransform>> BaseTransformExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstBaseTransform, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_qos_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_base_sys::GstBaseTransform, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<BaseTransform> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&BaseTransform::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -2,43 +2,41 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
use std::mem;
|
||||
|
||||
|
||||
pub fn type_find_helper<P: IsA<gst::Pad>>(src: &P, size: u64) -> Option<gst::Caps> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_type_find_helper(src.as_ref().to_glib_none().0, size))
|
||||
from_glib_full(gst_base_sys::gst_type_find_helper(src.as_ref().to_glib_none().0, size))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn type_find_helper_for_buffer<'a, P: IsA<gst::Object> + 'a, Q: Into<Option<&'a P>>>(obj: Q, buf: &gst::Buffer) -> (Option<gst::Caps>, gst::TypeFindProbability) {
|
||||
pub fn type_find_helper_for_buffer<P: IsA<gst::Object>>(obj: Option<&P>, buf: &gst::Buffer) -> (Option<gst::Caps>, gst::TypeFindProbability) {
|
||||
assert_initialized_main_thread!();
|
||||
let obj = obj.into();
|
||||
unsafe {
|
||||
let mut prob = mem::uninitialized();
|
||||
let ret = from_glib_full(ffi::gst_type_find_helper_for_buffer(obj.map(|p| p.as_ref()).to_glib_none().0, buf.to_glib_none().0, &mut prob));
|
||||
let ret = from_glib_full(gst_base_sys::gst_type_find_helper_for_buffer(obj.map(|p| p.as_ref()).to_glib_none().0, buf.to_glib_none().0, &mut prob));
|
||||
(ret, from_glib(prob))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn type_find_helper_for_extension<'a, P: IsA<gst::Object> + 'a, Q: Into<Option<&'a P>>>(obj: Q, extension: &str) -> Option<gst::Caps> {
|
||||
pub fn type_find_helper_for_extension<P: IsA<gst::Object>>(obj: Option<&P>, extension: &str) -> Option<gst::Caps> {
|
||||
assert_initialized_main_thread!();
|
||||
let obj = obj.into();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_type_find_helper_for_extension(obj.map(|p| p.as_ref()).to_glib_none().0, extension.to_glib_none().0))
|
||||
from_glib_full(gst_base_sys::gst_type_find_helper_for_extension(obj.map(|p| p.as_ref()).to_glib_none().0, extension.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn type_find_helper_get_range<'a, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: R, func: S, size: u64, extension: &str) -> (Option<gst::Caps>, gst::TypeFindProbability) {
|
||||
// unsafe { TODO: call ffi::gst_type_find_helper_get_range() }
|
||||
//pub fn type_find_helper_get_range<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, &Option<gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: &str) -> (Option<gst::Caps>, gst::TypeFindProbability) {
|
||||
// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range() }
|
||||
//}
|
||||
|
||||
//#[cfg(any(feature = "v1_14_3", feature = "dox"))]
|
||||
//pub fn type_find_helper_get_range_full<'a, 'b, P: IsA<gst::Object>, Q: IsA<gst::Object> + 'a, R: Into<Option<&'a Q>>, S: FnMut(&gst::Object, &gst::Object, u64, u32, &gst::Buffer) -> gst::FlowReturn, T: Into<Option<&'b str>>>(obj: &P, parent: R, func: S, size: u64, extension: T) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) {
|
||||
// unsafe { TODO: call ffi::gst_type_find_helper_get_range_full() }
|
||||
//pub fn type_find_helper_get_range_full<P: IsA<gst::Object>, Q: IsA<gst::Object>, R: FnMut(&gst::Object, &Option<gst::Object>, u64, u32, &gst::Buffer) -> gst::FlowReturn>(obj: &P, parent: Option<&Q>, func: R, size: u64, extension: Option<&str>) -> (gst::FlowReturn, gst::Caps, gst::TypeFindProbability) {
|
||||
// unsafe { TODO: call gst_base_sys:gst_type_find_helper_get_range_full() }
|
||||
//}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use BaseSrc;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_base_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PushSrc(Object<ffi::GstPushSrc, ffi::GstPushSrcClass, PushSrcClass>) @extends BaseSrc, gst::Element, gst::Object;
|
||||
pub struct PushSrc(Object<gst_base_sys::GstPushSrc, gst_base_sys::GstPushSrcClass, PushSrcClass>) @extends BaseSrc, gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_push_src_get_type(),
|
||||
get_type => || gst_base_sys::gst_push_src_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -10,17 +9,18 @@ use glib::object::ObjectType;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_check_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct TestClock(Object<ffi::GstTestClock, ffi::GstTestClockClass, TestClockClass>) @extends gst::Clock, gst::Object;
|
||||
pub struct TestClock(Object<gst_check_sys::GstTestClock, gst_check_sys::GstTestClockClass, TestClockClass>) @extends gst::Clock, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_test_clock_get_type(),
|
||||
get_type => || gst_check_sys::gst_test_clock_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,101 +28,101 @@ impl TestClock {
|
|||
pub fn new() -> TestClock {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
gst::Clock::from_glib_full(ffi::gst_test_clock_new()).unsafe_cast()
|
||||
gst::Clock::from_glib_full(gst_check_sys::gst_test_clock_new()).unsafe_cast()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_start_time(start_time: gst::ClockTime) -> TestClock {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
gst::Clock::from_glib_full(ffi::gst_test_clock_new_with_start_time(start_time.to_glib())).unsafe_cast()
|
||||
gst::Clock::from_glib_full(gst_check_sys::gst_test_clock_new_with_start_time(start_time.to_glib())).unsafe_cast()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn advance_time(&self, delta: gst::ClockTimeDiff) {
|
||||
unsafe {
|
||||
ffi::gst_test_clock_advance_time(self.to_glib_none().0, delta);
|
||||
gst_check_sys::gst_test_clock_advance_time(self.to_glib_none().0, delta);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn crank(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_test_clock_crank(self.to_glib_none().0))
|
||||
from_glib(gst_check_sys::gst_test_clock_crank(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_next_entry_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_test_clock_get_next_entry_time(self.to_glib_none().0))
|
||||
from_glib(gst_check_sys::gst_test_clock_get_next_entry_time(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn has_id(&self, id: /*Ignored*/gst::ClockID) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_has_id() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_has_id() }
|
||||
//}
|
||||
|
||||
pub fn peek_id_count(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_test_clock_peek_id_count(self.to_glib_none().0)
|
||||
gst_check_sys::gst_test_clock_peek_id_count(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn peek_next_pending_id(&self, pending_id: /*Ignored*/&mut gst::ClockID) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_peek_next_pending_id() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_peek_next_pending_id() }
|
||||
//}
|
||||
|
||||
//pub fn process_id_list(&self, pending_list: /*Ignored*/&[&gst::ClockID]) -> u32 {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_process_id_list() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_process_id_list() }
|
||||
//}
|
||||
|
||||
//pub fn process_next_clock_id(&self) -> /*Ignored*/Option<gst::ClockID> {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_process_next_clock_id() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_process_next_clock_id() }
|
||||
//}
|
||||
|
||||
pub fn set_time(&self, new_time: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_test_clock_set_time(self.to_glib_none().0, new_time.to_glib());
|
||||
gst_check_sys::gst_test_clock_set_time(self.to_glib_none().0, new_time.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn wait_for_multiple_pending_ids(&self, count: u32, pending_list: /*Unimplemented*/Vec<gst::ClockID>) {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_wait_for_multiple_pending_ids() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_multiple_pending_ids() }
|
||||
//}
|
||||
|
||||
//pub fn wait_for_next_pending_id(&self, pending_id: /*Ignored*/&mut gst::ClockID) {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_wait_for_next_pending_id() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_wait_for_next_pending_id() }
|
||||
//}
|
||||
|
||||
pub fn wait_for_pending_id_count(&self, count: u32) {
|
||||
unsafe {
|
||||
ffi::gst_test_clock_wait_for_pending_id_count(self.to_glib_none().0, count);
|
||||
gst_check_sys::gst_test_clock_wait_for_pending_id_count(self.to_glib_none().0, count);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_clock_type(&self) -> gst::ClockType {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::ClockType as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_clock_type(&self, clock_type: gst::ClockType) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock-type\0".as_ptr() as *const _, Value::from(&clock_type).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_start_time(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"start-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn id_list_get_latest_time(pending_list: /*Ignored*/&[&gst::ClockID]) -> gst::ClockTime {
|
||||
// unsafe { TODO: call ffi::gst_test_clock_id_list_get_latest_time() }
|
||||
// unsafe { TODO: call gst_check_sys:gst_test_clock_id_list_get_latest_time() }
|
||||
//}
|
||||
|
||||
pub fn connect_property_clock_type_notify<F: Fn(&TestClock) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
|
@ -143,7 +143,7 @@ impl Default for TestClock {
|
|||
unsafe impl Send for TestClock {}
|
||||
unsafe impl Sync for TestClock {}
|
||||
|
||||
unsafe extern "C" fn notify_clock_type_trampoline<F: Fn(&TestClock) + Send + Sync + 'static>(this: *mut ffi::GstTestClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_clock_type_trampoline<F: Fn(&TestClock) + Send + Sync + 'static>(this: *mut gst_check_sys::GstTestClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
use Error;
|
||||
use Extractable;
|
||||
use ffi;
|
||||
#[cfg(feature = "futures")]
|
||||
use futures_core;
|
||||
use ges_sys;
|
||||
use gio;
|
||||
use gio_ffi;
|
||||
use gio_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::Value;
|
||||
|
@ -17,17 +17,17 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Asset(Object<ffi::GESAsset, ffi::GESAssetClass, AssetClass>);
|
||||
pub struct Asset(Object<ges_sys::GESAsset, ges_sys::GESAssetClass, AssetClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_asset_get_type(),
|
||||
get_type => || ges_sys::ges_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,34 +35,32 @@ impl Asset {
|
|||
pub fn needs_reload(extractable_type: glib::types::Type, id: &str) -> bool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib(ffi::ges_asset_needs_reload(extractable_type.to_glib(), id.to_glib_none().0))
|
||||
from_glib(ges_sys::ges_asset_needs_reload(extractable_type.to_glib(), id.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn request<'a, P: Into<Option<&'a str>>>(extractable_type: glib::types::Type, id: P) -> Result<Option<Asset>, Error> {
|
||||
pub fn request(extractable_type: glib::types::Type, id: Option<&str>) -> Result<Option<Asset>, Error> {
|
||||
assert_initialized_main_thread!();
|
||||
let id = id.into();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_asset_request(extractable_type.to_glib(), id.to_glib_none().0, &mut error);
|
||||
let ret = ges_sys::ges_asset_request(extractable_type.to_glib(), id.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn request_async<'a, P: IsA<gio::Cancellable> + 'a, Q: Into<Option<&'a P>>, R: FnOnce(Result<Asset, Error>) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Q, callback: R) {
|
||||
pub fn request_async<P: IsA<gio::Cancellable>, Q: FnOnce(Result<Asset, Error>) + Send + 'static>(extractable_type: glib::types::Type, id: &str, cancellable: Option<&P>, callback: Q) {
|
||||
assert_initialized_main_thread!();
|
||||
let cancellable = cancellable.into();
|
||||
let user_data: Box<R> = Box::new(callback);
|
||||
unsafe extern "C" fn request_async_trampoline<R: FnOnce(Result<Asset, Error>) + Send + 'static>(_source_object: *mut gobject_ffi::GObject, res: *mut gio_ffi::GAsyncResult, user_data: glib_ffi::gpointer) {
|
||||
let user_data: Box<Q> = Box::new(callback);
|
||||
unsafe extern "C" fn request_async_trampoline<Q: FnOnce(Result<Asset, Error>) + Send + 'static>(_source_object: *mut gobject_sys::GObject, res: *mut gio_sys::GAsyncResult, user_data: glib_sys::gpointer) {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_asset_request_finish(res, &mut error);
|
||||
let ret = ges_sys::ges_asset_request_finish(res, &mut error);
|
||||
let result = if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) };
|
||||
let callback: Box<R> = Box::from_raw(user_data as *mut _);
|
||||
let callback: Box<Q> = Box::from_raw(user_data as *mut _);
|
||||
callback(result);
|
||||
}
|
||||
let callback = request_async_trampoline::<R>;
|
||||
let callback = request_async_trampoline::<Q>;
|
||||
unsafe {
|
||||
ffi::ges_asset_request_async(extractable_type.to_glib(), id.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _);
|
||||
ges_sys::ges_asset_request_async(extractable_type.to_glib(), id.to_glib_none().0, cancellable.map(|p| p.as_ref()).to_glib_none().0, Some(callback), Box::into_raw(user_data) as *mut _);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,12 +74,12 @@ impl Asset {
|
|||
let cancellable = gio::Cancellable::new();
|
||||
let send = Fragile::new(send);
|
||||
Self::request_async(
|
||||
extractable_type,
|
||||
&id,
|
||||
Some(&cancellable),
|
||||
move |res| {
|
||||
let _ = send.into_inner().send(res);
|
||||
},
|
||||
extractable_type,
|
||||
&id,
|
||||
Some(&cancellable),
|
||||
move |res| {
|
||||
let _ = send.into_inner().send(res);
|
||||
},
|
||||
);
|
||||
|
||||
cancellable
|
||||
|
@ -106,11 +104,11 @@ pub trait AssetExt: 'static {
|
|||
|
||||
fn list_proxies(&self) -> Vec<Asset>;
|
||||
|
||||
fn set_proxy<'a, P: IsA<Asset> + 'a, Q: Into<Option<&'a P>>>(&self, proxy: Q) -> Result<(), glib::error::BoolError>;
|
||||
fn set_proxy<P: IsA<Asset>>(&self, proxy: Option<&P>) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_property_proxy_target<P: IsA<Asset> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>);
|
||||
fn set_property_proxy_target(&self, proxy_target: Option<&Asset>);
|
||||
|
||||
fn connect_property_proxy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
|
@ -121,63 +119,62 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
fn extract(&self) -> Result<Option<Extractable>, Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||
let ret = ges_sys::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn get_error(&self) -> Option<Error> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_asset_get_error(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_asset_get_error(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_extractable_type(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_asset_get_extractable_type(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_asset_get_extractable_type(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_id(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_asset_get_id(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_asset_get_id(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_proxy(&self) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_asset_get_proxy(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_asset_get_proxy(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_proxy_target(&self) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_asset_get_proxy_target(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_asset_get_proxy_target(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn list_proxies(&self) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_asset_list_proxies(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_asset_list_proxies(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_proxy<'a, P: IsA<Asset> + 'a, Q: Into<Option<&'a P>>>(&self, proxy: Q) -> Result<(), glib::error::BoolError> {
|
||||
let proxy = proxy.into();
|
||||
fn set_proxy<P: IsA<Asset>>(&self, proxy: Option<&P>) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_asset_set_proxy(self.as_ref().to_glib_none().0, proxy.map(|p| p.as_ref()).to_glib_none().0), "Failed to set proxy")
|
||||
glib_result_from_gboolean!(ges_sys::ges_asset_set_proxy(self.as_ref().to_glib_none().0, proxy.map(|p| p.as_ref()).to_glib_none().0), "Failed to set proxy")
|
||||
}
|
||||
}
|
||||
|
||||
fn unproxy<P: IsA<Asset>>(&self, proxy: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_asset_unproxy(self.as_ref().to_glib_none().0, proxy.as_ref().to_glib_none().0), "Failed to unproxy asset")
|
||||
glib_result_from_gboolean!(ges_sys::ges_asset_unproxy(self.as_ref().to_glib_none().0, proxy.as_ref().to_glib_none().0), "Failed to unproxy asset")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_proxy_target<P: IsA<Asset> + glib::value::SetValueOptional>(&self, proxy_target: Option<&P>) {
|
||||
fn set_property_proxy_target(&self, proxy_target: Option<&Asset>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"proxy-target\0".as_ptr() as *const _, Value::from(proxy_target).to_glib_none().0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,13 +195,13 @@ impl<O: IsA<Asset>> AssetExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_proxy_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_proxy_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESAsset, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Asset> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Asset::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_proxy_target_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_proxy_target_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESAsset, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Asset> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Asset::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
use Extractable;
|
||||
use TimelineElement;
|
||||
use TrackElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::translate::*;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct BaseEffect(Object<ffi::GESBaseEffect, ffi::GESBaseEffectClass, BaseEffectClass>) @extends TrackElement, TimelineElement, @implements Extractable;
|
||||
pub struct BaseEffect(Object<ges_sys::GESBaseEffect, ges_sys::GESBaseEffectClass, BaseEffectClass>) @extends TrackElement, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_base_effect_get_type(),
|
||||
get_type => || ges_sys::ges_base_effect_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,22 +11,22 @@ use TimelineElement;
|
|||
use Track;
|
||||
use TrackElement;
|
||||
use TrackType;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Clip(Object<ffi::GESClip, ffi::GESClipClass, ClipClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
pub struct Clip(Object<ges_sys::GESClip, ges_sys::GESClipClass, ClipClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_clip_get_type(),
|
||||
get_type => || ges_sys::ges_clip_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,9 @@ pub const NONE_CLIP: Option<&Clip> = None;
|
|||
pub trait ClipExt: 'static {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement>;
|
||||
|
||||
fn find_track_element<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, type_: glib::types::Type) -> Option<TrackElement>;
|
||||
fn find_track_element<P: IsA<Track>>(&self, track: Option<&P>, type_: glib::types::Type) -> Option<TrackElement>;
|
||||
|
||||
fn find_track_elements<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec<TrackElement>;
|
||||
fn find_track_elements<P: IsA<Track>>(&self, track: Option<&P>, track_type: TrackType, type_: glib::types::Type) -> Vec<TrackElement>;
|
||||
|
||||
fn get_layer(&self) -> Option<Layer>;
|
||||
|
||||
|
@ -67,81 +67,79 @@ pub trait ClipExt: 'static {
|
|||
impl<O: IsA<Clip>> ClipExt for O {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> Option<TrackElement> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_clip_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_clip_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn find_track_element<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, type_: glib::types::Type) -> Option<TrackElement> {
|
||||
let track = track.into();
|
||||
fn find_track_element<P: IsA<Track>>(&self, track: Option<&P>, type_: glib::types::Type) -> Option<TrackElement> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_clip_find_track_element(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, type_.to_glib()))
|
||||
from_glib_full(ges_sys::ges_clip_find_track_element(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, type_.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn find_track_elements<'a, P: IsA<Track> + 'a, Q: Into<Option<&'a P>>>(&self, track: Q, track_type: TrackType, type_: glib::types::Type) -> Vec<TrackElement> {
|
||||
let track = track.into();
|
||||
fn find_track_elements<P: IsA<Track>>(&self, track: Option<&P>, track_type: TrackType, type_: glib::types::Type) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_clip_find_track_elements(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, track_type.to_glib(), type_.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_find_track_elements(self.as_ref().to_glib_none().0, track.map(|p| p.as_ref()).to_glib_none().0, track_type.to_glib(), type_.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_layer(&self) -> Option<Layer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_clip_get_layer(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_clip_get_layer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_supported_formats(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_clip_get_supported_formats(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_clip_get_supported_formats(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_top_effect_index<P: IsA<BaseEffect>>(&self, effect: &P) -> i32 {
|
||||
unsafe {
|
||||
ffi::ges_clip_get_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0)
|
||||
ges_sys::ges_clip_get_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_top_effect_position<P: IsA<BaseEffect>>(&self, effect: &P) -> i32 {
|
||||
unsafe {
|
||||
ffi::ges_clip_get_top_effect_position(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0)
|
||||
ges_sys::ges_clip_get_top_effect_position(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_top_effects(&self) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_clip_get_top_effects(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_clip_get_top_effects(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn move_to_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_clip_move_to_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to move clip to specified layer")
|
||||
glib_result_from_gboolean!(ges_sys::ges_clip_move_to_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to move clip to specified layer")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_supported_formats(&self, supportedformats: TrackType) {
|
||||
unsafe {
|
||||
ffi::ges_clip_set_supported_formats(self.as_ref().to_glib_none().0, supportedformats.to_glib());
|
||||
ges_sys::ges_clip_set_supported_formats(self.as_ref().to_glib_none().0, supportedformats.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_top_effect_index<P: IsA<BaseEffect>>(&self, effect: &P, newindex: u32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_clip_set_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newindex), "Failed to move effect")
|
||||
glib_result_from_gboolean!(ges_sys::ges_clip_set_top_effect_index(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newindex), "Failed to move effect")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_top_effect_priority<P: IsA<BaseEffect>>(&self, effect: &P, newpriority: u32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_clip_set_top_effect_priority(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newpriority), "Failed to the set top effect priority")
|
||||
glib_result_from_gboolean!(ges_sys::ges_clip_set_top_effect_priority(self.as_ref().to_glib_none().0, effect.as_ref().to_glib_none().0, newpriority), "Failed to the set top effect priority")
|
||||
}
|
||||
}
|
||||
|
||||
fn split(&self, position: u64) -> Option<Clip> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_clip_split(self.as_ref().to_glib_none().0, position))
|
||||
from_glib_none(ges_sys::ges_clip_split(self.as_ref().to_glib_none().0, position))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -162,13 +160,13 @@ impl<O: IsA<Clip>> ClipExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_layer_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_layer_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Clip> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Clip::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Clip> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Clip::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -7,7 +7,7 @@ use EditMode;
|
|||
use Extractable;
|
||||
use Layer;
|
||||
use TimelineElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -16,16 +16,16 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Container(Object<ffi::GESContainer, ffi::GESContainerClass, ContainerClass>) @extends TimelineElement, @implements Extractable;
|
||||
pub struct Container(Object<ges_sys::GESContainer, ges_sys::GESContainerClass, ContainerClass>) @extends TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_container_get_type(),
|
||||
get_type => || ges_sys::ges_container_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ impl Container {
|
|||
pub fn group(containers: &[Container]) -> Option<Container> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_container_group(containers.to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_container_group(containers.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,38 +63,38 @@ pub trait GESContainerExt: 'static {
|
|||
impl<O: IsA<Container>> GESContainerExt for O {
|
||||
fn add<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_container_add(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to add element")
|
||||
glib_result_from_gboolean!(ges_sys::ges_container_add(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to add element")
|
||||
}
|
||||
}
|
||||
|
||||
fn edit(&self, layers: &[Layer], new_layer_priority: i32, mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_container_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container")
|
||||
glib_result_from_gboolean!(ges_sys::ges_container_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position), "Failed to edit container")
|
||||
}
|
||||
}
|
||||
|
||||
fn get_children(&self, recursive: bool) -> Vec<TimelineElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_container_get_children(self.as_ref().to_glib_none().0, recursive.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_get_children(self.as_ref().to_glib_none().0, recursive.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove<P: IsA<TimelineElement>>(&self, child: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_container_remove(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to remove element")
|
||||
glib_result_from_gboolean!(ges_sys::ges_container_remove(self.as_ref().to_glib_none().0, child.as_ref().to_glib_none().0), "Failed to remove element")
|
||||
}
|
||||
}
|
||||
|
||||
fn ungroup(&self, recursive: bool) -> Vec<Container> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_container_ungroup(self.as_ref().to_glib_full(), recursive.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_container_ungroup(self.as_ref().to_glib_full(), recursive.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_height(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"height\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -124,19 +124,19 @@ impl<O: IsA<Container>> GESContainerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn child_added_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn child_added_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(this: *mut ges_sys::GESContainer, element: *mut ges_sys::GESTimelineElement, f: glib_sys::gpointer)
|
||||
where P: IsA<Container> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn child_removed_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(this: *mut ffi::GESContainer, element: *mut ffi::GESTimelineElement, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn child_removed_trampoline<P, F: Fn(&P, &TimelineElement) + 'static>(this: *mut ges_sys::GESContainer, element: *mut ges_sys::GESTimelineElement, f: glib_sys::gpointer)
|
||||
where P: IsA<Container> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Container::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(element))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_height_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESContainer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_height_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESContainer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Container> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Container::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -6,19 +6,19 @@ use BaseEffect;
|
|||
use Extractable;
|
||||
use TimelineElement;
|
||||
use TrackElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Effect(Object<ffi::GESEffect, ffi::GESEffectClass, EffectClass>) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable;
|
||||
pub struct Effect(Object<ges_sys::GESEffect, ges_sys::GESEffectClass, EffectClass>) @extends BaseEffect, TrackElement, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_effect_get_type(),
|
||||
get_type => || ges_sys::ges_effect_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ impl Effect {
|
|||
pub fn new(bin_description: &str) -> Option<Effect> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_effect_new(bin_description.to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_effect_new(bin_description.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ impl<O: IsA<Effect>> EffectExt for O {
|
|||
fn get_property_bin_description(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"bin-description\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +10,7 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -24,21 +24,21 @@ pub enum Edge {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for Edge {
|
||||
type GlibType = ffi::GESEdge;
|
||||
type GlibType = ges_sys::GESEdge;
|
||||
|
||||
fn to_glib(&self) -> ffi::GESEdge {
|
||||
fn to_glib(&self) -> ges_sys::GESEdge {
|
||||
match *self {
|
||||
Edge::EdgeStart => ffi::GES_EDGE_START,
|
||||
Edge::EdgeEnd => ffi::GES_EDGE_END,
|
||||
Edge::EdgeNone => ffi::GES_EDGE_NONE,
|
||||
Edge::EdgeStart => ges_sys::GES_EDGE_START,
|
||||
Edge::EdgeEnd => ges_sys::GES_EDGE_END,
|
||||
Edge::EdgeNone => ges_sys::GES_EDGE_NONE,
|
||||
Edge::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GESEdge> for Edge {
|
||||
fn from_glib(value: ffi::GESEdge) -> Self {
|
||||
impl FromGlib<ges_sys::GESEdge> for Edge {
|
||||
fn from_glib(value: ges_sys::GESEdge) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => Edge::EdgeStart,
|
||||
|
@ -51,7 +51,7 @@ impl FromGlib<ffi::GESEdge> for Edge {
|
|||
|
||||
impl StaticType for Edge {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::ges_edge_get_type()) }
|
||||
unsafe { from_glib(ges_sys::ges_edge_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for Edge {
|
|||
|
||||
impl<'a> FromValue<'a> for Edge {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for Edge {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,23 +87,23 @@ pub enum EditMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for EditMode {
|
||||
type GlibType = ffi::GESEditMode;
|
||||
type GlibType = ges_sys::GESEditMode;
|
||||
|
||||
fn to_glib(&self) -> ffi::GESEditMode {
|
||||
fn to_glib(&self) -> ges_sys::GESEditMode {
|
||||
match *self {
|
||||
EditMode::EditNormal => ffi::GES_EDIT_MODE_NORMAL,
|
||||
EditMode::EditRipple => ffi::GES_EDIT_MODE_RIPPLE,
|
||||
EditMode::EditRoll => ffi::GES_EDIT_MODE_ROLL,
|
||||
EditMode::EditTrim => ffi::GES_EDIT_MODE_TRIM,
|
||||
EditMode::EditSlide => ffi::GES_EDIT_MODE_SLIDE,
|
||||
EditMode::EditNormal => ges_sys::GES_EDIT_MODE_NORMAL,
|
||||
EditMode::EditRipple => ges_sys::GES_EDIT_MODE_RIPPLE,
|
||||
EditMode::EditRoll => ges_sys::GES_EDIT_MODE_ROLL,
|
||||
EditMode::EditTrim => ges_sys::GES_EDIT_MODE_TRIM,
|
||||
EditMode::EditSlide => ges_sys::GES_EDIT_MODE_SLIDE,
|
||||
EditMode::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GESEditMode> for EditMode {
|
||||
fn from_glib(value: ffi::GESEditMode) -> Self {
|
||||
impl FromGlib<ges_sys::GESEditMode> for EditMode {
|
||||
fn from_glib(value: ges_sys::GESEditMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => EditMode::EditNormal,
|
||||
|
@ -118,7 +118,7 @@ impl FromGlib<ffi::GESEditMode> for EditMode {
|
|||
|
||||
impl StaticType for EditMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
|
||||
unsafe { from_glib(ges_sys::ges_edit_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,13 +130,13 @@ impl<'a> FromValueOptional<'a> for EditMode {
|
|||
|
||||
impl<'a> FromValue<'a> for EditMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for EditMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use Asset;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Extractable(Interface<ffi::GESExtractable>);
|
||||
pub struct Extractable(Interface<ges_sys::GESExtractable>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_extractable_get_type(),
|
||||
get_type => || ges_sys::ges_extractable_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,19 +30,19 @@ pub trait ExtractableExt: 'static {
|
|||
impl<O: IsA<Extractable>> ExtractableExt for O {
|
||||
fn get_asset(&self) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_extractable_get_asset(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_extractable_get_asset(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_id(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_extractable_get_id(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_extractable_get_id(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_extractable_set_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to set asset")
|
||||
glib_result_from_gboolean!(ges_sys::ges_extractable_set_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to set asset")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +10,7 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct PipelineFlags: u32 {
|
||||
|
@ -24,16 +24,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PipelineFlags {
|
||||
type GlibType = ffi::GESPipelineFlags;
|
||||
type GlibType = ges_sys::GESPipelineFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GESPipelineFlags {
|
||||
fn to_glib(&self) -> ges_sys::GESPipelineFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GESPipelineFlags> for PipelineFlags {
|
||||
fn from_glib(value: ffi::GESPipelineFlags) -> PipelineFlags {
|
||||
impl FromGlib<ges_sys::GESPipelineFlags> for PipelineFlags {
|
||||
fn from_glib(value: ges_sys::GESPipelineFlags) -> PipelineFlags {
|
||||
skip_assert_initialized!();
|
||||
PipelineFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ impl FromGlib<ffi::GESPipelineFlags> for PipelineFlags {
|
|||
|
||||
impl StaticType for PipelineFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) }
|
||||
unsafe { from_glib(ges_sys::ges_pipeline_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,13 +53,13 @@ impl<'a> FromValueOptional<'a> for PipelineFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for PipelineFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for PipelineFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,16 +75,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for TrackType {
|
||||
type GlibType = ffi::GESTrackType;
|
||||
type GlibType = ges_sys::GESTrackType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GESTrackType {
|
||||
fn to_glib(&self) -> ges_sys::GESTrackType {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GESTrackType> for TrackType {
|
||||
fn from_glib(value: ffi::GESTrackType) -> TrackType {
|
||||
impl FromGlib<ges_sys::GESTrackType> for TrackType {
|
||||
fn from_glib(value: ges_sys::GESTrackType) -> TrackType {
|
||||
skip_assert_initialized!();
|
||||
TrackType::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ impl FromGlib<ffi::GESTrackType> for TrackType {
|
|||
|
||||
impl StaticType for TrackType {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::ges_track_type_get_type()) }
|
||||
unsafe { from_glib(ges_sys::ges_track_type_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,13 +104,13 @@ impl<'a> FromValueOptional<'a> for TrackType {
|
|||
|
||||
impl<'a> FromValue<'a> for TrackType {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for TrackType {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Container;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -13,16 +13,16 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Group(Object<ffi::GESGroup, ffi::GESGroupClass, GroupClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
pub struct Group(Object<ges_sys::GESGroup, ges_sys::GESGroupClass, GroupClass>) @extends Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_group_get_type(),
|
||||
get_type => || ges_sys::ges_group_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ impl Group {
|
|||
pub fn new() -> Group {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_group_new())
|
||||
from_glib_none(ges_sys::ges_group_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,70 +79,70 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
fn get_property_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_in_point(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_in_point(&self, in_point: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_max_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_max_duration(&self, max_duration: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"max-duration\0".as_ptr() as *const _, Value::from(&max_duration).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_priority(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"priority\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_priority(&self, priority: u32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"priority\0".as_ptr() as *const _, Value::from(&priority).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_start(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_start(&self, start: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"start\0".as_ptr() as *const _, Value::from(&start).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,31 +187,31 @@ impl<O: IsA<Group>> GroupExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Group> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Group::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Group> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Group::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Group> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Group::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Group> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Group::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESGroup, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESGroup, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Group> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Group::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -7,23 +7,23 @@ use Clip;
|
|||
use Extractable;
|
||||
use Timeline;
|
||||
use TrackType;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Layer(Object<ffi::GESLayer, ffi::GESLayerClass, LayerClass>) @implements Extractable;
|
||||
pub struct Layer(Object<ges_sys::GESLayer, ges_sys::GESLayerClass, LayerClass>) @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_layer_get_type(),
|
||||
get_type => || ges_sys::ges_layer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ impl Layer {
|
|||
pub fn new() -> Layer {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_layer_new())
|
||||
from_glib_none(ges_sys::ges_layer_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,79 +85,79 @@ pub trait LayerExt: 'static {
|
|||
impl<O: IsA<Layer>> LayerExt for O {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P, start: gst::ClockTime, inpoint: gst::ClockTime, duration: gst::ClockTime, track_types: TrackType) -> Option<Clip> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_layer_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib()))
|
||||
from_glib_none(ges_sys::ges_layer_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0, start.to_glib(), inpoint.to_glib(), duration.to_glib(), track_types.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn add_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_layer_add_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to add clip")
|
||||
glib_result_from_gboolean!(ges_sys::ges_layer_add_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to add clip")
|
||||
}
|
||||
}
|
||||
|
||||
fn get_auto_transition(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_layer_get_auto_transition(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_layer_get_auto_transition(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_clips(&self) -> Vec<Clip> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_clips_in_interval(&self, start: gst::ClockTime, end: gst::ClockTime) -> Vec<Clip> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_layer_get_clips_in_interval(self.as_ref().to_glib_none().0, start.to_glib(), end.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_layer_get_clips_in_interval(self.as_ref().to_glib_none().0, start.to_glib(), end.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_layer_get_duration(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_layer_get_duration(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_priority(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::ges_layer_get_priority(self.as_ref().to_glib_none().0)
|
||||
ges_sys::ges_layer_get_priority(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_layer_get_timeline(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_layer_get_timeline(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_layer_is_empty(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_layer_is_empty(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_clip<P: IsA<Clip>>(&self, clip: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_layer_remove_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to remove clip")
|
||||
glib_result_from_gboolean!(ges_sys::ges_layer_remove_clip(self.as_ref().to_glib_none().0, clip.as_ref().to_glib_none().0), "Failed to remove clip")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_auto_transition(&self, auto_transition: bool) {
|
||||
unsafe {
|
||||
ffi::ges_layer_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib());
|
||||
ges_sys::ges_layer_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_priority(&self, priority: u32) {
|
||||
unsafe {
|
||||
ffi::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
ges_sys::ges_layer_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) {
|
||||
unsafe {
|
||||
ffi::ges_layer_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0);
|
||||
ges_sys::ges_layer_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -194,25 +194,25 @@ impl<O: IsA<Layer>> LayerExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn clip_added_trampoline<P, F: Fn(&P, &Clip) + 'static>(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn clip_added_trampoline<P, F: Fn(&P, &Clip) + 'static>(this: *mut ges_sys::GESLayer, clip: *mut ges_sys::GESClip, f: glib_sys::gpointer)
|
||||
where P: IsA<Layer> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn clip_removed_trampoline<P, F: Fn(&P, &Clip) + 'static>(this: *mut ffi::GESLayer, clip: *mut ffi::GESClip, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn clip_removed_trampoline<P, F: Fn(&P, &Clip) + 'static>(this: *mut ges_sys::GESLayer, clip: *mut ges_sys::GESClip, f: glib_sys::gpointer)
|
||||
where P: IsA<Layer> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Layer::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(clip))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESLayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Layer> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Layer::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESLayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESLayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Layer> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Layer::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Error;
|
||||
use PipelineFlags;
|
||||
use Timeline;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -14,8 +14,8 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_pbutils;
|
||||
use std::boxed::Box as Box_;
|
||||
|
@ -23,10 +23,10 @@ use std::mem::transmute;
|
|||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Pipeline(Object<ffi::GESPipeline, ffi::GESPipelineClass, PipelineClass>) @extends gst::Pipeline, gst::Element, gst::Object;
|
||||
pub struct Pipeline(Object<ges_sys::GESPipeline, ges_sys::GESPipelineClass, PipelineClass>) @extends gst::Pipeline, gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_pipeline_get_type(),
|
||||
get_type => || ges_sys::ges_pipeline_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ impl Pipeline {
|
|||
pub fn new() -> Pipeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_pipeline_new())
|
||||
from_glib_none(ges_sys::ges_pipeline_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,21 +72,21 @@ pub trait GESPipelineExt: 'static {
|
|||
|
||||
fn get_property_audio_filter(&self) -> Option<gst::Element>;
|
||||
|
||||
fn set_property_audio_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>);
|
||||
fn set_property_audio_filter(&self, audio_filter: Option<&gst::Element>);
|
||||
|
||||
fn get_property_audio_sink(&self) -> Option<gst::Element>;
|
||||
|
||||
fn set_property_audio_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>);
|
||||
fn set_property_audio_sink(&self, audio_sink: Option<&gst::Element>);
|
||||
|
||||
fn get_property_timeline(&self) -> Option<Timeline>;
|
||||
|
||||
fn get_property_video_filter(&self) -> Option<gst::Element>;
|
||||
|
||||
fn set_property_video_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>);
|
||||
fn set_property_video_filter(&self, video_filter: Option<&gst::Element>);
|
||||
|
||||
fn get_property_video_sink(&self) -> Option<gst::Element>;
|
||||
|
||||
fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>);
|
||||
fn set_property_video_sink(&self, video_sink: Option<&gst::Element>);
|
||||
|
||||
fn connect_property_audio_filter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
|
@ -104,104 +104,104 @@ pub trait GESPipelineExt: 'static {
|
|||
impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
||||
fn get_mode(&self) -> PipelineFlags {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_pipeline_get_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_pipeline_get_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_thumbnail(&self, caps: &gst::Caps) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_pipeline_get_thumbnail(self.as_ref().to_glib_none().0, caps.to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_pipeline_get_thumbnail(self.as_ref().to_glib_none().0, caps.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_thumbnail_rgb24(&self, width: i32, height: i32) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_pipeline_get_thumbnail_rgb24(self.as_ref().to_glib_none().0, width, height))
|
||||
from_glib_full(ges_sys::ges_pipeline_get_thumbnail_rgb24(self.as_ref().to_glib_none().0, width, height))
|
||||
}
|
||||
}
|
||||
|
||||
fn preview_get_audio_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_pipeline_preview_get_audio_sink(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_pipeline_preview_get_audio_sink(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn preview_get_video_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_pipeline_preview_get_video_sink(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_pipeline_preview_get_video_sink(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn preview_set_audio_sink<P: IsA<gst::Element>>(&self, sink: &P) {
|
||||
unsafe {
|
||||
ffi::ges_pipeline_preview_set_audio_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0);
|
||||
ges_sys::ges_pipeline_preview_set_audio_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn preview_set_video_sink<P: IsA<gst::Element>>(&self, sink: &P) {
|
||||
unsafe {
|
||||
ffi::ges_pipeline_preview_set_video_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0);
|
||||
ges_sys::ges_pipeline_preview_set_video_sink(self.as_ref().to_glib_none().0, sink.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn save_thumbnail(&self, width: i32, height: i32, format: &str, location: &str) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::ges_pipeline_save_thumbnail(self.as_ref().to_glib_none().0, width, height, format.to_glib_none().0, location.to_glib_none().0, &mut error);
|
||||
let _ = ges_sys::ges_pipeline_save_thumbnail(self.as_ref().to_glib_none().0, width, height, format.to_glib_none().0, location.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mode(&self, mode: PipelineFlags) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()), "Failed to set mode")
|
||||
glib_result_from_gboolean!(ges_sys::ges_pipeline_set_mode(self.as_ref().to_glib_none().0, mode.to_glib()), "Failed to set mode")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_render_settings<P: IsA<gst_pbutils::EncodingProfile>>(&self, output_uri: &str, profile: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_pipeline_set_render_settings(self.as_ref().to_glib_none().0, output_uri.to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to set render settings")
|
||||
glib_result_from_gboolean!(ges_sys::ges_pipeline_set_render_settings(self.as_ref().to_glib_none().0, output_uri.to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to set render settings")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_pipeline_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_full()), "Failed to set timeline")
|
||||
glib_result_from_gboolean!(ges_sys::ges_pipeline_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_full()), "Failed to set timeline")
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_audio_filter(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_audio_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_filter: Option<&P>) {
|
||||
fn set_property_audio_filter(&self, audio_filter: Option<&gst::Element>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-filter\0".as_ptr() as *const _, Value::from(audio_filter).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_audio_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_audio_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, audio_sink: Option<&P>) {
|
||||
fn set_property_audio_sink(&self, audio_sink: Option<&gst::Element>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"audio-sink\0".as_ptr() as *const _, Value::from(audio_sink).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<Timeline as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"timeline\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -209,28 +209,28 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
fn get_property_video_filter(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-filter\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_video_filter<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_filter: Option<&P>) {
|
||||
fn set_property_video_filter(&self, video_filter: Option<&gst::Element>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-filter\0".as_ptr() as *const _, Value::from(video_filter).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||
fn set_property_video_sink(&self, video_sink: Option<&gst::Element>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,37 +283,37 @@ impl<O: IsA<Pipeline>> GESPipelineExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_audio_filter_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_audio_filter_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_audio_sink_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_audio_sink_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mode_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_mode_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_video_filter_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_video_filter_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_video_sink_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESPipeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_video_sink_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESPipeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Pipeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Pipeline::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Asset;
|
||||
use Error;
|
||||
use Timeline;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::object::Cast;
|
||||
|
@ -13,7 +13,7 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst_pbutils;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
|
@ -21,19 +21,18 @@ use std::mem::transmute;
|
|||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Project(Object<ffi::GESProject, ffi::GESProjectClass, ProjectClass>) @extends Asset;
|
||||
pub struct Project(Object<ges_sys::GESProject, ges_sys::GESProjectClass, ProjectClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_project_get_type(),
|
||||
get_type => || ges_sys::ges_project_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Project {
|
||||
pub fn new<'a, P: Into<Option<&'a str>>>(uri: P) -> Project {
|
||||
pub fn new(uri: Option<&str>) -> Project {
|
||||
assert_initialized_main_thread!();
|
||||
let uri = uri.into();
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_project_new(uri.to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_project_new(uri.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,9 +44,9 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
fn add_encoding_profile<P: IsA<gst_pbutils::EncodingProfile>>(&self, profile: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn create_asset<'a, P: Into<Option<&'a str>>>(&self, id: P, extractable_type: glib::types::Type) -> bool;
|
||||
fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool;
|
||||
|
||||
fn create_asset_sync<'a, P: Into<Option<&'a str>>>(&self, id: P, extractable_type: glib::types::Type) -> Result<Option<Asset>, Error>;
|
||||
fn create_asset_sync(&self, id: Option<&str>, extractable_type: glib::types::Type) -> Result<Option<Asset>, Error>;
|
||||
|
||||
fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option<Asset>;
|
||||
|
||||
|
@ -63,7 +62,7 @@ pub trait ProjectExt: 'static {
|
|||
|
||||
fn remove_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn save<'a, P: IsA<Timeline>, Q: IsA<Asset> + 'a, R: Into<Option<&'a Q>>>(&self, timeline: &P, uri: &str, formatter_asset: R, overwrite: bool) -> Result<(), Error>;
|
||||
fn save<P: IsA<Timeline>, Q: IsA<Asset>>(&self, timeline: &P, uri: &str, formatter_asset: Option<&Q>, overwrite: bool) -> Result<(), Error>;
|
||||
|
||||
fn connect_asset_added<F: Fn(&Self, &Asset) + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
|
||||
|
@ -81,81 +80,78 @@ pub trait ProjectExt: 'static {
|
|||
impl<O: IsA<Project>> ProjectExt for O {
|
||||
fn add_asset<P: IsA<Asset>>(&self, asset: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_project_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_project_add_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn add_encoding_profile<P: IsA<gst_pbutils::EncodingProfile>>(&self, profile: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_project_add_encoding_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to add profile")
|
||||
glib_result_from_gboolean!(ges_sys::ges_project_add_encoding_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0), "Failed to add profile")
|
||||
}
|
||||
}
|
||||
|
||||
fn create_asset<'a, P: Into<Option<&'a str>>>(&self, id: P, extractable_type: glib::types::Type) -> bool {
|
||||
let id = id.into();
|
||||
fn create_asset(&self, id: Option<&str>, extractable_type: glib::types::Type) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_project_create_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib()))
|
||||
from_glib(ges_sys::ges_project_create_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn create_asset_sync<'a, P: Into<Option<&'a str>>>(&self, id: P, extractable_type: glib::types::Type) -> Result<Option<Asset>, Error> {
|
||||
let id = id.into();
|
||||
fn create_asset_sync(&self, id: Option<&str>, extractable_type: glib::types::Type) -> Result<Option<Asset>, Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_project_create_asset_sync(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib(), &mut error);
|
||||
let ret = ges_sys::ges_project_create_asset_sync(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib(), &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn get_asset(&self, id: &str, extractable_type: glib::types::Type) -> Option<Asset> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_project_get_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib()))
|
||||
from_glib_full(ges_sys::ges_project_get_asset(self.as_ref().to_glib_none().0, id.to_glib_none().0, extractable_type.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_loading_assets(&self) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_project_get_loading_assets(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_get_loading_assets(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_project_get_uri(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_project_get_uri(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn list_assets(&self, filter: glib::types::Type) -> Vec<Asset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_project_list_assets(self.as_ref().to_glib_none().0, filter.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_project_list_assets(self.as_ref().to_glib_none().0, filter.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn list_encoding_profiles(&self) -> Vec<gst_pbutils::EncodingProfile> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_project_list_encoding_profiles(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_project_list_encoding_profiles(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn load<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::ges_project_load(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, &mut error);
|
||||
let _ = ges_sys::ges_project_load(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_asset<P: IsA<Asset>>(&self, asset: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_project_remove_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to remove asset")
|
||||
glib_result_from_gboolean!(ges_sys::ges_project_remove_asset(self.as_ref().to_glib_none().0, asset.as_ref().to_glib_none().0), "Failed to remove asset")
|
||||
}
|
||||
}
|
||||
|
||||
fn save<'a, P: IsA<Timeline>, Q: IsA<Asset> + 'a, R: Into<Option<&'a Q>>>(&self, timeline: &P, uri: &str, formatter_asset: R, overwrite: bool) -> Result<(), Error> {
|
||||
let formatter_asset = formatter_asset.into();
|
||||
fn save<P: IsA<Timeline>, Q: IsA<Asset>>(&self, timeline: &P, uri: &str, formatter_asset: Option<&Q>, overwrite: bool) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::ges_project_save(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error);
|
||||
let _ = ges_sys::ges_project_save(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -209,37 +205,37 @@ impl<O: IsA<Project>> ProjectExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn asset_added_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn asset_added_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer)
|
||||
where P: IsA<Project> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn asset_loading_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn asset_loading_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer)
|
||||
where P: IsA<Project> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn asset_removed_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ffi::GESProject, asset: *mut ffi::GESAsset, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn asset_removed_trampoline<P, F: Fn(&P, &Asset) + 'static>(this: *mut ges_sys::GESProject, asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer)
|
||||
where P: IsA<Project> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(asset))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn error_loading_asset_trampoline<P, F: Fn(&P, &Error, &str, glib::types::Type) + 'static>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, id: *mut libc::c_char, extractable_type: glib_ffi::GType, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn error_loading_asset_trampoline<P, F: Fn(&P, &Error, &str, glib::types::Type) + 'static>(this: *mut ges_sys::GESProject, error: *mut glib_sys::GError, id: *mut libc::c_char, extractable_type: glib_sys::GType, f: glib_sys::gpointer)
|
||||
where P: IsA<Project> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &GString::from_glib_borrow(id), from_glib(extractable_type))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn loaded_trampoline<P, F: Fn(&P, &Timeline) + 'static>(this: *mut ffi::GESProject, timeline: *mut ffi::GESTimeline, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn loaded_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(), &from_glib_borrow(timeline))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn missing_uri_trampoline<P, F: Fn(&P, &Error, &Asset) -> Option<GString> + 'static>(this: *mut ffi::GESProject, error: *mut glib_ffi::GError, wrong_asset: *mut ffi::GESAsset, f: glib_ffi::gpointer) -> *mut libc::c_char
|
||||
unsafe extern "C" fn missing_uri_trampoline<P, F: Fn(&P, &Error, &Asset) -> Option<GString> + 'static>(this: *mut ges_sys::GESProject, error: *mut glib_sys::GError, wrong_asset: *mut ges_sys::GESAsset, f: glib_sys::gpointer) -> *mut libc::c_char
|
||||
where P: IsA<Project> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Project::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(error), &from_glib_borrow(wrong_asset)).to_glib_full()
|
||||
|
|
|
@ -10,24 +10,24 @@ use Layer;
|
|||
use TimelineElement;
|
||||
use Track;
|
||||
use TrackElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Timeline(Object<ffi::GESTimeline, ffi::GESTimelineClass, TimelineClass>) @extends gst::Element, gst::Object, @implements Extractable;
|
||||
pub struct Timeline(Object<ges_sys::GESTimeline, ges_sys::GESTimelineClass, TimelineClass>) @extends gst::Element, gst::Object, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_timeline_get_type(),
|
||||
get_type => || ges_sys::ges_timeline_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,14 +35,14 @@ impl Timeline {
|
|||
pub fn new() -> Timeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_new())
|
||||
from_glib_none(ges_sys::ges_timeline_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_audio_video() -> Timeline {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_new_audio_video())
|
||||
from_glib_none(ges_sys::ges_timeline_new_audio_video())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl Timeline {
|
|||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
||||
let ret = ges_sys::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ pub trait TimelineExt: 'static {
|
|||
|
||||
fn remove_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn save_to_uri<'a, P: IsA<Asset> + 'a, Q: Into<Option<&'a P>>>(&self, uri: &str, formatter_asset: Q, overwrite: bool) -> Result<(), Error>;
|
||||
fn save_to_uri<P: IsA<Asset>>(&self, uri: &str, formatter_asset: Option<&P>, overwrite: bool) -> Result<(), Error>;
|
||||
|
||||
fn set_auto_transition(&self, auto_transition: bool);
|
||||
|
||||
|
@ -143,150 +143,149 @@ pub trait TimelineExt: 'static {
|
|||
impl<O: IsA<Timeline>> TimelineExt for O {
|
||||
fn add_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_add_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to add layer")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_add_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to add layer")
|
||||
}
|
||||
}
|
||||
|
||||
fn add_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_add_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_full()), "Failed to add track")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_add_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_full()), "Failed to add track")
|
||||
}
|
||||
}
|
||||
|
||||
fn append_layer(&self) -> Layer {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_append_layer(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_timeline_append_layer(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn commit(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_commit(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_commit(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn commit_sync(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_commit_sync(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_commit_sync(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_auto_transition(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_get_auto_transition(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_get_auto_transition(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_get_duration(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_get_duration(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_element(&self, name: &str) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_get_element(self.as_ref().to_glib_none().0, name.to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_timeline_get_element(self.as_ref().to_glib_none().0, name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_groups(&self) -> Vec<Group> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_timeline_get_groups(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_timeline_get_groups(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_layer(&self, priority: u32) -> Option<Layer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_get_layer(self.as_ref().to_glib_none().0, priority))
|
||||
from_glib_full(ges_sys::ges_timeline_get_layer(self.as_ref().to_glib_none().0, priority))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_layers(&self) -> Vec<Layer> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_layers(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_layers(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_pad_for_track<P: IsA<Track>>(&self, track: &P) -> Option<gst::Pad> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_get_pad_for_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_timeline_get_pad_for_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_snapping_distance(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_get_snapping_distance(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_get_snapping_distance(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_track_for_pad<P: IsA<gst::Pad>>(&self, pad: &P) -> Option<Track> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_get_track_for_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_timeline_get_track_for_pad(self.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tracks(&self) -> Vec<Track> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_timeline_get_tracks(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_timeline_get_tracks(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_empty(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_is_empty(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_is_empty(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn load_from_uri(&self, uri: &str) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::ges_timeline_load_from_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error);
|
||||
let _ = ges_sys::ges_timeline_load_from_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn move_layer<P: IsA<Layer>>(&self, layer: &P, new_layer_priority: u32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_move_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0, new_layer_priority), "Failed to move layer")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_move_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0, new_layer_priority), "Failed to move layer")
|
||||
}
|
||||
}
|
||||
|
||||
fn paste_element<P: IsA<TimelineElement>>(&self, element: &P, position: gst::ClockTime, layer_priority: i32) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_paste_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, position.to_glib(), layer_priority))
|
||||
from_glib_none(ges_sys::ges_timeline_paste_element(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, position.to_glib(), layer_priority))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_layer<P: IsA<Layer>>(&self, layer: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_remove_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to remove layer")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_remove_layer(self.as_ref().to_glib_none().0, layer.as_ref().to_glib_none().0), "Failed to remove layer")
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_track<P: IsA<Track>>(&self, track: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_remove_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0), "Failed to remove track")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_remove_track(self.as_ref().to_glib_none().0, track.as_ref().to_glib_none().0), "Failed to remove track")
|
||||
}
|
||||
}
|
||||
|
||||
fn save_to_uri<'a, P: IsA<Asset> + 'a, Q: Into<Option<&'a P>>>(&self, uri: &str, formatter_asset: Q, overwrite: bool) -> Result<(), Error> {
|
||||
let formatter_asset = formatter_asset.into();
|
||||
fn save_to_uri<P: IsA<Asset>>(&self, uri: &str, formatter_asset: Option<&P>, overwrite: bool) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::ges_timeline_save_to_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error);
|
||||
let _ = ges_sys::ges_timeline_save_to_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0, formatter_asset.map(|p| p.as_ref()).to_glib_none().0, overwrite.to_glib(), &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn set_auto_transition(&self, auto_transition: bool) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib());
|
||||
ges_sys::ges_timeline_set_auto_transition(self.as_ref().to_glib_none().0, auto_transition.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_snapping_distance(&self, snapping_distance: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_set_snapping_distance(self.as_ref().to_glib_none().0, snapping_distance.to_glib());
|
||||
ges_sys::ges_timeline_set_snapping_distance(self.as_ref().to_glib_none().0, snapping_distance.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -387,67 +386,67 @@ impl<O: IsA<Timeline>> TimelineExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimeline, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimeline, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn group_added_trampoline<P, F: Fn(&P, &Group) + 'static>(this: *mut ffi::GESTimeline, group: *mut ffi::GESGroup, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn group_added_trampoline<P, F: Fn(&P, &Group) + 'static>(this: *mut ges_sys::GESTimeline, group: *mut ges_sys::GESGroup, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(group))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn layer_added_trampoline<P, F: Fn(&P, &Layer) + 'static>(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn layer_added_trampoline<P, F: Fn(&P, &Layer) + 'static>(this: *mut ges_sys::GESTimeline, layer: *mut ges_sys::GESLayer, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn layer_removed_trampoline<P, F: Fn(&P, &Layer) + 'static>(this: *mut ffi::GESTimeline, layer: *mut ffi::GESLayer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn layer_removed_trampoline<P, F: Fn(&P, &Layer) + 'static>(this: *mut ges_sys::GESTimeline, layer: *mut ges_sys::GESLayer, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(layer))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn snapping_ended_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn snapping_ended_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn snapping_started_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ffi::GESTimeline, object: *mut ffi::GESTrackElement, p0: *mut ffi::GESTrackElement, p1: u64, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn snapping_started_trampoline<P, F: Fn(&P, &TrackElement, &TrackElement, u64) + 'static>(this: *mut ges_sys::GESTimeline, object: *mut ges_sys::GESTrackElement, p0: *mut ges_sys::GESTrackElement, p1: u64, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object), &from_glib_borrow(p0), p1)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn track_added_trampoline<P, F: Fn(&P, &Track) + 'static>(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn track_added_trampoline<P, F: Fn(&P, &Track) + 'static>(this: *mut ges_sys::GESTimeline, track: *mut ges_sys::GESTrack, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn track_removed_trampoline<P, F: Fn(&P, &Track) + 'static>(this: *mut ffi::GESTimeline, track: *mut ffi::GESTrack, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn track_removed_trampoline<P, F: Fn(&P, &Track) + 'static>(this: *mut ges_sys::GESTimeline, track: *mut ges_sys::GESTrack, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(track))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_auto_transition_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_snapping_distance_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimeline, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_snapping_distance_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimeline, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<Timeline> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Timeline::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Extractable;
|
||||
use Timeline;
|
||||
use TrackType;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
|
@ -15,17 +15,17 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass, TimelineElementClass>) @implements Extractable;
|
||||
pub struct TimelineElement(Object<ges_sys::GESTimelineElement, ges_sys::GESTimelineElementClass, TimelineElementClass>) @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_timeline_element_get_type(),
|
||||
get_type => || ges_sys::ges_timeline_element_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime);
|
||||
|
||||
fn set_name<'a, P: Into<Option<&'a str>>>(&self, name: P) -> Result<(), glib::error::BoolError>;
|
||||
fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> Result<(), glib::error::BoolError>;
|
||||
|
||||
|
@ -137,229 +137,228 @@ pub trait TimelineElementExt: 'static {
|
|||
|
||||
impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
||||
//fn add_child_property<P: IsA<glib::Object>>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_add_child_property() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_add_child_property() }
|
||||
//}
|
||||
|
||||
fn copy(&self, deep: bool) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_element_copy(self.as_ref().to_glib_none().0, deep.to_glib()))
|
||||
from_glib_none(ges_sys::ges_timeline_element_copy(self.as_ref().to_glib_none().0, deep.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_get_child_properties() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() }
|
||||
//}
|
||||
|
||||
//fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property() }
|
||||
//}
|
||||
|
||||
//fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property_by_pspec() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_by_pspec() }
|
||||
//}
|
||||
|
||||
//fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_get_child_property_valist() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_valist() }
|
||||
//}
|
||||
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_element_get_duration(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_element_get_duration(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_inpoint(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_element_get_inpoint(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_element_get_inpoint(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_max_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_element_get_max_duration(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_element_get_max_duration(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_name(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_element_get_name(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_name(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_parent(&self) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_element_get_parent(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_parent(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_priority(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0)
|
||||
ges_sys::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_start(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_element_get_start(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_element_get_start(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_element_get_timeline(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_timeline(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_toplevel_parent(&self) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::ges_timeline_element_get_toplevel_parent(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(ges_sys::ges_timeline_element_get_toplevel_parent(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_track_types(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_timeline_element_get_track_types(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_timeline_element_get_track_types(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec> {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_list_children_properties() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_list_children_properties() }
|
||||
//}
|
||||
|
||||
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object> {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_lookup_child() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_lookup_child() }
|
||||
//}
|
||||
|
||||
fn paste(&self, paste_position: gst::ClockTime) -> Option<TimelineElement> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_timeline_element_paste(self.as_ref().to_glib_none().0, paste_position.to_glib()))
|
||||
from_glib_none(ges_sys::ges_timeline_element_paste(self.as_ref().to_glib_none().0, paste_position.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
//fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_remove_child_property() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_remove_child_property() }
|
||||
//}
|
||||
|
||||
fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to ripple")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to ripple")
|
||||
}
|
||||
}
|
||||
|
||||
fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_ripple_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to ripple")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_ripple_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to ripple")
|
||||
}
|
||||
}
|
||||
|
||||
fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to roll")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.to_glib()), "Failed to roll")
|
||||
}
|
||||
}
|
||||
|
||||
fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_roll_start(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to roll")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_roll_start(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to roll")
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_set_child_properties() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_properties() }
|
||||
//}
|
||||
|
||||
//fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property() }
|
||||
//}
|
||||
|
||||
//fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property_by_pspec() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_by_pspec() }
|
||||
//}
|
||||
|
||||
//fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
|
||||
// unsafe { TODO: call ffi::ges_timeline_element_set_child_property_valist() }
|
||||
// unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() }
|
||||
//}
|
||||
|
||||
fn set_duration(&self, duration: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib());
|
||||
ges_sys::ges_timeline_element_set_duration(self.as_ref().to_glib_none().0, duration.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_inpoint(&self, inpoint: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib());
|
||||
ges_sys::ges_timeline_element_set_inpoint(self.as_ref().to_glib_none().0, inpoint.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_max_duration(&self, maxduration: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib());
|
||||
ges_sys::ges_timeline_element_set_max_duration(self.as_ref().to_glib_none().0, maxduration.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_name<'a, P: Into<Option<&'a str>>>(&self, name: P) -> Result<(), glib::error::BoolError> {
|
||||
let name = name.into();
|
||||
fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set name")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0), "Failed to set name")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "`TimelineElement` already had a parent or its parent was the same as specified")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_parent(self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0), "`TimelineElement` already had a parent or its parent was the same as specified")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_priority(&self, priority: u32) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
ges_sys::ges_timeline_element_set_priority(self.as_ref().to_glib_none().0, priority);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_start(&self, start: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib());
|
||||
ges_sys::ges_timeline_element_set_start(self.as_ref().to_glib_none().0, start.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0), "`Failed to set timeline")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0), "`Failed to set timeline")
|
||||
}
|
||||
}
|
||||
|
||||
fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()), "`Failed to trim")
|
||||
glib_result_from_gboolean!(ges_sys::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()), "`Failed to trim")
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_in_point(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_in_point(&self, in_point: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_serialize(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_serialize(&self, serialize: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -440,55 +439,55 @@ impl<O: IsA<TimelineElement>> TimelineElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_name_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_name_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_parent_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_parent_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_serialize_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_serialize_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTimelineElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<TimelineElement> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&TimelineElement::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Timeline;
|
||||
use TrackElement;
|
||||
use TrackType;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -14,17 +14,17 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Track(Object<ffi::GESTrack, ffi::GESTrackClass, TrackClass>) @extends gst::Element, gst::Object;
|
||||
pub struct Track(Object<ges_sys::GESTrack, ges_sys::GESTrackClass, TrackClass>) @extends gst::Element, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_track_get_type(),
|
||||
get_type => || ges_sys::ges_track_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ impl Track {
|
|||
pub fn new(type_: TrackType, caps: &gst::Caps) -> Track {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_new(type_.to_glib(), caps.to_glib_full()))
|
||||
from_glib_none(ges_sys::ges_track_new(type_.to_glib(), caps.to_glib_full()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,78 +86,78 @@ pub trait GESTrackExt: 'static {
|
|||
impl<O: IsA<Track>> GESTrackExt for O {
|
||||
fn add_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_track_add_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to add element")
|
||||
glib_result_from_gboolean!(ges_sys::ges_track_add_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to add element")
|
||||
}
|
||||
}
|
||||
|
||||
fn commit(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_track_commit(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_track_commit(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_get_caps(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_get_caps(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_elements(&self) -> Vec<TrackElement> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::ges_track_get_elements(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(ges_sys::ges_track_get_elements(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_mixing(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_track_get_mixing(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_track_get_mixing(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_timeline(&self) -> Option<Timeline> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_get_timeline(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_get_timeline(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_element<P: IsA<TrackElement>>(&self, object: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_track_remove_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to remove element")
|
||||
glib_result_from_gboolean!(ges_sys::ges_track_remove_element(self.as_ref().to_glib_none().0, object.as_ref().to_glib_none().0), "Failed to remove element")
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_create_element_for_gap_func<P: Fn(&Track) -> gst::Element + 'static>(&self, func: P) {
|
||||
// unsafe { TODO: call ffi::ges_track_set_create_element_for_gap_func() }
|
||||
// unsafe { TODO: call ges_sys:ges_track_set_create_element_for_gap_func() }
|
||||
//}
|
||||
|
||||
fn set_mixing(&self, mixing: bool) {
|
||||
unsafe {
|
||||
ffi::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib());
|
||||
ges_sys::ges_track_set_mixing(self.as_ref().to_glib_none().0, mixing.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_restriction_caps(&self, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
ffi::ges_track_set_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
ges_sys::ges_track_set_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) {
|
||||
unsafe {
|
||||
ffi::ges_track_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0);
|
||||
ges_sys::ges_track_set_timeline(self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn update_restriction_caps(&self, caps: &gst::Caps) {
|
||||
unsafe {
|
||||
ffi::ges_track_update_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
ges_sys::ges_track_update_restriction_caps(self.as_ref().to_glib_none().0, caps.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_duration(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn get_property_restriction_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Caps as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"restriction-caps\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
fn get_property_track_type(&self) -> TrackType {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<TrackType as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"track-type\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -227,37 +227,37 @@ impl<O: IsA<Track>> GESTrackExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrack, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn commited_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESTrack, f: glib_sys::gpointer)
|
||||
where P: IsA<Track> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Track::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn track_element_added_trampoline<P, F: Fn(&P, &TrackElement) + 'static>(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn track_element_added_trampoline<P, F: Fn(&P, &TrackElement) + 'static>(this: *mut ges_sys::GESTrack, effect: *mut ges_sys::GESTrackElement, f: glib_sys::gpointer)
|
||||
where P: IsA<Track> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn track_element_removed_trampoline<P, F: Fn(&P, &TrackElement) + 'static>(this: *mut ffi::GESTrack, effect: *mut ffi::GESTrackElement, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn track_element_removed_trampoline<P, F: Fn(&P, &TrackElement) + 'static>(this: *mut ges_sys::GESTrack, effect: *mut ges_sys::GESTrackElement, f: glib_sys::gpointer)
|
||||
where P: IsA<Track> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&Track::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(effect))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_duration_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mixing_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_mixing_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_restriction_caps_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrack, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_restriction_caps_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())
|
||||
|
|
|
@ -9,7 +9,7 @@ use Layer;
|
|||
use TimelineElement;
|
||||
use Track;
|
||||
use TrackType;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
|
@ -19,17 +19,17 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct TrackElement(Object<ffi::GESTrackElement, ffi::GESTrackElementClass, TrackElementClass>) @extends TimelineElement, @implements Extractable;
|
||||
pub struct TrackElement(Object<ges_sys::GESTrackElement, ges_sys::GESTrackElementClass, TrackElementClass>) @extends TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_track_element_get_type(),
|
||||
get_type => || ges_sys::ges_track_element_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,90 +82,90 @@ pub trait TrackElementExt: 'static {
|
|||
impl<O: IsA<TrackElement>> TrackElementExt for O {
|
||||
fn add_children_props<P: IsA<gst::Element>>(&self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str]) {
|
||||
unsafe {
|
||||
ffi::ges_track_element_add_children_props(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0);
|
||||
ges_sys::ges_track_element_add_children_props(self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn edit(&self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_track_element_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.to_glib(), edge.to_glib(), position), "Failed to edit")
|
||||
glib_result_from_gboolean!(ges_sys::ges_track_element_edit(self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.to_glib(), edge.to_glib(), position), "Failed to edit")
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 } {
|
||||
// unsafe { TODO: call ffi::ges_track_element_get_all_control_bindings() }
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_get_all_control_bindings() }
|
||||
//}
|
||||
|
||||
//fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding> {
|
||||
// unsafe { TODO: call ffi::ges_track_element_get_control_binding() }
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_get_control_binding() }
|
||||
//}
|
||||
|
||||
fn get_element(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_element_get_element(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_element_get_element(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gnlobject(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_element_get_gnlobject(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_element_get_gnlobject(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_nleobject(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_element_get_nleobject(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_element_get_nleobject(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_track(&self) -> Option<Track> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_track_element_get_track(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_track_element_get_track(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_track_type(&self) -> TrackType {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_track_element_get_track_type(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_track_element_get_track_type(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_active(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_track_element_is_active(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_track_element_is_active(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element> {
|
||||
// unsafe { TODO: call ffi::ges_track_element_lookup_child() }
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_lookup_child() }
|
||||
//}
|
||||
|
||||
fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::ges_track_element_remove_control_binding(self.as_ref().to_glib_none().0, property_name.to_glib_none().0), "Failed to remove control binding")
|
||||
glib_result_from_gboolean!(ges_sys::ges_track_element_remove_control_binding(self.as_ref().to_glib_none().0, property_name.to_glib_none().0), "Failed to remove control binding")
|
||||
}
|
||||
}
|
||||
|
||||
fn set_active(&self, active: bool) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_track_element_set_active(self.as_ref().to_glib_none().0, active.to_glib()))
|
||||
from_glib(ges_sys::ges_track_element_set_active(self.as_ref().to_glib_none().0, active.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool {
|
||||
// unsafe { TODO: call ffi::ges_track_element_set_control_source() }
|
||||
// unsafe { TODO: call ges_sys:ges_track_element_set_control_source() }
|
||||
//}
|
||||
|
||||
fn set_track_type(&self, type_: TrackType) {
|
||||
unsafe {
|
||||
ffi::ges_track_element_set_track_type(self.as_ref().to_glib_none().0, type_.to_glib());
|
||||
ges_sys::ges_track_element_set_track_type(self.as_ref().to_glib_none().0, type_.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_active(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -203,19 +203,19 @@ impl<O: IsA<TrackElement>> TrackElementExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_active_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_active_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_track_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_track_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_track_type_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESTrackElement, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_track_type_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())
|
||||
|
|
|
@ -6,7 +6,7 @@ use Clip;
|
|||
use Container;
|
||||
use Extractable;
|
||||
use TimelineElement;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -15,16 +15,16 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriClip(Object<ffi::GESUriClip, ffi::GESUriClipClass, UriClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable;
|
||||
pub struct UriClip(Object<ges_sys::GESUriClip, ges_sys::GESUriClipClass, UriClipClass>) @extends Clip, Container, TimelineElement, @implements Extractable;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_uri_clip_get_type(),
|
||||
get_type => || ges_sys::ges_uri_clip_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ impl UriClip {
|
|||
pub fn new(uri: &str) -> Option<UriClip> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_clip_new(uri.to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_uri_clip_new(uri.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,38 +64,38 @@ pub trait UriClipExt: 'static {
|
|||
impl<O: IsA<UriClip>> UriClipExt for O {
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_uri_clip_get_uri(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_uri_clip_is_image(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_uri_clip_is_image(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_muted(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_uri_clip_is_muted(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_is_image(&self, is_image: bool) {
|
||||
unsafe {
|
||||
ffi::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib());
|
||||
ges_sys::ges_uri_clip_set_is_image(self.as_ref().to_glib_none().0, is_image.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_mute(&self, mute: bool) {
|
||||
unsafe {
|
||||
ffi::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
ges_sys::ges_uri_clip_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_is_image(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"is-image\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
fn get_property_mute(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"mute\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -133,19 +133,19 @@ impl<O: IsA<UriClip>> UriClipExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_is_image_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_is_image_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<UriClip> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&UriClip::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<UriClip> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&UriClip::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESUriClip, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_supported_formats_trampoline<P, F: Fn(&P) + 'static>(this: *mut ges_sys::GESUriClip, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<UriClip> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&UriClip::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
use Asset;
|
||||
use Error;
|
||||
use UriSourceAsset;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_pbutils;
|
||||
use std::boxed::Box as Box_;
|
||||
|
@ -21,23 +21,23 @@ use std::mem::transmute;
|
|||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriClipAsset(Object<ffi::GESUriClipAsset, ffi::GESUriClipAssetClass, UriClipAssetClass>) @extends Asset;
|
||||
pub struct UriClipAsset(Object<ges_sys::GESUriClipAsset, ges_sys::GESUriClipAssetClass, UriClipAssetClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_uri_clip_asset_get_type(),
|
||||
get_type => || ges_sys::ges_uri_clip_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl UriClipAsset {
|
||||
//pub fn new<'a, P: IsA<gio::Cancellable> + 'a, Q: Into<Option<&'a P>>, R: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Q, callback: R) {
|
||||
// unsafe { TODO: call ffi::ges_uri_clip_asset_new() }
|
||||
//pub fn new<P: IsA<gio::Cancellable>, Q: FnOnce(Result<(), Error>) + 'static>(uri: &str, cancellable: Option<&P>, callback: Q) {
|
||||
// unsafe { TODO: call ges_sys:ges_uri_clip_asset_new() }
|
||||
//}
|
||||
|
||||
pub fn request_sync(uri: &str) -> Result<Option<UriClipAsset>, Error> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
||||
let ret = ges_sys::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_none(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -62,31 +62,31 @@ pub trait UriClipAssetExt: 'static {
|
|||
impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
||||
fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_uri_clip_asset_get_duration(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_uri_clip_asset_get_duration(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_info(&self) -> Option<gst_pbutils::DiscovererInfo> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_clip_asset_get_info(const_override(self.as_ref().to_glib_none().0)))
|
||||
from_glib_none(ges_sys::ges_uri_clip_asset_get_info(const_override(self.as_ref().to_glib_none().0)))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_assets(&self) -> Vec<UriSourceAsset> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::ges_uri_clip_asset_get_stream_assets(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(ges_sys::ges_uri_clip_asset_get_stream_assets(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::ges_uri_clip_asset_is_image(self.as_ref().to_glib_none().0))
|
||||
from_glib(ges_sys::ges_uri_clip_asset_is_image(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_duration(&self, duration: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"duration\0".as_ptr() as *const _, Value::from(&duration).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ impl<O: IsA<UriClipAsset>> UriClipAssetExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GESUriClipAsset, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_duration_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())
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
use Asset;
|
||||
use UriClipAsset;
|
||||
use ffi;
|
||||
use ges_sys;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct UriSourceAsset(Object<ffi::GESUriSourceAsset, ffi::GESUriSourceAssetClass, UriSourceAssetClass>) @extends Asset;
|
||||
pub struct UriSourceAsset(Object<ges_sys::GESUriSourceAsset, ges_sys::GESUriSourceAssetClass, UriSourceAssetClass>) @extends Asset;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::ges_uri_source_asset_get_type(),
|
||||
get_type => || ges_sys::ges_uri_source_asset_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,19 +31,19 @@ pub trait UriSourceAssetExt: 'static {
|
|||
impl<O: IsA<UriSourceAsset>> UriSourceAssetExt for O {
|
||||
fn get_filesource_asset(&self) -> Option<UriClipAsset> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_filesource_asset(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_filesource_asset(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_info(&self) -> Option<gst_pbutils::DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_stream_info(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_stream_info(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::ges_uri_source_asset_get_stream_uri(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(ges_sys::ges_uri_source_asset_get_stream_uri(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::Quark;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
|
@ -12,7 +11,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_gl_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -29,24 +29,24 @@ pub enum GLContextError {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLContextError {
|
||||
type GlibType = ffi::GstGLContextError;
|
||||
type GlibType = gst_gl_sys::GstGLContextError;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLContextError {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLContextError {
|
||||
match *self {
|
||||
GLContextError::Failed => ffi::GST_GL_CONTEXT_ERROR_FAILED,
|
||||
GLContextError::WrongConfig => ffi::GST_GL_CONTEXT_ERROR_WRONG_CONFIG,
|
||||
GLContextError::WrongApi => ffi::GST_GL_CONTEXT_ERROR_WRONG_API,
|
||||
GLContextError::OldLibs => ffi::GST_GL_CONTEXT_ERROR_OLD_LIBS,
|
||||
GLContextError::CreateContext => ffi::GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
|
||||
GLContextError::ResourceUnavailable => ffi::GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE,
|
||||
GLContextError::Failed => gst_gl_sys::GST_GL_CONTEXT_ERROR_FAILED,
|
||||
GLContextError::WrongConfig => gst_gl_sys::GST_GL_CONTEXT_ERROR_WRONG_CONFIG,
|
||||
GLContextError::WrongApi => gst_gl_sys::GST_GL_CONTEXT_ERROR_WRONG_API,
|
||||
GLContextError::OldLibs => gst_gl_sys::GST_GL_CONTEXT_ERROR_OLD_LIBS,
|
||||
GLContextError::CreateContext => gst_gl_sys::GST_GL_CONTEXT_ERROR_CREATE_CONTEXT,
|
||||
GLContextError::ResourceUnavailable => gst_gl_sys::GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE,
|
||||
GLContextError::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLContextError> for GLContextError {
|
||||
fn from_glib(value: ffi::GstGLContextError) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLContextError> for GLContextError {
|
||||
fn from_glib(value: gst_gl_sys::GstGLContextError) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLContextError::Failed,
|
||||
|
@ -63,7 +63,7 @@ impl FromGlib<ffi::GstGLContextError> for GLContextError {
|
|||
impl ErrorDomain for GLContextError {
|
||||
fn domain() -> Quark {
|
||||
skip_assert_initialized!();
|
||||
unsafe { from_glib(ffi::gst_gl_context_error_quark()) }
|
||||
unsafe { from_glib(gst_gl_sys::gst_gl_context_error_quark()) }
|
||||
}
|
||||
|
||||
fn code(self) -> i32 {
|
||||
|
@ -107,32 +107,32 @@ pub enum GLFormat {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLFormat {
|
||||
type GlibType = ffi::GstGLFormat;
|
||||
type GlibType = gst_gl_sys::GstGLFormat;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLFormat {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLFormat {
|
||||
match *self {
|
||||
GLFormat::Luminance => ffi::GST_GL_LUMINANCE,
|
||||
GLFormat::Alpha => ffi::GST_GL_ALPHA,
|
||||
GLFormat::LuminanceAlpha => ffi::GST_GL_LUMINANCE_ALPHA,
|
||||
GLFormat::Red => ffi::GST_GL_RED,
|
||||
GLFormat::R8 => ffi::GST_GL_R8,
|
||||
GLFormat::Rg => ffi::GST_GL_RG,
|
||||
GLFormat::Rg8 => ffi::GST_GL_RG8,
|
||||
GLFormat::Rgb => ffi::GST_GL_RGB,
|
||||
GLFormat::Rgb8 => ffi::GST_GL_RGB8,
|
||||
GLFormat::Rgb565 => ffi::GST_GL_RGB565,
|
||||
GLFormat::Rgba => ffi::GST_GL_RGBA,
|
||||
GLFormat::Rgba8 => ffi::GST_GL_RGBA8,
|
||||
GLFormat::DepthComponent16 => ffi::GST_GL_DEPTH_COMPONENT16,
|
||||
GLFormat::Depth24Stencil8 => ffi::GST_GL_DEPTH24_STENCIL8,
|
||||
GLFormat::Luminance => gst_gl_sys::GST_GL_LUMINANCE,
|
||||
GLFormat::Alpha => gst_gl_sys::GST_GL_ALPHA,
|
||||
GLFormat::LuminanceAlpha => gst_gl_sys::GST_GL_LUMINANCE_ALPHA,
|
||||
GLFormat::Red => gst_gl_sys::GST_GL_RED,
|
||||
GLFormat::R8 => gst_gl_sys::GST_GL_R8,
|
||||
GLFormat::Rg => gst_gl_sys::GST_GL_RG,
|
||||
GLFormat::Rg8 => gst_gl_sys::GST_GL_RG8,
|
||||
GLFormat::Rgb => gst_gl_sys::GST_GL_RGB,
|
||||
GLFormat::Rgb8 => gst_gl_sys::GST_GL_RGB8,
|
||||
GLFormat::Rgb565 => gst_gl_sys::GST_GL_RGB565,
|
||||
GLFormat::Rgba => gst_gl_sys::GST_GL_RGBA,
|
||||
GLFormat::Rgba8 => gst_gl_sys::GST_GL_RGBA8,
|
||||
GLFormat::DepthComponent16 => gst_gl_sys::GST_GL_DEPTH_COMPONENT16,
|
||||
GLFormat::Depth24Stencil8 => gst_gl_sys::GST_GL_DEPTH24_STENCIL8,
|
||||
GLFormat::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLFormat> for GLFormat {
|
||||
fn from_glib(value: ffi::GstGLFormat) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLFormat> for GLFormat {
|
||||
fn from_glib(value: gst_gl_sys::GstGLFormat) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
6409 => GLFormat::Luminance,
|
||||
|
@ -166,21 +166,21 @@ pub enum GLQueryType {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLQueryType {
|
||||
type GlibType = ffi::GstGLQueryType;
|
||||
type GlibType = gst_gl_sys::GstGLQueryType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLQueryType {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLQueryType {
|
||||
match *self {
|
||||
GLQueryType::None => ffi::GST_GL_QUERY_NONE,
|
||||
GLQueryType::TimeElapsed => ffi::GST_GL_QUERY_TIME_ELAPSED,
|
||||
GLQueryType::Timestamp => ffi::GST_GL_QUERY_TIMESTAMP,
|
||||
GLQueryType::None => gst_gl_sys::GST_GL_QUERY_NONE,
|
||||
GLQueryType::TimeElapsed => gst_gl_sys::GST_GL_QUERY_TIME_ELAPSED,
|
||||
GLQueryType::Timestamp => gst_gl_sys::GST_GL_QUERY_TIMESTAMP,
|
||||
GLQueryType::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLQueryType> for GLQueryType {
|
||||
fn from_glib(value: ffi::GstGLQueryType) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLQueryType> for GLQueryType {
|
||||
fn from_glib(value: gst_gl_sys::GstGLQueryType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLQueryType::None,
|
||||
|
@ -203,21 +203,21 @@ pub enum GLSLError {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLSLError {
|
||||
type GlibType = ffi::GstGLSLError;
|
||||
type GlibType = gst_gl_sys::GstGLSLError;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLSLError {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLSLError {
|
||||
match *self {
|
||||
GLSLError::Compile => ffi::GST_GLSL_ERROR_COMPILE,
|
||||
GLSLError::Link => ffi::GST_GLSL_ERROR_LINK,
|
||||
GLSLError::Program => ffi::GST_GLSL_ERROR_PROGRAM,
|
||||
GLSLError::Compile => gst_gl_sys::GST_GLSL_ERROR_COMPILE,
|
||||
GLSLError::Link => gst_gl_sys::GST_GLSL_ERROR_LINK,
|
||||
GLSLError::Program => gst_gl_sys::GST_GLSL_ERROR_PROGRAM,
|
||||
GLSLError::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLSLError> for GLSLError {
|
||||
fn from_glib(value: ffi::GstGLSLError) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLSLError> for GLSLError {
|
||||
fn from_glib(value: gst_gl_sys::GstGLSLError) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLSLError::Compile,
|
||||
|
@ -231,7 +231,7 @@ impl FromGlib<ffi::GstGLSLError> for GLSLError {
|
|||
impl ErrorDomain for GLSLError {
|
||||
fn domain() -> Quark {
|
||||
skip_assert_initialized!();
|
||||
unsafe { from_glib(ffi::gst_glsl_error_quark()) }
|
||||
unsafe { from_glib(gst_gl_sys::gst_glsl_error_quark()) }
|
||||
}
|
||||
|
||||
fn code(self) -> i32 {
|
||||
|
@ -275,35 +275,35 @@ pub enum GLSLVersion {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLSLVersion {
|
||||
type GlibType = ffi::GstGLSLVersion;
|
||||
type GlibType = gst_gl_sys::GstGLSLVersion;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLSLVersion {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLSLVersion {
|
||||
match *self {
|
||||
GLSLVersion::None => ffi::GST_GLSL_VERSION_NONE,
|
||||
GLSLVersion::_100 => ffi::GST_GLSL_VERSION_100,
|
||||
GLSLVersion::_110 => ffi::GST_GLSL_VERSION_110,
|
||||
GLSLVersion::_120 => ffi::GST_GLSL_VERSION_120,
|
||||
GLSLVersion::_130 => ffi::GST_GLSL_VERSION_130,
|
||||
GLSLVersion::_140 => ffi::GST_GLSL_VERSION_140,
|
||||
GLSLVersion::_150 => ffi::GST_GLSL_VERSION_150,
|
||||
GLSLVersion::_300 => ffi::GST_GLSL_VERSION_300,
|
||||
GLSLVersion::_310 => ffi::GST_GLSL_VERSION_310,
|
||||
GLSLVersion::_320 => ffi::GST_GLSL_VERSION_320,
|
||||
GLSLVersion::_330 => ffi::GST_GLSL_VERSION_330,
|
||||
GLSLVersion::_400 => ffi::GST_GLSL_VERSION_400,
|
||||
GLSLVersion::_410 => ffi::GST_GLSL_VERSION_410,
|
||||
GLSLVersion::_420 => ffi::GST_GLSL_VERSION_420,
|
||||
GLSLVersion::_430 => ffi::GST_GLSL_VERSION_430,
|
||||
GLSLVersion::_440 => ffi::GST_GLSL_VERSION_440,
|
||||
GLSLVersion::_450 => ffi::GST_GLSL_VERSION_450,
|
||||
GLSLVersion::None => gst_gl_sys::GST_GLSL_VERSION_NONE,
|
||||
GLSLVersion::_100 => gst_gl_sys::GST_GLSL_VERSION_100,
|
||||
GLSLVersion::_110 => gst_gl_sys::GST_GLSL_VERSION_110,
|
||||
GLSLVersion::_120 => gst_gl_sys::GST_GLSL_VERSION_120,
|
||||
GLSLVersion::_130 => gst_gl_sys::GST_GLSL_VERSION_130,
|
||||
GLSLVersion::_140 => gst_gl_sys::GST_GLSL_VERSION_140,
|
||||
GLSLVersion::_150 => gst_gl_sys::GST_GLSL_VERSION_150,
|
||||
GLSLVersion::_300 => gst_gl_sys::GST_GLSL_VERSION_300,
|
||||
GLSLVersion::_310 => gst_gl_sys::GST_GLSL_VERSION_310,
|
||||
GLSLVersion::_320 => gst_gl_sys::GST_GLSL_VERSION_320,
|
||||
GLSLVersion::_330 => gst_gl_sys::GST_GLSL_VERSION_330,
|
||||
GLSLVersion::_400 => gst_gl_sys::GST_GLSL_VERSION_400,
|
||||
GLSLVersion::_410 => gst_gl_sys::GST_GLSL_VERSION_410,
|
||||
GLSLVersion::_420 => gst_gl_sys::GST_GLSL_VERSION_420,
|
||||
GLSLVersion::_430 => gst_gl_sys::GST_GLSL_VERSION_430,
|
||||
GLSLVersion::_440 => gst_gl_sys::GST_GLSL_VERSION_440,
|
||||
GLSLVersion::_450 => gst_gl_sys::GST_GLSL_VERSION_450,
|
||||
GLSLVersion::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLSLVersion> for GLSLVersion {
|
||||
fn from_glib(value: ffi::GstGLSLVersion) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLSLVersion> for GLSLVersion {
|
||||
fn from_glib(value: gst_gl_sys::GstGLSLVersion) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLSLVersion::None,
|
||||
|
@ -340,21 +340,21 @@ pub enum GLStereoDownmix {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLStereoDownmix {
|
||||
type GlibType = ffi::GstGLStereoDownmix;
|
||||
type GlibType = gst_gl_sys::GstGLStereoDownmix;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLStereoDownmix {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLStereoDownmix {
|
||||
match *self {
|
||||
GLStereoDownmix::GreenMagentaDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS,
|
||||
GLStereoDownmix::RedCyanDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS,
|
||||
GLStereoDownmix::AmberBlueDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS,
|
||||
GLStereoDownmix::GreenMagentaDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS,
|
||||
GLStereoDownmix::RedCyanDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_RED_CYAN_DUBOIS,
|
||||
GLStereoDownmix::AmberBlueDubois => gst_gl_sys::GST_GL_STEREO_DOWNMIX_ANAGLYPH_AMBER_BLUE_DUBOIS,
|
||||
GLStereoDownmix::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLStereoDownmix> for GLStereoDownmix {
|
||||
fn from_glib(value: ffi::GstGLStereoDownmix) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLStereoDownmix> for GLStereoDownmix {
|
||||
fn from_glib(value: gst_gl_sys::GstGLStereoDownmix) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLStereoDownmix::GreenMagentaDubois,
|
||||
|
@ -367,7 +367,7 @@ impl FromGlib<ffi::GstGLStereoDownmix> for GLStereoDownmix {
|
|||
|
||||
impl StaticType for GLStereoDownmix {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_gl_stereo_downmix_mode_get_type()) }
|
||||
unsafe { from_glib(gst_gl_sys::gst_gl_stereo_downmix_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,13 +379,13 @@ impl<'a> FromValueOptional<'a> for GLStereoDownmix {
|
|||
|
||||
impl<'a> FromValue<'a> for GLStereoDownmix {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for GLStereoDownmix {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -402,22 +402,22 @@ pub enum GLTextureTarget {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLTextureTarget {
|
||||
type GlibType = ffi::GstGLTextureTarget;
|
||||
type GlibType = gst_gl_sys::GstGLTextureTarget;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLTextureTarget {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLTextureTarget {
|
||||
match *self {
|
||||
GLTextureTarget::None => ffi::GST_GL_TEXTURE_TARGET_NONE,
|
||||
GLTextureTarget::_2d => ffi::GST_GL_TEXTURE_TARGET_2D,
|
||||
GLTextureTarget::Rectangle => ffi::GST_GL_TEXTURE_TARGET_RECTANGLE,
|
||||
GLTextureTarget::ExternalOes => ffi::GST_GL_TEXTURE_TARGET_EXTERNAL_OES,
|
||||
GLTextureTarget::None => gst_gl_sys::GST_GL_TEXTURE_TARGET_NONE,
|
||||
GLTextureTarget::_2d => gst_gl_sys::GST_GL_TEXTURE_TARGET_2D,
|
||||
GLTextureTarget::Rectangle => gst_gl_sys::GST_GL_TEXTURE_TARGET_RECTANGLE,
|
||||
GLTextureTarget::ExternalOes => gst_gl_sys::GST_GL_TEXTURE_TARGET_EXTERNAL_OES,
|
||||
GLTextureTarget::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLTextureTarget> for GLTextureTarget {
|
||||
fn from_glib(value: ffi::GstGLTextureTarget) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLTextureTarget> for GLTextureTarget {
|
||||
fn from_glib(value: gst_gl_sys::GstGLTextureTarget) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLTextureTarget::None,
|
||||
|
@ -442,22 +442,22 @@ pub enum GLUploadReturn {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLUploadReturn {
|
||||
type GlibType = ffi::GstGLUploadReturn;
|
||||
type GlibType = gst_gl_sys::GstGLUploadReturn;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLUploadReturn {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLUploadReturn {
|
||||
match *self {
|
||||
GLUploadReturn::Done => ffi::GST_GL_UPLOAD_DONE,
|
||||
GLUploadReturn::Error => ffi::GST_GL_UPLOAD_ERROR,
|
||||
GLUploadReturn::Unsupported => ffi::GST_GL_UPLOAD_UNSUPPORTED,
|
||||
GLUploadReturn::Reconfigure => ffi::GST_GL_UPLOAD_RECONFIGURE,
|
||||
GLUploadReturn::Done => gst_gl_sys::GST_GL_UPLOAD_DONE,
|
||||
GLUploadReturn::Error => gst_gl_sys::GST_GL_UPLOAD_ERROR,
|
||||
GLUploadReturn::Unsupported => gst_gl_sys::GST_GL_UPLOAD_UNSUPPORTED,
|
||||
GLUploadReturn::Reconfigure => gst_gl_sys::GST_GL_UPLOAD_RECONFIGURE,
|
||||
GLUploadReturn::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLUploadReturn> for GLUploadReturn {
|
||||
fn from_glib(value: ffi::GstGLUploadReturn) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLUploadReturn> for GLUploadReturn {
|
||||
fn from_glib(value: gst_gl_sys::GstGLUploadReturn) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
1 => GLUploadReturn::Done,
|
||||
|
@ -481,21 +481,21 @@ pub enum GLWindowError {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLWindowError {
|
||||
type GlibType = ffi::GstGLWindowError;
|
||||
type GlibType = gst_gl_sys::GstGLWindowError;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLWindowError {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLWindowError {
|
||||
match *self {
|
||||
GLWindowError::Failed => ffi::GST_GL_WINDOW_ERROR_FAILED,
|
||||
GLWindowError::OldLibs => ffi::GST_GL_WINDOW_ERROR_OLD_LIBS,
|
||||
GLWindowError::ResourceUnavailable => ffi::GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
|
||||
GLWindowError::Failed => gst_gl_sys::GST_GL_WINDOW_ERROR_FAILED,
|
||||
GLWindowError::OldLibs => gst_gl_sys::GST_GL_WINDOW_ERROR_OLD_LIBS,
|
||||
GLWindowError::ResourceUnavailable => gst_gl_sys::GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE,
|
||||
GLWindowError::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLWindowError> for GLWindowError {
|
||||
fn from_glib(value: ffi::GstGLWindowError) -> Self {
|
||||
impl FromGlib<gst_gl_sys::GstGLWindowError> for GLWindowError {
|
||||
fn from_glib(value: gst_gl_sys::GstGLWindowError) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => GLWindowError::Failed,
|
||||
|
@ -509,7 +509,7 @@ impl FromGlib<ffi::GstGLWindowError> for GLWindowError {
|
|||
impl ErrorDomain for GLWindowError {
|
||||
fn domain() -> Quark {
|
||||
skip_assert_initialized!();
|
||||
unsafe { from_glib(ffi::gst_gl_window_error_quark()) }
|
||||
unsafe { from_glib(gst_gl_sys::gst_gl_window_error_quark()) }
|
||||
}
|
||||
|
||||
fn code(self) -> i32 {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_gl_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct GLAPI: u32 {
|
||||
|
@ -18,16 +18,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLAPI {
|
||||
type GlibType = ffi::GstGLAPI;
|
||||
type GlibType = gst_gl_sys::GstGLAPI;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLAPI {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLAPI {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLAPI> for GLAPI {
|
||||
fn from_glib(value: ffi::GstGLAPI) -> GLAPI {
|
||||
impl FromGlib<gst_gl_sys::GstGLAPI> for GLAPI {
|
||||
fn from_glib(value: gst_gl_sys::GstGLAPI) -> GLAPI {
|
||||
skip_assert_initialized!();
|
||||
GLAPI::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -50,16 +50,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLDisplayType {
|
||||
type GlibType = ffi::GstGLDisplayType;
|
||||
type GlibType = gst_gl_sys::GstGLDisplayType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLDisplayType {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLDisplayType {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLDisplayType> for GLDisplayType {
|
||||
fn from_glib(value: ffi::GstGLDisplayType) -> GLDisplayType {
|
||||
impl FromGlib<gst_gl_sys::GstGLDisplayType> for GLDisplayType {
|
||||
fn from_glib(value: gst_gl_sys::GstGLDisplayType) -> GLDisplayType {
|
||||
skip_assert_initialized!();
|
||||
GLDisplayType::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -79,16 +79,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLPlatform {
|
||||
type GlibType = ffi::GstGLPlatform;
|
||||
type GlibType = gst_gl_sys::GstGLPlatform;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLPlatform {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLPlatform {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLPlatform> for GLPlatform {
|
||||
fn from_glib(value: ffi::GstGLPlatform) -> GLPlatform {
|
||||
impl FromGlib<gst_gl_sys::GstGLPlatform> for GLPlatform {
|
||||
fn from_glib(value: gst_gl_sys::GstGLPlatform) -> GLPlatform {
|
||||
skip_assert_initialized!();
|
||||
GLPlatform::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -106,16 +106,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for GLSLProfile {
|
||||
type GlibType = ffi::GstGLSLProfile;
|
||||
type GlibType = gst_gl_sys::GstGLSLProfile;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstGLSLProfile {
|
||||
fn to_glib(&self) -> gst_gl_sys::GstGLSLProfile {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstGLSLProfile> for GLSLProfile {
|
||||
fn from_glib(value: ffi::GstGLSLProfile) -> GLSLProfile {
|
||||
impl FromGlib<gst_gl_sys::GstGLSLProfile> for GLSLProfile {
|
||||
fn from_glib(value: gst_gl_sys::GstGLSLProfile) -> GLSLProfile {
|
||||
skip_assert_initialized!();
|
||||
GLSLProfile::from_bits_truncate(value)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLContext;
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -11,17 +10,18 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLBaseFilter(Object<ffi::GstGLBaseFilter, ffi::GstGLBaseFilterClass, GLBaseFilterClass>) @extends gst::Object;
|
||||
pub struct GLBaseFilter(Object<gst_gl_sys::GstGLBaseFilter, gst_gl_sys::GstGLBaseFilterClass, GLBaseFilterClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_base_filter_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_base_filter_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
|
|||
fn get_property_context(&self) -> Option<GLContext> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GLContext as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ impl<O: IsA<GLBaseFilter>> GLBaseFilterExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_context_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstGLBaseFilter, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_context_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLBaseFilter, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<GLBaseFilter> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&GLBaseFilter::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLContext;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLColorConvert(Object<ffi::GstGLColorConvert, ffi::GstGLColorConvertClass, GLColorConvertClass>) @extends gst::Object;
|
||||
pub struct GLColorConvert(Object<gst_gl_sys::GstGLColorConvert, gst_gl_sys::GstGLColorConvertClass, GLColorConvertClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_color_convert_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_color_convert_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,20 +21,20 @@ impl GLColorConvert {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P) -> GLColorConvert {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_color_convert_new(context.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_color_convert_new(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_color_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_color_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn transform_caps<P: IsA<GLContext>>(context: &P, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option<gst::Caps> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_color_convert_transform_caps(context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_color_convert_transform_caps(context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,19 +9,19 @@ use GLPlatform;
|
|||
use GLSLProfile;
|
||||
use GLSLVersion;
|
||||
use GLWindow;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLContext(Object<ffi::GstGLContext, ffi::GstGLContextClass, GLContextClass>) @extends gst::Object;
|
||||
pub struct GLContext(Object<gst_gl_sys::GstGLContext, gst_gl_sys::GstGLContextClass, GLContextClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_context_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_context_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,14 +29,14 @@ impl GLContext {
|
|||
pub fn new<P: IsA<GLDisplay>>(display: &P) -> GLContext {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_gl_context_new(display.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_gl_context_new(display.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current() -> Option<GLContext> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_gl_context_get_current())
|
||||
from_glib_none(gst_gl_sys::gst_gl_context_get_current())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ impl GLContext {
|
|||
unsafe {
|
||||
let mut major = mem::uninitialized();
|
||||
let mut minor = mem::uninitialized();
|
||||
let ret = from_glib(ffi::gst_gl_context_get_current_gl_api(platform.to_glib(), &mut major, &mut minor));
|
||||
let ret = from_glib(gst_gl_sys::gst_gl_context_get_current_gl_api(platform.to_glib(), &mut major, &mut minor));
|
||||
(ret, major, minor)
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ pub trait GLContextExt: 'static {
|
|||
|
||||
fn clear_shader(&self);
|
||||
|
||||
fn create<'a, P: IsA<GLContext> + 'a, Q: Into<Option<&'a P>>>(&self, other_context: Q) -> Result<(), Error>;
|
||||
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), Error>;
|
||||
|
||||
fn destroy(&self);
|
||||
|
||||
|
@ -103,84 +103,83 @@ pub trait GLContextExt: 'static {
|
|||
impl<O: IsA<GLContext>> GLContextExt for O {
|
||||
fn activate(&self, activate: bool) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_context_activate(self.as_ref().to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_context_activate(self.as_ref().to_glib_none().0, activate.to_glib()), "Failed to activate OpenGL context")
|
||||
}
|
||||
}
|
||||
|
||||
fn can_share<P: IsA<GLContext>>(&self, other_context: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_can_share(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_context_can_share(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn check_feature(&self, feature: &str) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_check_feature(self.as_ref().to_glib_none().0, feature.to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_context_check_feature(self.as_ref().to_glib_none().0, feature.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn check_framebuffer_status(&self, fbo_target: u32) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_check_framebuffer_status(self.as_ref().to_glib_none().0, fbo_target))
|
||||
from_glib(gst_gl_sys::gst_gl_context_check_framebuffer_status(self.as_ref().to_glib_none().0, fbo_target))
|
||||
}
|
||||
}
|
||||
|
||||
fn check_gl_version(&self, api: GLAPI, maj: i32, min: i32) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_check_gl_version(self.as_ref().to_glib_none().0, api.to_glib(), maj, min))
|
||||
from_glib(gst_gl_sys::gst_gl_context_check_gl_version(self.as_ref().to_glib_none().0, api.to_glib(), maj, min))
|
||||
}
|
||||
}
|
||||
|
||||
fn clear_framebuffer(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_context_clear_framebuffer(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_context_clear_framebuffer(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn clear_shader(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_context_clear_shader(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_context_clear_shader(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn create<'a, P: IsA<GLContext> + 'a, Q: Into<Option<&'a P>>>(&self, other_context: Q) -> Result<(), Error> {
|
||||
let other_context = other_context.into();
|
||||
fn create<P: IsA<GLContext>>(&self, other_context: Option<&P>) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_gl_context_create(self.as_ref().to_glib_none().0, other_context.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
let _ = gst_gl_sys::gst_gl_context_create(self.as_ref().to_glib_none().0, other_context.map(|p| p.as_ref()).to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn destroy(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_context_destroy(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_context_destroy(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn fill_info(&self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error);
|
||||
let _ = gst_gl_sys::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn get_display(&self) -> GLDisplay {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_context_get_display(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_context_get_display(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gl_api(&self) -> GLAPI {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_get_gl_api(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_context_get_gl_api(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gl_platform(&self) -> GLPlatform {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_get_gl_platform(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_context_get_gl_platform(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,7 +187,7 @@ impl<O: IsA<GLContext>> GLContextExt for O {
|
|||
unsafe {
|
||||
let mut major = mem::uninitialized();
|
||||
let mut minor = mem::uninitialized();
|
||||
ffi::gst_gl_context_get_gl_platform_version(self.as_ref().to_glib_none().0, &mut major, &mut minor);
|
||||
gst_gl_sys::gst_gl_context_get_gl_platform_version(self.as_ref().to_glib_none().0, &mut major, &mut minor);
|
||||
(major, minor)
|
||||
}
|
||||
}
|
||||
|
@ -197,44 +196,44 @@ impl<O: IsA<GLContext>> GLContextExt for O {
|
|||
unsafe {
|
||||
let mut maj = mem::uninitialized();
|
||||
let mut min = mem::uninitialized();
|
||||
ffi::gst_gl_context_get_gl_version(self.as_ref().to_glib_none().0, &mut maj, &mut min);
|
||||
gst_gl_sys::gst_gl_context_get_gl_version(self.as_ref().to_glib_none().0, &mut maj, &mut min);
|
||||
(maj, min)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_window(&self) -> Option<GLWindow> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_context_get_window(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_context_get_window(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_shared(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_is_shared(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_context_is_shared(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_shared_with<P: IsA<GLContext>>(&self, share: &P) {
|
||||
unsafe {
|
||||
ffi::gst_gl_context_set_shared_with(self.as_ref().to_glib_none().0, share.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_context_set_shared_with(self.as_ref().to_glib_none().0, share.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_context_set_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_full()), "Failed to set window")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_context_set_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_full()), "Failed to set window")
|
||||
}
|
||||
}
|
||||
|
||||
fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_context_supports_glsl_profile_version(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
|
||||
from_glib(gst_gl_sys::gst_gl_context_supports_glsl_profile_version(self.as_ref().to_glib_none().0, version.to_glib(), profile.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn swap_buffers(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_context_swap_buffers(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,24 +7,24 @@ use GLAPI;
|
|||
use GLContext;
|
||||
use GLDisplayType;
|
||||
use GLWindow;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::Cast;
|
||||
use glib::object::IsA;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLDisplay(Object<ffi::GstGLDisplay, ffi::GstGLDisplayClass, GLDisplayClass>) @extends gst::Object;
|
||||
pub struct GLDisplay(Object<gst_gl_sys::GstGLDisplay, gst_gl_sys::GstGLDisplayClass, GLDisplayClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_display_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_display_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ impl GLDisplay {
|
|||
pub fn new() -> GLDisplay {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_display_new())
|
||||
from_glib_full(gst_gl_sys::gst_gl_display_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ pub trait GLDisplayExt: 'static {
|
|||
impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
||||
fn add_context<P: IsA<GLContext>>(&self, context: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_display_add_context(self.as_ref().to_glib_none().0, context.as_ref().to_glib_none().0), "Failed to add OpenGL context")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_display_add_context(self.as_ref().to_glib_none().0, context.as_ref().to_glib_none().0), "Failed to add OpenGL context")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,44 +79,44 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
|||
unsafe {
|
||||
let mut p_context = ptr::null_mut();
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_gl_display_create_context(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0, &mut p_context, &mut error);
|
||||
let _ = gst_gl_sys::gst_gl_display_create_context(self.as_ref().to_glib_none().0, other_context.as_ref().to_glib_none().0, &mut p_context, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(p_context)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
fn create_window(&self) -> Option<GLWindow> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_display_create_window(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_display_create_window(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn filter_gl_api(&self, gl_api: GLAPI) {
|
||||
unsafe {
|
||||
ffi::gst_gl_display_filter_gl_api(self.as_ref().to_glib_none().0, gl_api.to_glib());
|
||||
gst_gl_sys::gst_gl_display_filter_gl_api(self.as_ref().to_glib_none().0, gl_api.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gl_api(&self) -> GLAPI {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_display_get_gl_api(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_display_get_gl_api(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_gl_api_unlocked(&self) -> GLAPI {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_display_get_gl_api_unlocked(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_display_get_gl_api_unlocked(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_handle_type(&self) -> GLDisplayType {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_display_get_handle_type(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_display_get_handle_type(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_window<P: IsA<GLWindow>>(&self, window: &P) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_display_remove_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_none().0), "Failed to remove window")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_display_remove_window(self.as_ref().to_glib_none().0, window.as_ref().to_glib_none().0), "Failed to remove window")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ impl<O: IsA<GLDisplay>> GLDisplayExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn create_context_trampoline<P, F: Fn(&P, &GLContext) -> GLContext + Send + Sync + 'static>(this: *mut ffi::GstGLDisplay, context: *mut ffi::GstGLContext, f: glib_ffi::gpointer) -> *mut ffi::GstGLContext
|
||||
unsafe extern "C" fn create_context_trampoline<P, F: Fn(&P, &GLContext) -> GLContext + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLDisplay, context: *mut gst_gl_sys::GstGLContext, f: glib_sys::gpointer) -> *mut gst_gl_sys::GstGLContext
|
||||
where P: IsA<GLDisplay> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&GLDisplay::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(context)).to_glib_full()
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLDisplay;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLDisplayEGL(Object<ffi::GstGLDisplayEGL, ffi::GstGLDisplayEGLClass, GLDisplayEGLClass>) @extends GLDisplay, gst::Object;
|
||||
pub struct GLDisplayEGL(Object<gst_gl_sys::GstGLDisplayEGL, gst_gl_sys::GstGLDisplayEGLClass, GLDisplayEGLClass>) @extends GLDisplay, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_display_egl_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_display_egl_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,16 @@ impl GLDisplayEGL {
|
|||
pub fn new() -> GLDisplayEGL {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_display_egl_new())
|
||||
from_glib_full(gst_gl_sys::gst_gl_display_egl_new())
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new_with_egl_display(display: /*Unimplemented*/Option<Fundamental: Pointer>) -> GLDisplayEGL {
|
||||
// unsafe { TODO: call ffi::gst_gl_display_egl_new_with_egl_display() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_display_egl_new_with_egl_display() }
|
||||
//}
|
||||
|
||||
//pub fn get_from_native(type_: GLDisplayType, display: /*Unimplemented*/Fundamental: UIntPtr) -> /*Unimplemented*/Option<Fundamental: Pointer> {
|
||||
// unsafe { TODO: call ffi::gst_gl_display_egl_get_from_native() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_display_egl_get_from_native() }
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,29 +3,28 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLDisplay;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLDisplayWayland(Object<ffi::GstGLDisplayWayland, ffi::GstGLDisplayWaylandClass, GLDisplayWaylandClass>) @extends GLDisplay, gst::Object;
|
||||
pub struct GLDisplayWayland(Object<gst_gl_sys::GstGLDisplayWayland, gst_gl_sys::GstGLDisplayWaylandClass, GLDisplayWaylandClass>) @extends GLDisplay, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_display_wayland_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_display_wayland_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl GLDisplayWayland {
|
||||
pub fn new<'a, P: Into<Option<&'a str>>>(name: P) -> GLDisplayWayland {
|
||||
pub fn new(name: Option<&str>) -> GLDisplayWayland {
|
||||
assert_initialized_main_thread!();
|
||||
let name = name.into();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_display_wayland_new(name.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_display_wayland_new(name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new_with_display(display: /*Unimplemented*/Option<Fundamental: Pointer>) -> GLDisplayWayland {
|
||||
// unsafe { TODO: call ffi::gst_gl_display_wayland_new_with_display() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_display_wayland_new_with_display() }
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,29 +3,28 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLDisplay;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLDisplayX11(Object<ffi::GstGLDisplayX11, ffi::GstGLDisplayX11Class, GLDisplayX11Class>) @extends GLDisplay, gst::Object;
|
||||
pub struct GLDisplayX11(Object<gst_gl_sys::GstGLDisplayX11, gst_gl_sys::GstGLDisplayX11Class, GLDisplayX11Class>) @extends GLDisplay, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_display_x11_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_display_x11_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl GLDisplayX11 {
|
||||
pub fn new<'a, P: Into<Option<&'a str>>>(name: P) -> GLDisplayX11 {
|
||||
pub fn new(name: Option<&str>) -> GLDisplayX11 {
|
||||
assert_initialized_main_thread!();
|
||||
let name = name.into();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_display_x11_new(name.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_display_x11_new(name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new_with_display(display: /*Unimplemented*/Fundamental: Pointer) -> GLDisplayX11 {
|
||||
// unsafe { TODO: call ffi::gst_gl_display_x11_new_with_display() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_display_x11_new_with_display() }
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLContext;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::mem;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLFramebuffer(Object<ffi::GstGLFramebuffer, ffi::GstGLFramebufferClass, GLFramebufferClass>) @extends gst::Object;
|
||||
pub struct GLFramebuffer(Object<gst_gl_sys::GstGLFramebuffer, gst_gl_sys::GstGLFramebufferClass, GLFramebufferClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_framebuffer_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_framebuffer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,14 +21,14 @@ impl GLFramebuffer {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P) -> GLFramebuffer {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_framebuffer_new(context.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_framebuffer_new(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_default_depth<P: IsA<GLContext>>(context: &P, width: u32, height: u32) -> GLFramebuffer {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_gl_framebuffer_new_with_default_depth(context.as_ref().to_glib_none().0, width, height))
|
||||
from_glib_none(gst_gl_sys::gst_gl_framebuffer_new_with_default_depth(context.as_ref().to_glib_none().0, width, height))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ pub trait GLFramebufferExt: 'static {
|
|||
|
||||
fn bind(&self);
|
||||
|
||||
//fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool;
|
||||
//fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Option<Fundamental: Pointer>) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool;
|
||||
|
||||
fn get_effective_dimensions(&self) -> (u32, u32);
|
||||
|
||||
|
@ -52,31 +52,31 @@ pub trait GLFramebufferExt: 'static {
|
|||
|
||||
impl<O: IsA<GLFramebuffer>> GLFramebufferExt for O {
|
||||
//fn attach(&self, attachment_point: u32, mem: /*Ignored*/&mut GLBaseMemory) {
|
||||
// unsafe { TODO: call ffi::gst_gl_framebuffer_attach() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_framebuffer_attach() }
|
||||
//}
|
||||
|
||||
fn bind(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_framebuffer_bind(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_framebuffer_bind(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Fundamental: Pointer) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_gl_framebuffer_draw_to_texture() }
|
||||
//fn draw_to_texture(&self, mem: /*Ignored*/&mut GLMemory, func: /*Unimplemented*/FnMut(/*Unimplemented*/Option<Fundamental: Pointer>) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) -> bool {
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_framebuffer_draw_to_texture() }
|
||||
//}
|
||||
|
||||
fn get_effective_dimensions(&self) -> (u32, u32) {
|
||||
unsafe {
|
||||
let mut width = mem::uninitialized();
|
||||
let mut height = mem::uninitialized();
|
||||
ffi::gst_gl_framebuffer_get_effective_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height);
|
||||
gst_gl_sys::gst_gl_framebuffer_get_effective_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height);
|
||||
(width, height)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_id(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_gl_framebuffer_get_id(self.as_ref().to_glib_none().0)
|
||||
gst_gl_sys::gst_gl_framebuffer_get_id(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLContext;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLOverlayCompositor(Object<ffi::GstGLOverlayCompositor, ffi::GstGLOverlayCompositorClass, GLOverlayCompositorClass>) @extends gst::Object;
|
||||
pub struct GLOverlayCompositor(Object<gst_gl_sys::GstGLOverlayCompositor, gst_gl_sys::GstGLOverlayCompositorClass, GLOverlayCompositorClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_overlay_compositor_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_overlay_compositor_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,26 +20,26 @@ impl GLOverlayCompositor {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P) -> GLOverlayCompositor {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_gl_overlay_compositor_new(context.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_gl_overlay_compositor_new(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn draw_overlays(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_overlay_compositor_draw_overlays(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn free_overlays(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_overlay_compositor_free_overlays(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_caps(caps: &gst::Caps) -> Option<gst::Caps> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_overlay_compositor_add_caps(caps.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
use Error;
|
||||
use GLContext;
|
||||
use GLSLStage;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -14,18 +13,19 @@ use glib::object::ObjectType;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLShader(Object<ffi::GstGLShader, ffi::GstGLShaderClass, GLShaderClass>) @extends gst::Object;
|
||||
pub struct GLShader(Object<gst_gl_sys::GstGLShader, gst_gl_sys::GstGLShaderClass, GLShaderClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_shader_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_shader_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ impl GLShader {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P) -> GLShader {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_shader_new(context.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_shader_new(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,215 +41,215 @@ impl GLShader {
|
|||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error);
|
||||
let ret = gst_gl_sys::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new_link_with_stages<P: IsA<GLContext>>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
||||
// unsafe { TODO: call ffi::gst_gl_shader_new_link_with_stages() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_link_with_stages() }
|
||||
//}
|
||||
|
||||
//pub fn new_with_stages<P: IsA<GLContext>>(context: &P, error: &mut Error, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> GLShader {
|
||||
// unsafe { TODO: call ffi::gst_gl_shader_new_with_stages() }
|
||||
// unsafe { TODO: call gst_gl_sys:gst_gl_shader_new_with_stages() }
|
||||
//}
|
||||
|
||||
pub fn attach(&self, stage: &GLSLStage) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_shader_attach(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_shader_attach(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn attach_unlocked(&self, stage: &GLSLStage) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_shader_attach_unlocked(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_shader_attach_unlocked(self.to_glib_none().0, stage.to_glib_none().0), "Failed to attach stage to shader")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bind_attribute_location(&self, index: u32, name: &str) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_bind_attribute_location(self.to_glib_none().0, index, name.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_bind_attribute_location(self.to_glib_none().0, index, name.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bind_frag_data_location(&self, index: u32, name: &str) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_bind_frag_data_location(self.to_glib_none().0, index, name.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_bind_frag_data_location(self.to_glib_none().0, index, name.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_gl_shader_compile_attach_stage(self.to_glib_none().0, stage.to_glib_none().0, &mut error);
|
||||
let _ = gst_gl_sys::gst_gl_shader_compile_attach_stage(self.to_glib_none().0, stage.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn detach(&self, stage: &GLSLStage) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_detach(self.to_glib_none().0, stage.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_detach(self.to_glib_none().0, stage.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn detach_unlocked(&self, stage: &GLSLStage) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_detach_unlocked(self.to_glib_none().0, stage.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_detach_unlocked(self.to_glib_none().0, stage.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_attribute_location(&self, name: &str) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_get_attribute_location(self.to_glib_none().0, name.to_glib_none().0)
|
||||
gst_gl_sys::gst_gl_shader_get_attribute_location(self.to_glib_none().0, name.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_program_handle(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_get_program_handle(self.to_glib_none().0)
|
||||
gst_gl_sys::gst_gl_shader_get_program_handle(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_linked(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_gl_shader_is_linked(self.to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_gl_shader_is_linked(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn link(&self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
||||
let _ = gst_gl_sys::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn release(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_release(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_release(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn release_unlocked(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_release_unlocked(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_release_unlocked(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_1f(&self, name: &str, value: f32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_1f(self.to_glib_none().0, name.to_glib_none().0, value);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_1f(self.to_glib_none().0, name.to_glib_none().0, value);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_1fv(&self, name: &str, value: &[f32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_1fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_1fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_1i(&self, name: &str, value: i32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_1i(self.to_glib_none().0, name.to_glib_none().0, value);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_1i(self.to_glib_none().0, name.to_glib_none().0, value);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_1iv(&self, name: &str, value: &[i32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_1iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_1iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_2f(&self, name: &str, v0: f32, v1: f32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_2f(self.to_glib_none().0, name.to_glib_none().0, v0, v1);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_2f(self.to_glib_none().0, name.to_glib_none().0, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_2fv(&self, name: &str, value: &[f32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_2fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_2fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_2i(&self, name: &str, v0: i32, v1: i32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_2i(self.to_glib_none().0, name.to_glib_none().0, v0, v1);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_2i(self.to_glib_none().0, name.to_glib_none().0, v0, v1);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_2iv(&self, name: &str, value: &[i32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_2iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_2iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_3f(&self, name: &str, v0: f32, v1: f32, v2: f32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_3f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_3f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_3fv(&self, name: &str, value: &[f32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_3fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_3fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_3i(&self, name: &str, v0: i32, v1: i32, v2: i32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_3i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_3i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_3iv(&self, name: &str, value: &[i32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_3iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_3iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_4f(&self, name: &str, v0: f32, v1: f32, v2: f32, v3: f32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_4f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_4f(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_4fv(&self, name: &str, value: &[f32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_4fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_4fv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_4i(&self, name: &str, v0: i32, v1: i32, v2: i32, v3: i32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_4i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_4i(self.to_glib_none().0, name.to_glib_none().0, v0, v1, v2, v3);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uniform_4iv(&self, name: &str, value: &[i32]) {
|
||||
let count = value.len() as u32;
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_set_uniform_4iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_set_uniform_4iv(self.to_glib_none().0, name.to_glib_none().0, count, value.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn use_(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_shader_use(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_shader_use(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_linked(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"linked\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ impl GLShader {
|
|||
unsafe impl Send for GLShader {}
|
||||
unsafe impl Sync for GLShader {}
|
||||
|
||||
unsafe extern "C" fn notify_linked_trampoline<F: Fn(&GLShader) + Send + Sync + 'static>(this: *mut ffi::GstGLShader, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_linked_trampoline<F: Fn(&GLShader) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLShader, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -3,18 +3,18 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use GLContext;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLUpload(Object<ffi::GstGLUpload, ffi::GstGLUploadClass, GLUploadClass>) @extends gst::Object;
|
||||
pub struct GLUpload(Object<gst_gl_sys::GstGLUpload, gst_gl_sys::GstGLUploadClass, GLUploadClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_upload_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_upload_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ impl GLUpload {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P) -> GLUpload {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_upload_new(context.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_upload_new(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,33 +30,33 @@ impl GLUpload {
|
|||
unsafe {
|
||||
let mut in_caps = ptr::null_mut();
|
||||
let mut out_caps = ptr::null_mut();
|
||||
ffi::gst_gl_upload_get_caps(self.to_glib_none().0, &mut in_caps, &mut out_caps);
|
||||
gst_gl_sys::gst_gl_upload_get_caps(self.to_glib_none().0, &mut in_caps, &mut out_caps);
|
||||
(from_glib_full(in_caps), from_glib_full(out_caps))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_upload_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_upload_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_context<P: IsA<GLContext>>(&self, context: &P) {
|
||||
unsafe {
|
||||
ffi::gst_gl_upload_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_upload_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn transform_caps<P: IsA<GLContext>>(&self, context: &P, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_upload_transform_caps(self.to_glib_none().0, context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_upload_transform_caps(self.to_glib_none().0, context.as_ref().to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_input_template_caps() -> gst::Caps {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_upload_get_input_template_caps())
|
||||
from_glib_full(gst_gl_sys::gst_gl_upload_get_input_template_caps())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
use GLContext;
|
||||
use GLStereoDownmix;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -13,18 +12,19 @@ use glib::object::ObjectType;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use gst_video;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLViewConvert(Object<ffi::GstGLViewConvert, ffi::GstGLViewConvertClass, GLViewConvertClass>) @extends gst::Object;
|
||||
pub struct GLViewConvert(Object<gst_gl_sys::GstGLViewConvert, gst_gl_sys::GstGLViewConvertClass, GLViewConvertClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_view_convert_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_view_convert_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,107 +32,107 @@ impl GLViewConvert {
|
|||
pub fn new() -> GLViewConvert {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_view_convert_new())
|
||||
from_glib_full(gst_gl_sys::gst_gl_view_convert_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn perform(&self, inbuf: &gst::Buffer) -> Option<gst::Buffer> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_view_convert_perform(self.to_glib_none().0, inbuf.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_view_convert_perform(self.to_glib_none().0, inbuf.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reset(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_view_convert_reset(self.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_view_convert_reset(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_caps(&self, in_caps: &gst::Caps, out_caps: &gst::Caps) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_view_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_view_convert_set_caps(self.to_glib_none().0, in_caps.to_glib_none().0, out_caps.to_glib_none().0), "Failed to set caps")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_context<P: IsA<GLContext>>(&self, context: &P) {
|
||||
unsafe {
|
||||
ffi::gst_gl_view_convert_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_view_convert_set_context(self.to_glib_none().0, context.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn transform_caps(&self, direction: gst::PadDirection, caps: &gst::Caps, filter: &gst::Caps) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_view_convert_transform_caps(self.to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_view_convert_transform_caps(self.to_glib_none().0, direction.to_glib(), caps.to_glib_none().0, filter.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_downmix_mode(&self) -> GLStereoDownmix {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GLStereoDownmix as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"downmix-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_downmix_mode(&self, downmix_mode: GLStereoDownmix) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"downmix-mode\0".as_ptr() as *const _, Value::from(&downmix_mode).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_input_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_input_flags_override(&self, input_flags_override: gst_video::VideoMultiviewFlags) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-flags-override\0".as_ptr() as *const _, Value::from(&input_flags_override).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_input_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_input_mode_override(&self, input_mode_override: gst_video::VideoMultiviewMode) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"input-mode-override\0".as_ptr() as *const _, Value::from(&input_mode_override).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_output_flags_override(&self) -> gst_video::VideoMultiviewFlags {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-flags-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_output_flags_override(&self, output_flags_override: gst_video::VideoMultiviewFlags) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-flags-override\0".as_ptr() as *const _, Value::from(&output_flags_override).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_output_mode_override(&self) -> gst_video::VideoMultiviewMode {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewMode as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-mode-override\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_output_mode_override(&self, output_mode_override: gst_video::VideoMultiviewMode) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"output-mode-override\0".as_ptr() as *const _, Value::from(&output_mode_override).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,27 +186,27 @@ impl Default for GLViewConvert {
|
|||
unsafe impl Send for GLViewConvert {}
|
||||
unsafe impl Sync for GLViewConvert {}
|
||||
|
||||
unsafe extern "C" fn notify_downmix_mode_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_downmix_mode_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_input_flags_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_input_flags_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_input_mode_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_input_mode_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_output_flags_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_output_flags_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_output_mode_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut ffi::GstGLViewConvert, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_output_mode_override_trampoline<F: Fn(&GLViewConvert) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLViewConvert, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
use GLContext;
|
||||
use GLDisplay;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::object::Cast;
|
||||
|
@ -12,18 +11,19 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLWindow(Object<ffi::GstGLWindow, ffi::GstGLWindowClass, GLWindowClass>) @extends gst::Object;
|
||||
pub struct GLWindow(Object<gst_gl_sys::GstGLWindow, gst_gl_sys::GstGLWindowClass, GLWindowClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_gl_window_get_type(),
|
||||
get_type => || gst_gl_sys::gst_gl_window_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ impl GLWindow {
|
|||
pub fn new<P: IsA<GLDisplay>>(display: &P) -> GLWindow {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_window_new(display.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_window_new(display.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,13 +76,13 @@ pub trait GLWindowExt: 'static {
|
|||
impl<O: IsA<GLWindow>> GLWindowExt for O {
|
||||
fn draw(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_draw(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_draw(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_context(&self) -> Option<GLContext> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_gl_window_get_context(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_gl_sys::gst_gl_window_get_context(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,68 +90,68 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
|
|||
unsafe {
|
||||
let mut width = mem::uninitialized();
|
||||
let mut height = mem::uninitialized();
|
||||
ffi::gst_gl_window_get_surface_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height);
|
||||
gst_gl_sys::gst_gl_window_get_surface_dimensions(self.as_ref().to_glib_none().0, &mut width, &mut height);
|
||||
(width, height)
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_events(&self, handle_events: bool) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib());
|
||||
gst_gl_sys::gst_gl_window_handle_events(self.as_ref().to_glib_none().0, handle_events.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn queue_resize(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_queue_resize(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn quit(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_quit(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_quit(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn resize(&self, width: u32, height: u32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_resize(self.as_ref().to_glib_none().0, width, height);
|
||||
gst_gl_sys::gst_gl_window_resize(self.as_ref().to_glib_none().0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
fn run(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_run(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_run(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn send_key_event(&self, event_type: &str, key_str: &str) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_send_key_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, key_str.to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_send_key_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, key_str.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_send_mouse_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, button, posx, posy);
|
||||
gst_gl_sys::gst_gl_window_send_mouse_event(self.as_ref().to_glib_none().0, event_type.to_glib_none().0, button, posx, posy);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_preferred_size(&self, width: i32, height: i32) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_set_preferred_size(self.as_ref().to_glib_none().0, width, height);
|
||||
gst_gl_sys::gst_gl_window_set_preferred_size(self.as_ref().to_glib_none().0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_gl_window_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set the specified region")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_gl_window_set_render_rectangle(self.as_ref().to_glib_none().0, x, y, width, height), "Failed to set the specified region")
|
||||
}
|
||||
}
|
||||
|
||||
fn show(&self) {
|
||||
unsafe {
|
||||
ffi::gst_gl_window_show(self.as_ref().to_glib_none().0);
|
||||
gst_gl_sys::gst_gl_window_show(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,13 +172,13 @@ impl<O: IsA<GLWindow>> GLWindowExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn key_event_trampoline<P, F: Fn(&P, &str, &str) + Send + Sync + 'static>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn key_event_trampoline<P, F: Fn(&P, &str, &str) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLWindow, id: *mut libc::c_char, key: *mut libc::c_char, f: glib_sys::gpointer)
|
||||
where P: IsA<GLWindow> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&GLWindow::from_glib_borrow(this).unsafe_cast(), &GString::from_glib_borrow(id), &GString::from_glib_borrow(key))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn mouse_event_trampoline<P, F: Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static>(this: *mut ffi::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, y: libc::c_double, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn mouse_event_trampoline<P, F: Fn(&P, &str, i32, f64, f64) + Send + Sync + 'static>(this: *mut gst_gl_sys::GstGLWindow, id: *mut libc::c_char, button: libc::c_int, x: libc::c_double, 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(), &GString::from_glib_borrow(id), button, x, y)
|
||||
|
|
|
@ -6,19 +6,19 @@ use Error;
|
|||
use GLContext;
|
||||
use GLSLProfile;
|
||||
use GLSLVersion;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_gl_sys;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct GLSLStage(Object<ffi::GstGLSLStage, ffi::GstGLSLStageClass, GLSLStageClass>) @extends gst::Object;
|
||||
pub struct GLSLStage(Object<gst_gl_sys::GstGLSLStage, gst_gl_sys::GstGLSLStageClass, GLSLStageClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_glsl_stage_get_type(),
|
||||
get_type => || gst_gl_sys::gst_glsl_stage_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,28 +26,28 @@ impl GLSLStage {
|
|||
pub fn new<P: IsA<GLContext>>(context: &P, type_: u32) -> GLSLStage {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_glsl_stage_new(context.as_ref().to_glib_none().0, type_))
|
||||
from_glib_none(gst_gl_sys::gst_glsl_stage_new(context.as_ref().to_glib_none().0, type_))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_default_fragment<P: IsA<GLContext>>(context: &P) -> GLSLStage {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_glsl_stage_new_default_fragment(context.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_glsl_stage_new_default_fragment(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_default_vertex<P: IsA<GLContext>>(context: &P) -> GLSLStage {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_glsl_stage_new_default_vertex(context.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_glsl_stage_new_default_vertex(context.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_string<P: IsA<GLContext>>(context: &P, type_: u32, version: GLSLVersion, profile: GLSLProfile, str: &str) -> GLSLStage {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_glsl_stage_new_with_string(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), str.to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_glsl_stage_new_with_string(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), str.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,46 +55,46 @@ impl GLSLStage {
|
|||
skip_assert_initialized!();
|
||||
let n_strings = str.len() as i32;
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_glsl_stage_new_with_strings(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0))
|
||||
from_glib_none(gst_gl_sys::gst_glsl_stage_new_with_strings(context.as_ref().to_glib_none().0, type_, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compile(&self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
||||
let _ = gst_gl_sys::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_handle(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_glsl_stage_get_handle(self.to_glib_none().0)
|
||||
gst_gl_sys::gst_glsl_stage_get_handle(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_profile(&self) -> GLSLProfile {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_glsl_stage_get_profile(self.to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_glsl_stage_get_profile(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_shader_type(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_glsl_stage_get_shader_type(self.to_glib_none().0)
|
||||
gst_gl_sys::gst_glsl_stage_get_shader_type(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_version(&self) -> GLSLVersion {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_glsl_stage_get_version(self.to_glib_none().0))
|
||||
from_glib(gst_gl_sys::gst_glsl_stage_get_version(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_strings(&self, version: GLSLVersion, profile: GLSLProfile, str: &[&str]) -> Result<(), glib::error::BoolError> {
|
||||
let n_strings = str.len() as i32;
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_glsl_stage_set_strings(self.to_glib_none().0, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0), "Failed to attach stage to set strings")
|
||||
glib_result_from_gboolean!(gst_gl_sys::gst_glsl_stage_set_strings(self.to_glib_none().0, version.to_glib(), profile.to_glib(), n_strings, str.to_glib_none().0), "Failed to attach stage to set strings")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,27 +2,25 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::IsA;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_net_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct NetClientClock(Object<ffi::GstNetClientClock, ffi::GstNetClientClockClass, NetClientClockClass>) @extends gst::Clock, gst::Object;
|
||||
pub struct NetClientClock(Object<gst_net_sys::GstNetClientClock, gst_net_sys::GstNetClientClockClass, NetClientClockClass>) @extends gst::Clock, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_net_client_clock_get_type(),
|
||||
get_type => || gst_net_sys::gst_net_client_clock_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,22 +28,21 @@ impl NetClientClock {
|
|||
pub fn get_property_address(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_address<'a, P: Into<Option<&'a str>>>(&self, address: P) {
|
||||
let address = address.into();
|
||||
pub fn set_property_address(&self, address: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, Value::from(address).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_base_time(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"base-time\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -53,21 +50,21 @@ impl NetClientClock {
|
|||
pub fn get_property_bus(&self) -> Option<gst::Bus> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Bus as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"bus\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_bus<P: IsA<gst::Bus> + glib::value::SetValueOptional>(&self, bus: Option<&P>) {
|
||||
pub fn set_property_bus(&self, bus: Option<&gst::Bus>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"bus\0".as_ptr() as *const _, Value::from(bus).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -75,56 +72,56 @@ impl NetClientClock {
|
|||
pub fn get_property_minimum_update_interval(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"minimum-update-interval\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_minimum_update_interval(&self, minimum_update_interval: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"minimum-update-interval\0".as_ptr() as *const _, Value::from(&minimum_update_interval).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_port(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_port(&self, port: i32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, Value::from(&port).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_round_trip_limit(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"round-trip-limit\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_round_trip_limit(&self, round_trip_limit: u64) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"round-trip-limit\0".as_ptr() as *const _, Value::from(&round_trip_limit).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,37 +185,37 @@ impl NetClientClock {
|
|||
unsafe impl Send for NetClientClock {}
|
||||
unsafe impl Sync for NetClientClock {}
|
||||
|
||||
unsafe extern "C" fn notify_address_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_address_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_bus_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_bus_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_internal_clock_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_internal_clock_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_minimum_update_interval_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_minimum_update_interval_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_port_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_port_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_qos_dscp_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_qos_dscp_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_round_trip_limit_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut ffi::GstNetClientClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_round_trip_limit_trampoline<F: Fn(&NetClientClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetClientClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -10,17 +9,18 @@ use glib::object::ObjectType;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_net_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct NetTimeProvider(Object<ffi::GstNetTimeProvider, ffi::GstNetTimeProviderClass, NetTimeProviderClass>) @extends gst::Object;
|
||||
pub struct NetTimeProvider(Object<gst_net_sys::GstNetTimeProvider, gst_net_sys::GstNetTimeProviderClass, NetTimeProviderClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_net_time_provider_get_type(),
|
||||
get_type => || gst_net_sys::gst_net_time_provider_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,21 +28,21 @@ impl NetTimeProvider {
|
|||
pub fn get_property_active(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_active(&self, active: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, Value::from(&active).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_address(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"address\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ impl NetTimeProvider {
|
|||
pub fn get_property_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ impl NetTimeProvider {
|
|||
pub fn get_property_port(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"port\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -66,14 +66,14 @@ impl NetTimeProvider {
|
|||
pub fn get_property_qos_dscp(&self) -> i32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<i32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_qos_dscp(&self, qos_dscp: i32) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"qos-dscp\0".as_ptr() as *const _, Value::from(&qos_dscp).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,12 +97,12 @@ impl NetTimeProvider {
|
|||
unsafe impl Send for NetTimeProvider {}
|
||||
unsafe impl Sync for NetTimeProvider {}
|
||||
|
||||
unsafe extern "C" fn notify_active_trampoline<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_active_trampoline<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetTimeProvider, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_qos_dscp_trampoline<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(this: *mut ffi::GstNetTimeProvider, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_qos_dscp_trampoline<F: Fn(&NetTimeProvider) + Send + Sync + 'static>(this: *mut gst_net_sys::GstNetTimeProvider, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use NetClientClock;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_net_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct NtpClock(Object<ffi::GstNtpClock, ffi::GstNtpClockClass, NtpClockClass>) @extends NetClientClock, gst::Clock, gst::Object;
|
||||
pub struct NtpClock(Object<gst_net_sys::GstNtpClock, gst_net_sys::GstNtpClockClass, NtpClockClass>) @extends NetClientClock, gst::Clock, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_ntp_clock_get_type(),
|
||||
get_type => || gst_net_sys::gst_ntp_clock_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_net_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PtpClock(Object<ffi::GstPtpClock, ffi::GstPtpClockClass, PtpClockClass>) @extends gst::Clock, gst::Object;
|
||||
pub struct PtpClock(Object<gst_net_sys::GstPtpClock, gst_net_sys::GstPtpClockClass, PtpClockClass>) @extends gst::Clock, gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_ptp_clock_get_type(),
|
||||
get_type => || gst_net_sys::gst_ptp_clock_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ impl PtpClock {
|
|||
pub fn get_property_domain(&self) -> u32 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u32 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"domain\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ impl PtpClock {
|
|||
pub fn get_property_grandmaster_clock_id(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"grandmaster-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ impl PtpClock {
|
|||
pub fn get_property_internal_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Clock as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"internal-clock\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ impl PtpClock {
|
|||
pub fn get_property_master_clock_id(&self) -> u64 {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<u64 as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"master-clock-id\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -84,17 +84,17 @@ impl PtpClock {
|
|||
unsafe impl Send for PtpClock {}
|
||||
unsafe impl Sync for PtpClock {}
|
||||
|
||||
unsafe extern "C" fn notify_grandmaster_clock_id_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_grandmaster_clock_id_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_internal_clock_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_internal_clock_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_master_clock_id_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut ffi::GstPtpClock, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_master_clock_id_trampoline<F: Fn(&PtpClock) + Send + Sync + 'static>(this: *mut gst_net_sys::GstPtpClock, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -4,24 +4,24 @@
|
|||
|
||||
use DiscovererInfo;
|
||||
use Error;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
use gst;
|
||||
use gst_ffi;
|
||||
use gst_pbutils_sys;
|
||||
use gst_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Discoverer(Object<ffi::GstDiscoverer, ffi::GstDiscovererClass, DiscovererClass>);
|
||||
pub struct Discoverer(Object<gst_pbutils_sys::GstDiscoverer, gst_pbutils_sys::GstDiscovererClass, DiscovererClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ impl Discoverer {
|
|||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::gst_discoverer_new(timeout.to_glib(), &mut error);
|
||||
let ret = gst_pbutils_sys::gst_discoverer_new(timeout.to_glib(), &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -38,26 +38,26 @@ impl Discoverer {
|
|||
pub fn discover_uri(&self, uri: &str) -> Result<DiscovererInfo, Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::gst_discoverer_discover_uri(self.to_glib_none().0, uri.to_glib_none().0, &mut error);
|
||||
let ret = gst_pbutils_sys::gst_discoverer_discover_uri(self.to_glib_none().0, uri.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn discover_uri_async(&self, uri: &str) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers")
|
||||
glib_result_from_gboolean!(gst_pbutils_sys::gst_discoverer_discover_uri_async(self.to_glib_none().0, uri.to_glib_none().0), "Failed to add URI to list of discovers")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn start(&self) {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_start(self.to_glib_none().0);
|
||||
gst_pbutils_sys::gst_discoverer_start(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stop(&self) {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_stop(self.to_glib_none().0);
|
||||
gst_pbutils_sys::gst_discoverer_stop(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,22 +97,22 @@ impl Discoverer {
|
|||
unsafe impl Send for Discoverer {}
|
||||
unsafe impl Sync for Discoverer {}
|
||||
|
||||
unsafe extern "C" fn discovered_trampoline<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, info: *mut ffi::GstDiscovererInfo, error: *mut glib_ffi::GError, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn discovered_trampoline<F: Fn(&Discoverer, &DiscovererInfo, &Option<Error>) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, info: *mut gst_pbutils_sys::GstDiscovererInfo, error: *mut glib_sys::GError, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(info), &from_glib_borrow(error))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn finished_trampoline<F: Fn(&Discoverer) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn finished_trampoline<F: Fn(&Discoverer) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn source_setup_trampoline<F: Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, source: *mut gst_ffi::GstElement, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn source_setup_trampoline<F: Fn(&Discoverer, &gst::Element) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, source: *mut gst_sys::GstElement, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(source))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn starting_trampoline<F: Fn(&Discoverer) + Send + Sync + 'static>(this: *mut ffi::GstDiscoverer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn starting_trampoline<F: Fn(&Discoverer) + Send + Sync + 'static>(this: *mut gst_pbutils_sys::GstDiscoverer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -3,59 +3,59 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use DiscovererStreamInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererAudioInfo(Object<ffi::GstDiscovererAudioInfo, DiscovererAudioInfoClass>) @extends DiscovererStreamInfo;
|
||||
pub struct DiscovererAudioInfo(Object<gst_pbutils_sys::GstDiscovererAudioInfo, DiscovererAudioInfoClass>) @extends DiscovererStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_audio_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_audio_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl DiscovererAudioInfo {
|
||||
pub fn get_bitrate(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_channel_mask(&self) -> u64 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_channel_mask(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_channel_mask(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_channels(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_channels(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_channels(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_depth(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_depth(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_depth(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_language(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_audio_info_get_language(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_audio_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_max_bitrate(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_max_bitrate(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_sample_rate(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_audio_info_get_sample_rate(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_audio_info_get_sample_rate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,21 +3,21 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use DiscovererStreamInfo;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererContainerInfo(Object<ffi::GstDiscovererContainerInfo, DiscovererContainerInfoClass>) @extends DiscovererStreamInfo;
|
||||
pub struct DiscovererContainerInfo(Object<gst_pbutils_sys::GstDiscovererContainerInfo, DiscovererContainerInfoClass>) @extends DiscovererStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_container_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_container_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl DiscovererContainerInfo {
|
||||
pub fn get_streams(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_container_info_get_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_container_info_get_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,134 +5,134 @@
|
|||
use DiscovererResult;
|
||||
use DiscovererSerializeFlags;
|
||||
use DiscovererStreamInfo;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererInfo(Object<ffi::GstDiscovererInfo, DiscovererInfoClass>);
|
||||
pub struct DiscovererInfo(Object<gst_pbutils_sys::GstDiscovererInfo, DiscovererInfoClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl DiscovererInfo {
|
||||
pub fn copy(&self) -> DiscovererInfo {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_info_copy(self.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_info_copy(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_audio_streams(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_audio_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_audio_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_container_streams(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_container_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_container_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_info_get_duration(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_info_get_duration(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
pub fn get_live(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_info_get_live(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_info_get_live(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_misc(&self) -> Option<gst::Structure> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_info_get_misc(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_misc(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_missing_elements_installer_details(&self) -> Vec<GString> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_discoverer_info_get_missing_elements_installer_details(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_missing_elements_installer_details(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_result(&self) -> DiscovererResult {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_info_get_result(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_info_get_result(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_seekable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_info_get_seekable(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_info_get_seekable(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_stream_info(&self) -> Option<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_info_get_stream_info(self.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_stream_info(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_stream_list(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_stream_list(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_stream_list(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_streams(&self, streamtype: glib::types::Type) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_streams(self.to_glib_none().0, streamtype.to_glib()))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_streams(self.to_glib_none().0, streamtype.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_subtitle_streams(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_subtitle_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_subtitle_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_tags(&self) -> Option<gst::TagList> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_info_get_tags(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_tags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_toc(&self) -> Option<gst::Toc> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_info_get_toc(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_toc(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_info_get_uri(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_info_get_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_video_streams(&self) -> Vec<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_discoverer_info_get_video_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_discoverer_info_get_video_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_variant(&self, flags: DiscovererSerializeFlags) -> Option<glib::Variant> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_info_to_variant(self.to_glib_none().0, flags.to_glib()))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_info_to_variant(self.to_glib_none().0, flags.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_variant(variant: &glib::Variant) -> Option<DiscovererInfo> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_info_from_variant(variant.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_info_from_variant(variant.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererStreamInfo(Object<ffi::GstDiscovererStreamInfo, DiscovererStreamInfoClass>);
|
||||
pub struct DiscovererStreamInfo(Object<gst_pbutils_sys::GstDiscovererStreamInfo, DiscovererStreamInfoClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_stream_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_stream_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,49 +42,49 @@ pub trait DiscovererStreamInfoExt: 'static {
|
|||
impl<O: IsA<DiscovererStreamInfo>> DiscovererStreamInfoExt for O {
|
||||
fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_stream_info_get_caps(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_caps(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_misc(&self) -> Option<gst::Structure> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_stream_info_get_misc(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_misc(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_next(&self) -> Option<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_stream_info_get_next(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_next(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_previous(&self) -> Option<DiscovererStreamInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_discoverer_stream_info_get_previous(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_discoverer_stream_info_get_previous(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_id(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_id(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_stream_id(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_type_nick(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_stream_info_get_stream_type_nick(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_stream_type_nick(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tags(&self) -> Option<gst::TagList> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_stream_info_get_tags(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_tags(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_toc(&self) -> Option<gst::Toc> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_stream_info_get_toc(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_stream_info_get_toc(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use DiscovererStreamInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererSubtitleInfo(Object<ffi::GstDiscovererSubtitleInfo, DiscovererSubtitleInfoClass>) @extends DiscovererStreamInfo;
|
||||
pub struct DiscovererSubtitleInfo(Object<gst_pbutils_sys::GstDiscovererSubtitleInfo, DiscovererSubtitleInfoClass>) @extends DiscovererStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_subtitle_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_subtitle_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl DiscovererSubtitleInfo {
|
||||
pub fn get_language(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_discoverer_subtitle_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,57 +3,57 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use DiscovererStreamInfo;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct DiscovererVideoInfo(Object<ffi::GstDiscovererVideoInfo, DiscovererVideoInfoClass>) @extends DiscovererStreamInfo;
|
||||
pub struct DiscovererVideoInfo(Object<gst_pbutils_sys::GstDiscovererVideoInfo, DiscovererVideoInfoClass>) @extends DiscovererStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_discoverer_video_info_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_discoverer_video_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl DiscovererVideoInfo {
|
||||
pub fn get_bitrate(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_video_info_get_bitrate(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_video_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_depth(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_video_info_get_depth(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_video_info_get_depth(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_height(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_video_info_get_height(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_video_info_get_height(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_max_bitrate(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_video_info_get_max_bitrate(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_video_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_width(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_discoverer_video_info_get_width(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_discoverer_video_info_get_width(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_image(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_video_info_is_image(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_video_info_is_image(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_interlaced(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_discoverer_video_info_is_interlaced(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_discoverer_video_info_is_interlaced(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use EncodingProfile;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct EncodingAudioProfile(Object<ffi::GstEncodingAudioProfile, ffi::GstEncodingAudioProfileClass, EncodingAudioProfileClass>) @extends EncodingProfile;
|
||||
pub struct EncodingAudioProfile(Object<gst_pbutils_sys::GstEncodingAudioProfile, gst_pbutils_sys::GstEncodingAudioProfileClass, EncodingAudioProfileClass>) @extends EncodingProfile;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_encoding_audio_profile_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_encoding_audio_profile_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use EncodingProfile;
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct EncodingContainerProfile(Object<ffi::GstEncodingContainerProfile, ffi::GstEncodingContainerProfileClass, EncodingContainerProfileClass>) @extends EncodingProfile;
|
||||
pub struct EncodingContainerProfile(Object<gst_pbutils_sys::GstEncodingContainerProfile, gst_pbutils_sys::GstEncodingContainerProfileClass, EncodingContainerProfileClass>) @extends EncodingProfile;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_encoding_container_profile_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_encoding_container_profile_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,13 +29,13 @@ pub trait EncodingContainerProfileExt: 'static {
|
|||
impl<O: IsA<EncodingContainerProfile>> EncodingContainerProfileExt for O {
|
||||
fn contains_profile<P: IsA<EncodingProfile>>(&self, profile: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_encoding_container_profile_contains_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_encoding_container_profile_contains_profile(self.as_ref().to_glib_none().0, profile.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_profiles(&self) -> Vec<EncodingProfile> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_container_profile_get_profiles(self.as_ref().to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_encoding_container_profile_get_profiles(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,34 +3,32 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use DiscovererInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct EncodingProfile(Object<ffi::GstEncodingProfile, ffi::GstEncodingProfileClass, EncodingProfileClass>);
|
||||
pub struct EncodingProfile(Object<gst_pbutils_sys::GstEncodingProfile, gst_pbutils_sys::GstEncodingProfileClass, EncodingProfileClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_encoding_profile_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_encoding_profile_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl EncodingProfile {
|
||||
pub fn find<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(targetname: &str, profilename: P, category: Q) -> Option<EncodingProfile> {
|
||||
pub fn find(targetname: &str, profilename: Option<&str>, category: Option<&str>) -> Option<EncodingProfile> {
|
||||
assert_initialized_main_thread!();
|
||||
let profilename = profilename.into();
|
||||
let category = category.into();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.to_glib_none().0, category.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_find(targetname.to_glib_none().0, profilename.to_glib_none().0, category.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_discoverer(info: &DiscovererInfo) -> Option<EncodingProfile> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_from_discoverer(info.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_from_discoverer(info.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,85 +71,85 @@ pub trait EncodingProfileExt: 'static {
|
|||
impl<O: IsA<EncodingProfile>> EncodingProfileExt for O {
|
||||
fn copy(&self) -> EncodingProfile {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_copy(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_copy(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_allow_dynamic_output(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_encoding_profile_get_allow_dynamic_output(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_encoding_profile_get_allow_dynamic_output(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_description(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_description(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_description(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_file_extension(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_file_extension(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_file_extension(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_format(&self) -> gst::Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_get_format(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_format(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_input_caps(&self) -> gst::Caps {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_get_input_caps(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_input_caps(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_name(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_name(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_name(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_presence(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0)
|
||||
gst_pbutils_sys::gst_encoding_profile_get_presence(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_preset(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_preset(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_preset(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_preset_name(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_preset_name(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_preset_name(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_restriction(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_profile_get_restriction(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_profile_get_restriction(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_type_nick(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_profile_get_type_nick(self.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_profile_get_type_nick(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_enabled(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_encoding_profile_is_enabled(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_encoding_profile_is_enabled(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_equal<P: IsA<EncodingProfile>>(&self, b: &P) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_encoding_profile_is_equal(self.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_encoding_profile_is_equal(self.as_ref().to_glib_none().0, b.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
|
||||
use EncodingProfile;
|
||||
use Error;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
use std;
|
||||
use std::ptr;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct EncodingTarget(Object<ffi::GstEncodingTarget, EncodingTargetClass>);
|
||||
pub struct EncodingTarget(Object<gst_pbutils_sys::GstEncodingTarget, EncodingTargetClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_encoding_target_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_encoding_target_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,44 +22,44 @@ impl EncodingTarget {
|
|||
pub fn new(name: &str, category: &str, description: &str, profiles: &[EncodingProfile]) -> EncodingTarget {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_target_new(name.to_glib_none().0, category.to_glib_none().0, description.to_glib_none().0, profiles.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_target_new(name.to_glib_none().0, category.to_glib_none().0, description.to_glib_none().0, profiles.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_category(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_target_get_category(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_target_get_category(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_description(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_target_get_description(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_target_get_description(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_name(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_encoding_target_get_name(self.to_glib_none().0))
|
||||
from_glib_none(gst_pbutils_sys::gst_encoding_target_get_name(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_profile(&self, name: &str) -> Option<EncodingProfile> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_encoding_target_get_profile(self.to_glib_none().0, name.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_encoding_target_get_profile(self.to_glib_none().0, name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_profiles(&self) -> Vec<EncodingProfile> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_encoding_target_get_profiles(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_pbutils_sys::gst_encoding_target_get_profiles(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn save(&self) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_encoding_target_save(self.to_glib_none().0, &mut error);
|
||||
let _ = gst_pbutils_sys::gst_encoding_target_save(self.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -67,17 +67,16 @@ impl EncodingTarget {
|
|||
pub fn save_to_file<P: AsRef<std::path::Path>>(&self, filepath: P) -> Result<(), Error> {
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let _ = ffi::gst_encoding_target_save_to_file(self.to_glib_none().0, filepath.as_ref().to_glib_none().0, &mut error);
|
||||
let _ = gst_pbutils_sys::gst_encoding_target_save_to_file(self.to_glib_none().0, filepath.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn load<'a, P: Into<Option<&'a str>>>(name: &str, category: P) -> Result<EncodingTarget, Error> {
|
||||
pub fn load(name: &str, category: Option<&str>) -> Result<EncodingTarget, Error> {
|
||||
assert_initialized_main_thread!();
|
||||
let category = category.into();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::gst_encoding_target_load(name.to_glib_none().0, category.to_glib_none().0, &mut error);
|
||||
let ret = gst_pbutils_sys::gst_encoding_target_load(name.to_glib_none().0, category.to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ impl EncodingTarget {
|
|||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
let mut error = ptr::null_mut();
|
||||
let ret = ffi::gst_encoding_target_load_from_file(filepath.as_ref().to_glib_none().0, &mut error);
|
||||
let ret = gst_pbutils_sys::gst_encoding_target_load_from_file(filepath.as_ref().to_glib_none().0, &mut error);
|
||||
if error.is_null() { Ok(from_glib_full(ret)) } else { Err(from_glib_full(error)) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,27 +3,27 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use EncodingProfile;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct EncodingVideoProfile(Object<ffi::GstEncodingVideoProfile, ffi::GstEncodingVideoProfileClass, EncodingVideoProfileClass>) @extends EncodingProfile;
|
||||
pub struct EncodingVideoProfile(Object<gst_pbutils_sys::GstEncodingVideoProfile, gst_pbutils_sys::GstEncodingVideoProfileClass, EncodingVideoProfileClass>) @extends EncodingProfile;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_encoding_video_profile_get_type(),
|
||||
get_type => || gst_pbutils_sys::gst_encoding_video_profile_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl EncodingVideoProfile {
|
||||
pub fn get_pass(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_encoding_video_profile_get_pass(self.to_glib_none().0)
|
||||
gst_pbutils_sys::gst_encoding_video_profile_get_pass(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_variableframerate(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_encoding_video_profile_get_variableframerate(self.to_glib_none().0))
|
||||
from_glib(gst_pbutils_sys::gst_encoding_video_profile_get_variableframerate(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -27,24 +27,24 @@ pub enum DiscovererResult {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for DiscovererResult {
|
||||
type GlibType = ffi::GstDiscovererResult;
|
||||
type GlibType = gst_pbutils_sys::GstDiscovererResult;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstDiscovererResult {
|
||||
fn to_glib(&self) -> gst_pbutils_sys::GstDiscovererResult {
|
||||
match *self {
|
||||
DiscovererResult::Ok => ffi::GST_DISCOVERER_OK,
|
||||
DiscovererResult::UriInvalid => ffi::GST_DISCOVERER_URI_INVALID,
|
||||
DiscovererResult::Error => ffi::GST_DISCOVERER_ERROR,
|
||||
DiscovererResult::Timeout => ffi::GST_DISCOVERER_TIMEOUT,
|
||||
DiscovererResult::Busy => ffi::GST_DISCOVERER_BUSY,
|
||||
DiscovererResult::MissingPlugins => ffi::GST_DISCOVERER_MISSING_PLUGINS,
|
||||
DiscovererResult::Ok => gst_pbutils_sys::GST_DISCOVERER_OK,
|
||||
DiscovererResult::UriInvalid => gst_pbutils_sys::GST_DISCOVERER_URI_INVALID,
|
||||
DiscovererResult::Error => gst_pbutils_sys::GST_DISCOVERER_ERROR,
|
||||
DiscovererResult::Timeout => gst_pbutils_sys::GST_DISCOVERER_TIMEOUT,
|
||||
DiscovererResult::Busy => gst_pbutils_sys::GST_DISCOVERER_BUSY,
|
||||
DiscovererResult::MissingPlugins => gst_pbutils_sys::GST_DISCOVERER_MISSING_PLUGINS,
|
||||
DiscovererResult::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstDiscovererResult> for DiscovererResult {
|
||||
fn from_glib(value: ffi::GstDiscovererResult) -> Self {
|
||||
impl FromGlib<gst_pbutils_sys::GstDiscovererResult> for DiscovererResult {
|
||||
fn from_glib(value: gst_pbutils_sys::GstDiscovererResult) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => DiscovererResult::Ok,
|
||||
|
@ -60,7 +60,7 @@ impl FromGlib<ffi::GstDiscovererResult> for DiscovererResult {
|
|||
|
||||
impl StaticType for DiscovererResult {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_discoverer_result_get_type()) }
|
||||
unsafe { from_glib(gst_pbutils_sys::gst_discoverer_result_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,13 +72,13 @@ impl<'a> FromValueOptional<'a> for DiscovererResult {
|
|||
|
||||
impl<'a> FromValue<'a> for DiscovererResult {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for DiscovererResult {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_pbutils_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct DiscovererSerializeFlags: u32 {
|
||||
|
@ -24,16 +24,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for DiscovererSerializeFlags {
|
||||
type GlibType = ffi::GstDiscovererSerializeFlags;
|
||||
type GlibType = gst_pbutils_sys::GstDiscovererSerializeFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstDiscovererSerializeFlags {
|
||||
fn to_glib(&self) -> gst_pbutils_sys::GstDiscovererSerializeFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstDiscovererSerializeFlags> for DiscovererSerializeFlags {
|
||||
fn from_glib(value: ffi::GstDiscovererSerializeFlags) -> DiscovererSerializeFlags {
|
||||
impl FromGlib<gst_pbutils_sys::GstDiscovererSerializeFlags> for DiscovererSerializeFlags {
|
||||
fn from_glib(value: gst_pbutils_sys::GstDiscovererSerializeFlags) -> DiscovererSerializeFlags {
|
||||
skip_assert_initialized!();
|
||||
DiscovererSerializeFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ impl FromGlib<ffi::GstDiscovererSerializeFlags> for DiscovererSerializeFlags {
|
|||
|
||||
impl StaticType for DiscovererSerializeFlags {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_discoverer_serialize_flags_get_type()) }
|
||||
unsafe { from_glib(gst_pbutils_sys::gst_discoverer_serialize_flags_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,13 +53,13 @@ impl<'a> FromValueOptional<'a> for DiscovererSerializeFlags {
|
|||
|
||||
impl<'a> FromValue<'a> for DiscovererSerializeFlags {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for DiscovererSerializeFlags {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,45 +3,44 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use EncodingTarget;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_pbutils_sys;
|
||||
use std::mem;
|
||||
|
||||
|
||||
pub fn encoding_list_all_targets<'a, P: Into<Option<&'a str>>>(categoryname: P) -> Vec<EncodingTarget> {
|
||||
pub fn encoding_list_all_targets(categoryname: Option<&str>) -> Vec<EncodingTarget> {
|
||||
assert_initialized_main_thread!();
|
||||
let categoryname = categoryname.into();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_all_targets(categoryname.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_encoding_list_all_targets(categoryname.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn encoding_list_available_categories() -> Vec<GString> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_encoding_list_available_categories())
|
||||
FromGlibPtrContainer::from_glib_full(gst_pbutils_sys::gst_encoding_list_available_categories())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pb_utils_get_element_description(factory_name: &str) -> Option<GString> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pb_utils_get_element_description(factory_name.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_pb_utils_get_element_description(factory_name.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pb_utils_get_sink_description(protocol: &str) -> Option<GString> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pb_utils_get_sink_description(protocol.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_pb_utils_get_sink_description(protocol.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pb_utils_get_source_description(protocol: &str) -> Option<GString> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_pb_utils_get_source_description(protocol.to_glib_none().0))
|
||||
from_glib_full(gst_pbutils_sys::gst_pb_utils_get_source_description(protocol.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +51,7 @@ pub fn plugins_base_version() -> (u32, u32, u32, u32) {
|
|||
let mut minor = mem::uninitialized();
|
||||
let mut micro = mem::uninitialized();
|
||||
let mut nano = mem::uninitialized();
|
||||
ffi::gst_plugins_base_version(&mut major, &mut minor, &mut micro, &mut nano);
|
||||
gst_pbutils_sys::gst_plugins_base_version(&mut major, &mut minor, &mut micro, &mut nano);
|
||||
(major, minor, micro, nano)
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +59,6 @@ pub fn plugins_base_version() -> (u32, u32, u32, u32) {
|
|||
pub fn plugins_base_version_string() -> Option<GString> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_plugins_base_version_string())
|
||||
from_glib_full(gst_pbutils_sys::gst_plugins_base_version_string())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::Quark;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
|
@ -12,7 +11,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_player_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -27,22 +27,22 @@ pub enum PlayerColorBalanceType {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PlayerColorBalanceType {
|
||||
type GlibType = ffi::GstPlayerColorBalanceType;
|
||||
type GlibType = gst_player_sys::GstPlayerColorBalanceType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstPlayerColorBalanceType {
|
||||
fn to_glib(&self) -> gst_player_sys::GstPlayerColorBalanceType {
|
||||
match *self {
|
||||
PlayerColorBalanceType::Hue => ffi::GST_PLAYER_COLOR_BALANCE_HUE,
|
||||
PlayerColorBalanceType::Brightness => ffi::GST_PLAYER_COLOR_BALANCE_BRIGHTNESS,
|
||||
PlayerColorBalanceType::Saturation => ffi::GST_PLAYER_COLOR_BALANCE_SATURATION,
|
||||
PlayerColorBalanceType::Contrast => ffi::GST_PLAYER_COLOR_BALANCE_CONTRAST,
|
||||
PlayerColorBalanceType::Hue => gst_player_sys::GST_PLAYER_COLOR_BALANCE_HUE,
|
||||
PlayerColorBalanceType::Brightness => gst_player_sys::GST_PLAYER_COLOR_BALANCE_BRIGHTNESS,
|
||||
PlayerColorBalanceType::Saturation => gst_player_sys::GST_PLAYER_COLOR_BALANCE_SATURATION,
|
||||
PlayerColorBalanceType::Contrast => gst_player_sys::GST_PLAYER_COLOR_BALANCE_CONTRAST,
|
||||
PlayerColorBalanceType::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstPlayerColorBalanceType> for PlayerColorBalanceType {
|
||||
fn from_glib(value: ffi::GstPlayerColorBalanceType) -> Self {
|
||||
impl FromGlib<gst_player_sys::GstPlayerColorBalanceType> for PlayerColorBalanceType {
|
||||
fn from_glib(value: gst_player_sys::GstPlayerColorBalanceType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
3 => PlayerColorBalanceType::Hue,
|
||||
|
@ -56,7 +56,7 @@ impl FromGlib<ffi::GstPlayerColorBalanceType> for PlayerColorBalanceType {
|
|||
|
||||
impl StaticType for PlayerColorBalanceType {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_player_color_balance_type_get_type()) }
|
||||
unsafe { from_glib(gst_player_sys::gst_player_color_balance_type_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,13 +68,13 @@ impl<'a> FromValueOptional<'a> for PlayerColorBalanceType {
|
|||
|
||||
impl<'a> FromValue<'a> for PlayerColorBalanceType {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for PlayerColorBalanceType {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,19 +88,19 @@ pub enum PlayerError {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PlayerError {
|
||||
type GlibType = ffi::GstPlayerError;
|
||||
type GlibType = gst_player_sys::GstPlayerError;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstPlayerError {
|
||||
fn to_glib(&self) -> gst_player_sys::GstPlayerError {
|
||||
match *self {
|
||||
PlayerError::Failed => ffi::GST_PLAYER_ERROR_FAILED,
|
||||
PlayerError::Failed => gst_player_sys::GST_PLAYER_ERROR_FAILED,
|
||||
PlayerError::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstPlayerError> for PlayerError {
|
||||
fn from_glib(value: ffi::GstPlayerError) -> Self {
|
||||
impl FromGlib<gst_player_sys::GstPlayerError> for PlayerError {
|
||||
fn from_glib(value: gst_player_sys::GstPlayerError) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => PlayerError::Failed,
|
||||
|
@ -112,7 +112,7 @@ impl FromGlib<ffi::GstPlayerError> for PlayerError {
|
|||
impl ErrorDomain for PlayerError {
|
||||
fn domain() -> Quark {
|
||||
skip_assert_initialized!();
|
||||
unsafe { from_glib(ffi::gst_player_error_quark()) }
|
||||
unsafe { from_glib(gst_player_sys::gst_player_error_quark()) }
|
||||
}
|
||||
|
||||
fn code(self) -> i32 {
|
||||
|
@ -130,7 +130,7 @@ impl ErrorDomain for PlayerError {
|
|||
|
||||
impl StaticType for PlayerError {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_player_error_get_type()) }
|
||||
unsafe { from_glib(gst_player_sys::gst_player_error_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,13 +142,13 @@ impl<'a> FromValueOptional<'a> for PlayerError {
|
|||
|
||||
impl<'a> FromValue<'a> for PlayerError {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for PlayerError {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,23 +166,23 @@ pub enum PlayerSnapshotFormat {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PlayerSnapshotFormat {
|
||||
type GlibType = ffi::GstPlayerSnapshotFormat;
|
||||
type GlibType = gst_player_sys::GstPlayerSnapshotFormat;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstPlayerSnapshotFormat {
|
||||
fn to_glib(&self) -> gst_player_sys::GstPlayerSnapshotFormat {
|
||||
match *self {
|
||||
PlayerSnapshotFormat::RawNative => ffi::GST_PLAYER_THUMBNAIL_RAW_NATIVE,
|
||||
PlayerSnapshotFormat::RawXrgb => ffi::GST_PLAYER_THUMBNAIL_RAW_xRGB,
|
||||
PlayerSnapshotFormat::RawBgrx => ffi::GST_PLAYER_THUMBNAIL_RAW_BGRx,
|
||||
PlayerSnapshotFormat::Jpg => ffi::GST_PLAYER_THUMBNAIL_JPG,
|
||||
PlayerSnapshotFormat::Png => ffi::GST_PLAYER_THUMBNAIL_PNG,
|
||||
PlayerSnapshotFormat::RawNative => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_NATIVE,
|
||||
PlayerSnapshotFormat::RawXrgb => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_xRGB,
|
||||
PlayerSnapshotFormat::RawBgrx => gst_player_sys::GST_PLAYER_THUMBNAIL_RAW_BGRx,
|
||||
PlayerSnapshotFormat::Jpg => gst_player_sys::GST_PLAYER_THUMBNAIL_JPG,
|
||||
PlayerSnapshotFormat::Png => gst_player_sys::GST_PLAYER_THUMBNAIL_PNG,
|
||||
PlayerSnapshotFormat::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstPlayerSnapshotFormat> for PlayerSnapshotFormat {
|
||||
fn from_glib(value: ffi::GstPlayerSnapshotFormat) -> Self {
|
||||
impl FromGlib<gst_player_sys::GstPlayerSnapshotFormat> for PlayerSnapshotFormat {
|
||||
fn from_glib(value: gst_player_sys::GstPlayerSnapshotFormat) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => PlayerSnapshotFormat::RawNative,
|
||||
|
@ -208,22 +208,22 @@ pub enum PlayerState {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for PlayerState {
|
||||
type GlibType = ffi::GstPlayerState;
|
||||
type GlibType = gst_player_sys::GstPlayerState;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstPlayerState {
|
||||
fn to_glib(&self) -> gst_player_sys::GstPlayerState {
|
||||
match *self {
|
||||
PlayerState::Stopped => ffi::GST_PLAYER_STATE_STOPPED,
|
||||
PlayerState::Buffering => ffi::GST_PLAYER_STATE_BUFFERING,
|
||||
PlayerState::Paused => ffi::GST_PLAYER_STATE_PAUSED,
|
||||
PlayerState::Playing => ffi::GST_PLAYER_STATE_PLAYING,
|
||||
PlayerState::Stopped => gst_player_sys::GST_PLAYER_STATE_STOPPED,
|
||||
PlayerState::Buffering => gst_player_sys::GST_PLAYER_STATE_BUFFERING,
|
||||
PlayerState::Paused => gst_player_sys::GST_PLAYER_STATE_PAUSED,
|
||||
PlayerState::Playing => gst_player_sys::GST_PLAYER_STATE_PLAYING,
|
||||
PlayerState::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstPlayerState> for PlayerState {
|
||||
fn from_glib(value: ffi::GstPlayerState) -> Self {
|
||||
impl FromGlib<gst_player_sys::GstPlayerState> for PlayerState {
|
||||
fn from_glib(value: gst_player_sys::GstPlayerState) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => PlayerState::Stopped,
|
||||
|
@ -237,7 +237,7 @@ impl FromGlib<ffi::GstPlayerState> for PlayerState {
|
|||
|
||||
impl StaticType for PlayerState {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_player_state_get_type()) }
|
||||
unsafe { from_glib(gst_player_sys::gst_player_state_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,13 +249,13 @@ impl<'a> FromValueOptional<'a> for PlayerState {
|
|||
|
||||
impl<'a> FromValue<'a> for PlayerState {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for PlayerState {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ use PlayerState;
|
|||
use PlayerSubtitleInfo;
|
||||
use PlayerVideoInfo;
|
||||
use PlayerVisualization;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
|
@ -20,333 +19,331 @@ use glib::object::ObjectType;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_player_sys;
|
||||
use gst_video;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct Player(Object<ffi::GstPlayer, ffi::GstPlayerClass, PlayerClass>) @extends gst::Object;
|
||||
pub struct Player(Object<gst_player_sys::GstPlayer, gst_player_sys::GstPlayerClass, PlayerClass>) @extends gst::Object;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl Player {
|
||||
pub fn get_audio_video_offset(&self) -> i64 {
|
||||
unsafe {
|
||||
ffi::gst_player_get_audio_video_offset(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_get_audio_video_offset(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_color_balance(&self, type_: PlayerColorBalanceType) -> f64 {
|
||||
unsafe {
|
||||
ffi::gst_player_get_color_balance(self.to_glib_none().0, type_.to_glib())
|
||||
gst_player_sys::gst_player_get_color_balance(self.to_glib_none().0, type_.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current_audio_track(&self) -> Option<PlayerAudioInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_current_audio_track(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_current_audio_track(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current_subtitle_track(&self) -> Option<PlayerSubtitleInfo> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_get_current_subtitle_track(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_get_current_subtitle_track(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current_video_track(&self) -> Option<PlayerVideoInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_current_video_track(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_current_video_track(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_current_visualization(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_current_visualization(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_current_visualization(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_get_duration(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_get_duration(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_media_info(&self) -> Option<PlayerMediaInfo> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_media_info(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_media_info(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_multiview_flags(&self) -> gst_video::VideoMultiviewFlags {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_get_multiview_flags(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_get_multiview_flags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_get_multiview_mode(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_get_multiview_mode(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_mute(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_get_mute(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_get_mute(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_pipeline(&self) -> gst::Element {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_pipeline(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_pipeline(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_position(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_get_position(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_get_position(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_rate(&self) -> f64 {
|
||||
unsafe {
|
||||
ffi::gst_player_get_rate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_get_rate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_subtitle_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_subtitle_uri(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_subtitle_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_uri(self.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_video_snapshot<'a, P: Into<Option<&'a gst::Structure>>>(&self, format: PlayerSnapshotFormat, config: P) -> Option<gst::Sample> {
|
||||
let config = config.into();
|
||||
pub fn get_video_snapshot(&self, format: PlayerSnapshotFormat, config: Option<&gst::Structure>) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_player_get_video_snapshot(self.to_glib_none().0, format.to_glib(), config.to_glib_none().0))
|
||||
from_glib_full(gst_player_sys::gst_player_get_video_snapshot(self.to_glib_none().0, format.to_glib(), config.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_volume(&self) -> f64 {
|
||||
unsafe {
|
||||
ffi::gst_player_get_volume(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_get_volume(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_color_balance(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_has_color_balance(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_has_color_balance(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn pause(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_pause(self.to_glib_none().0);
|
||||
gst_player_sys::gst_player_pause(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn play(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_play(self.to_glib_none().0);
|
||||
gst_player_sys::gst_player_play(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn seek(&self, position: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_player_seek(self.to_glib_none().0, position.to_glib());
|
||||
gst_player_sys::gst_player_seek(self.to_glib_none().0, position.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_audio_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track")
|
||||
glib_result_from_gboolean!(gst_player_sys::gst_player_set_audio_track(self.to_glib_none().0, stream_index), "Failed to set audio track")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_audio_track_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_audio_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
gst_player_sys::gst_player_set_audio_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_audio_video_offset(&self, offset: i64) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_audio_video_offset(self.to_glib_none().0, offset);
|
||||
gst_player_sys::gst_player_set_audio_video_offset(self.to_glib_none().0, offset);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_color_balance(&self, type_: PlayerColorBalanceType, value: f64) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_color_balance(self.to_glib_none().0, type_.to_glib(), value);
|
||||
gst_player_sys::gst_player_set_color_balance(self.to_glib_none().0, type_.to_glib(), value);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_multiview_flags(&self, flags: gst_video::VideoMultiviewFlags) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_multiview_flags(self.to_glib_none().0, flags.to_glib());
|
||||
gst_player_sys::gst_player_set_multiview_flags(self.to_glib_none().0, flags.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_multiview_mode(&self, mode: gst_video::VideoMultiviewFramePacking) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_multiview_mode(self.to_glib_none().0, mode.to_glib());
|
||||
gst_player_sys::gst_player_set_multiview_mode(self.to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_mute(&self, val: bool) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_mute(self.to_glib_none().0, val.to_glib());
|
||||
gst_player_sys::gst_player_set_mute(self.to_glib_none().0, val.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_rate(&self, rate: f64) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_rate(self.to_glib_none().0, rate);
|
||||
gst_player_sys::gst_player_set_rate(self.to_glib_none().0, rate);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_subtitle_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track")
|
||||
glib_result_from_gboolean!(gst_player_sys::gst_player_set_subtitle_track(self.to_glib_none().0, stream_index), "Failed to set subtitle track")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_subtitle_track_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_subtitle_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
gst_player_sys::gst_player_set_subtitle_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_subtitle_uri(&self, uri: &str) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_subtitle_uri(self.to_glib_none().0, uri.to_glib_none().0);
|
||||
gst_player_sys::gst_player_set_subtitle_uri(self.to_glib_none().0, uri.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_uri(&self, uri: &str) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0);
|
||||
gst_player_sys::gst_player_set_uri(self.to_glib_none().0, uri.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_video_track(&self, stream_index: i32) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track")
|
||||
glib_result_from_gboolean!(gst_player_sys::gst_player_set_video_track(self.to_glib_none().0, stream_index), "Failed to set video track")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_video_track_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_video_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
gst_player_sys::gst_player_set_video_track_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_visualization<'a, P: Into<Option<&'a str>>>(&self, name: P) -> Result<(), glib::error::BoolError> {
|
||||
let name = name.into();
|
||||
pub fn set_visualization(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_player_set_visualization(self.to_glib_none().0, name.to_glib_none().0), "Failed to set visualization")
|
||||
glib_result_from_gboolean!(gst_player_sys::gst_player_set_visualization(self.to_glib_none().0, name.to_glib_none().0), "Failed to set visualization")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_visualization_enabled(&self, enabled: bool) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_visualization_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
gst_player_sys::gst_player_set_visualization_enabled(self.to_glib_none().0, enabled.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_volume(&self, val: f64) {
|
||||
unsafe {
|
||||
ffi::gst_player_set_volume(self.to_glib_none().0, val);
|
||||
gst_player_sys::gst_player_set_volume(self.to_glib_none().0, val);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stop(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_stop(self.to_glib_none().0);
|
||||
gst_player_sys::gst_player_stop(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_suburi(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<GString as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"suburi\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_suburi<'a, P: Into<Option<&'a str>>>(&self, suburi: P) {
|
||||
let suburi = suburi.into();
|
||||
pub fn set_property_suburi(&self, suburi: Option<&str>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"suburi\0".as_ptr() as *const _, Value::from(suburi).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_video_multiview_flags(&self) -> gst_video::VideoMultiviewFlags {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFlags as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-flags\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_video_multiview_flags(&self, video_multiview_flags: gst_video::VideoMultiviewFlags) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-flags\0".as_ptr() as *const _, Value::from(&video_multiview_flags).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_property_video_multiview_mode(&self) -> gst_video::VideoMultiviewFramePacking {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst_video::VideoMultiviewFramePacking as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-mode\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_video_multiview_mode(&self, video_multiview_mode: gst_video::VideoMultiviewFramePacking) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-multiview-mode\0".as_ptr() as *const _, Value::from(&video_multiview_mode).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_audio_streams(info: &PlayerMediaInfo) -> Vec<PlayerAudioInfo> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_audio_streams(info.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_audio_streams(info.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_subtitle_streams(info: &PlayerMediaInfo) -> Vec<PlayerSubtitleInfo> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_subtitle_streams(info.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_subtitle_streams(info.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_video_streams(info: &PlayerMediaInfo) -> Vec<PlayerVideoInfo> {
|
||||
skip_assert_initialized!();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_get_video_streams(info.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_get_video_streams(info.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn visualizations_get() -> Vec<PlayerVisualization> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_player_visualizations_get())
|
||||
FromGlibPtrContainer::from_glib_full(gst_player_sys::gst_player_visualizations_get())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,127 +551,127 @@ impl Player {
|
|||
unsafe impl Send for Player {}
|
||||
unsafe impl Sync for Player {}
|
||||
|
||||
unsafe extern "C" fn buffering_trampoline<F: Fn(&Player, i32) + Send + 'static>(this: *mut ffi::GstPlayer, object: libc::c_int, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn buffering_trampoline<F: Fn(&Player, i32) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: libc::c_int, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), object)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn end_of_stream_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn end_of_stream_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn error_trampoline<F: Fn(&Player, &Error) + Send + 'static>(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn error_trampoline<F: Fn(&Player, &Error) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: *mut glib_sys::GError, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn media_info_updated_trampoline<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(this: *mut ffi::GstPlayer, object: *mut ffi::GstPlayerMediaInfo, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn media_info_updated_trampoline<F: Fn(&Player, &PlayerMediaInfo) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: *mut gst_player_sys::GstPlayerMediaInfo, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn mute_changed_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn mute_changed_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn state_changed_trampoline<F: Fn(&Player, PlayerState) + Send + 'static>(this: *mut ffi::GstPlayer, object: ffi::GstPlayerState, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn state_changed_trampoline<F: Fn(&Player, PlayerState) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: gst_player_sys::GstPlayerState, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), from_glib(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn uri_loaded_trampoline<F: Fn(&Player, &str) + Send + 'static>(this: *mut ffi::GstPlayer, object: *mut libc::c_char, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn uri_loaded_trampoline<F: Fn(&Player, &str) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: *mut libc::c_char, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &GString::from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn video_dimensions_changed_trampoline<F: Fn(&Player, i32, i32) + Send + 'static>(this: *mut ffi::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn video_dimensions_changed_trampoline<F: Fn(&Player, i32, i32) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: libc::c_int, p0: libc::c_int, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), object, p0)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn volume_changed_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut ffi::GstPlayer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn volume_changed_trampoline<F: Fn(&Player) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn warning_trampoline<F: Fn(&Player, &Error) + Send + 'static>(this: *mut ffi::GstPlayer, object: *mut glib_ffi::GError, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn warning_trampoline<F: Fn(&Player, &Error) + Send + 'static>(this: *mut gst_player_sys::GstPlayer, object: *mut glib_sys::GError, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_audio_video_offset_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_audio_video_offset_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_current_audio_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_current_audio_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_current_subtitle_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_current_subtitle_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_current_video_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_current_video_track_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_duration_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_media_info_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_media_info_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mute_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_mute_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_pipeline_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_pipeline_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_position_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_position_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_rate_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_rate_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_suburi_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_suburi_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_uri_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_uri_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_video_multiview_flags_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_video_multiview_flags_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_video_multiview_mode_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_video_multiview_mode_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_volume_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut ffi::GstPlayer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_volume_trampoline<F: Fn(&Player) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -3,46 +3,46 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerAudioInfo(Object<ffi::GstPlayerAudioInfo, ffi::GstPlayerAudioInfoClass, PlayerAudioInfoClass>) @extends PlayerStreamInfo;
|
||||
pub struct PlayerAudioInfo(Object<gst_player_sys::GstPlayerAudioInfo, gst_player_sys::GstPlayerAudioInfoClass, PlayerAudioInfoClass>) @extends PlayerStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_audio_info_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_audio_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl PlayerAudioInfo {
|
||||
pub fn get_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_bitrate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_audio_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_channels(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_channels(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_audio_info_get_channels(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_language(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_audio_info_get_language(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_audio_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_max_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_audio_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_sample_rate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_audio_info_get_sample_rate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_audio_info_get_sample_rate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use PlayerSignalDispatcher;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::ObjectType;
|
||||
use glib::translate::*;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerGMainContextSignalDispatcher(Object<ffi::GstPlayerGMainContextSignalDispatcher, ffi::GstPlayerGMainContextSignalDispatcherClass, PlayerGMainContextSignalDispatcherClass>) @implements PlayerSignalDispatcher;
|
||||
pub struct PlayerGMainContextSignalDispatcher(Object<gst_player_sys::GstPlayerGMainContextSignalDispatcher, gst_player_sys::GstPlayerGMainContextSignalDispatcherClass, PlayerGMainContextSignalDispatcherClass>) @implements PlayerSignalDispatcher;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_g_main_context_signal_dispatcher_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_g_main_context_signal_dispatcher_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ impl PlayerGMainContextSignalDispatcher {
|
|||
pub fn get_property_application_context(&self) -> Option<glib::MainContext> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<glib::MainContext as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"application-context\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,113 +6,113 @@ use PlayerAudioInfo;
|
|||
use PlayerStreamInfo;
|
||||
use PlayerSubtitleInfo;
|
||||
use PlayerVideoInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerMediaInfo(Object<ffi::GstPlayerMediaInfo, ffi::GstPlayerMediaInfoClass, PlayerMediaInfoClass>);
|
||||
pub struct PlayerMediaInfo(Object<gst_player_sys::GstPlayerMediaInfo, gst_player_sys::GstPlayerMediaInfoClass, PlayerMediaInfoClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_media_info_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_media_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl PlayerMediaInfo {
|
||||
pub fn get_audio_streams(&self) -> Vec<PlayerAudioInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_audio_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_audio_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_container_format(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_container_format(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_media_info_get_container_format(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_duration(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_media_info_get_duration(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_media_info_get_duration(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_image_sample(&self) -> Option<gst::Sample> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_image_sample(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_media_info_get_image_sample(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_number_of_audio_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_media_info_get_number_of_audio_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_number_of_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_streams(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_media_info_get_number_of_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_number_of_subtitle_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_media_info_get_number_of_subtitle_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_number_of_video_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_media_info_get_number_of_video_streams(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_stream_list(&self) -> Vec<PlayerStreamInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_stream_list(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_stream_list(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_subtitle_streams(&self) -> Vec<PlayerSubtitleInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_subtitle_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_tags(&self) -> Option<gst::TagList> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_tags(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_media_info_get_tags(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_title(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_title(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_media_info_get_title(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_uri(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_media_info_get_uri(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_media_info_get_uri(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_video_streams(&self) -> Vec<PlayerVideoInfo> {
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_none(ffi::gst_player_media_info_get_video_streams(self.to_glib_none().0))
|
||||
FromGlibPtrContainer::from_glib_none(gst_player_sys::gst_player_media_info_get_video_streams(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_live(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_media_info_is_live(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_media_info_is_live(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_seekable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_player_media_info_is_seekable(self.to_glib_none().0))
|
||||
from_glib(gst_player_sys::gst_player_media_info_is_seekable(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerSignalDispatcher(Interface<ffi::GstPlayerSignalDispatcher>);
|
||||
pub struct PlayerSignalDispatcher(Interface<gst_player_sys::GstPlayerSignalDispatcher>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_signal_dispatcher_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_signal_dispatcher_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerStreamInfo(Object<ffi::GstPlayerStreamInfo, ffi::GstPlayerStreamInfoClass, PlayerStreamInfoClass>);
|
||||
pub struct PlayerStreamInfo(Object<gst_player_sys::GstPlayerStreamInfo, gst_player_sys::GstPlayerStreamInfoClass, PlayerStreamInfoClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_stream_info_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_stream_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,31 +36,31 @@ pub trait PlayerStreamInfoExt: 'static {
|
|||
impl<O: IsA<PlayerStreamInfo>> PlayerStreamInfoExt for O {
|
||||
fn get_caps(&self) -> Option<gst::Caps> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_stream_info_get_caps(const_override(self.as_ref().to_glib_none().0)))
|
||||
from_glib_none(gst_player_sys::gst_player_stream_info_get_caps(const_override(self.as_ref().to_glib_none().0)))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_codec(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_stream_info_get_codec(const_override(self.as_ref().to_glib_none().0)))
|
||||
from_glib_none(gst_player_sys::gst_player_stream_info_get_codec(const_override(self.as_ref().to_glib_none().0)))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_index(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
|
||||
gst_player_sys::gst_player_stream_info_get_index(const_override(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream_type(&self) -> GString {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_stream_info_get_stream_type(const_override(self.as_ref().to_glib_none().0)))
|
||||
from_glib_none(gst_player_sys::gst_player_stream_info_get_stream_type(const_override(self.as_ref().to_glib_none().0)))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tags(&self) -> Option<gst::TagList> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_stream_info_get_tags(const_override(self.as_ref().to_glib_none().0)))
|
||||
from_glib_none(gst_player_sys::gst_player_stream_info_get_tags(const_override(self.as_ref().to_glib_none().0)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerSubtitleInfo(Object<ffi::GstPlayerSubtitleInfo, ffi::GstPlayerSubtitleInfoClass, PlayerSubtitleInfoClass>) @extends PlayerStreamInfo;
|
||||
pub struct PlayerSubtitleInfo(Object<gst_player_sys::GstPlayerSubtitleInfo, gst_player_sys::GstPlayerSubtitleInfoClass, PlayerSubtitleInfoClass>) @extends PlayerStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_subtitle_info_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_subtitle_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl PlayerSubtitleInfo {
|
||||
pub fn get_language(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_player_subtitle_info_get_language(self.to_glib_none().0))
|
||||
from_glib_none(gst_player_sys::gst_player_subtitle_info_get_language(self.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,39 +3,39 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use PlayerStreamInfo;
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerVideoInfo(Object<ffi::GstPlayerVideoInfo, ffi::GstPlayerVideoInfoClass, PlayerVideoInfoClass>) @extends PlayerStreamInfo;
|
||||
pub struct PlayerVideoInfo(Object<gst_player_sys::GstPlayerVideoInfo, gst_player_sys::GstPlayerVideoInfoClass, PlayerVideoInfoClass>) @extends PlayerStreamInfo;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_video_info_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_video_info_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl PlayerVideoInfo {
|
||||
pub fn get_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_bitrate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_video_info_get_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_height(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_height(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_video_info_get_height(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_max_bitrate(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_max_bitrate(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_video_info_get_max_bitrate(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_width(&self) -> i32 {
|
||||
unsafe {
|
||||
ffi::gst_player_video_info_get_width(self.to_glib_none().0)
|
||||
gst_player_sys::gst_player_video_info_get_width(self.to_glib_none().0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,34 +3,32 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use PlayerVideoRenderer;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::IsA;
|
||||
use glib::object::ObjectType;
|
||||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_player_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerVideoOverlayVideoRenderer(Object<ffi::GstPlayerVideoOverlayVideoRenderer, ffi::GstPlayerVideoOverlayVideoRendererClass, PlayerVideoOverlayVideoRendererClass>) @implements PlayerVideoRenderer;
|
||||
pub struct PlayerVideoOverlayVideoRenderer(Object<gst_player_sys::GstPlayerVideoOverlayVideoRenderer, gst_player_sys::GstPlayerVideoOverlayVideoRendererClass, PlayerVideoOverlayVideoRendererClass>) @implements PlayerVideoRenderer;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_video_overlay_video_renderer_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_video_overlay_video_renderer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
impl PlayerVideoOverlayVideoRenderer {
|
||||
pub fn expose(&self) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0);
|
||||
gst_player_sys::gst_player_video_overlay_video_renderer_expose(self.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,45 +38,45 @@ impl PlayerVideoOverlayVideoRenderer {
|
|||
let mut y = mem::uninitialized();
|
||||
let mut width = mem::uninitialized();
|
||||
let mut height = mem::uninitialized();
|
||||
ffi::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height);
|
||||
gst_player_sys::gst_player_video_overlay_video_renderer_get_render_rectangle(self.to_glib_none().0, &mut x, &mut y, &mut width, &mut height);
|
||||
(x, y, width, height)
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn get_window_handle(&self) -> /*Unimplemented*/Option<Fundamental: Pointer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_get_window_handle() }
|
||||
// unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_get_window_handle() }
|
||||
//}
|
||||
|
||||
pub fn set_render_rectangle(&self, x: i32, y: i32, width: i32, height: i32) {
|
||||
unsafe {
|
||||
ffi::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height);
|
||||
gst_player_sys::gst_player_video_overlay_video_renderer_set_render_rectangle(self.to_glib_none().0, x, y, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn set_window_handle(&self, window_handle: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_set_window_handle() }
|
||||
// unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_set_window_handle() }
|
||||
//}
|
||||
|
||||
pub fn get_property_video_sink(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<gst::Element as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_property_video_sink<P: IsA<gst::Element> + glib::value::SetValueOptional>(&self, video_sink: Option<&P>) {
|
||||
pub fn set_property_video_sink(&self, video_sink: Option<&gst::Element>) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.as_ptr() as *mut gobject_ffi::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.as_ptr() as *mut gobject_sys::GObject, b"video-sink\0".as_ptr() as *const _, Value::from(video_sink).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//pub fn new(window_handle: /*Unimplemented*/Option<Fundamental: Pointer>) -> Option<PlayerVideoRenderer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new() }
|
||||
// unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_new() }
|
||||
//}
|
||||
|
||||
//pub fn new_with_sink<P: IsA<gst::Element>>(window_handle: /*Unimplemented*/Option<Fundamental: Pointer>, video_sink: &P) -> Option<PlayerVideoRenderer> {
|
||||
// unsafe { TODO: call ffi::gst_player_video_overlay_video_renderer_new_with_sink() }
|
||||
// unsafe { TODO: call gst_player_sys:gst_player_video_overlay_video_renderer_new_with_sink() }
|
||||
//}
|
||||
|
||||
pub fn connect_property_video_sink_notify<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId {
|
||||
|
@ -101,12 +99,12 @@ impl PlayerVideoOverlayVideoRenderer {
|
|||
unsafe impl Send for PlayerVideoOverlayVideoRenderer {}
|
||||
unsafe impl Sync for PlayerVideoOverlayVideoRenderer {}
|
||||
|
||||
unsafe extern "C" fn notify_video_sink_trampoline<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_video_sink_trampoline<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_window_handle_trampoline<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(this: *mut ffi::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) {
|
||||
unsafe extern "C" fn notify_window_handle_trampoline<F: Fn(&PlayerVideoOverlayVideoRenderer) + Send + Sync + 'static>(this: *mut gst_player_sys::GstPlayerVideoOverlayVideoRenderer, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&from_glib_borrow(this))
|
||||
}
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct PlayerVideoRenderer(Interface<ffi::GstPlayerVideoRenderer>);
|
||||
pub struct PlayerVideoRenderer(Interface<gst_player_sys::GstPlayerVideoRenderer>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_player_video_renderer_get_type(),
|
||||
get_type => || gst_player_sys::gst_player_video_renderer_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_player_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct PlayerVisualization(Boxed<ffi::GstPlayerVisualization>);
|
||||
pub struct PlayerVisualization(Boxed<gst_player_sys::GstPlayerVisualization>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| ffi::gst_player_visualization_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_player_visualization_free(ptr),
|
||||
get_type => || ffi::gst_player_visualization_get_type(),
|
||||
copy => |ptr| gst_player_sys::gst_player_visualization_copy(mut_override(ptr)),
|
||||
free => |ptr| gst_player_sys::gst_player_visualization_free(ptr),
|
||||
get_type => || gst_player_sys::gst_player_visualization_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
|
||||
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
|
||||
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
|
||||
#[derive(Clone, Copy)]
|
||||
|
@ -26,23 +26,23 @@ pub enum RTSPAddressPoolResult {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPAddressPoolResult {
|
||||
type GlibType = ffi::GstRTSPAddressPoolResult;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPAddressPoolResult;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPAddressPoolResult {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressPoolResult {
|
||||
match *self {
|
||||
RTSPAddressPoolResult::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK,
|
||||
RTSPAddressPoolResult::Einval => ffi::GST_RTSP_ADDRESS_POOL_EINVAL,
|
||||
RTSPAddressPoolResult::Ereserved => ffi::GST_RTSP_ADDRESS_POOL_ERESERVED,
|
||||
RTSPAddressPoolResult::Erange => ffi::GST_RTSP_ADDRESS_POOL_ERANGE,
|
||||
RTSPAddressPoolResult::Elast => ffi::GST_RTSP_ADDRESS_POOL_ELAST,
|
||||
RTSPAddressPoolResult::Ok => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_OK,
|
||||
RTSPAddressPoolResult::Einval => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_EINVAL,
|
||||
RTSPAddressPoolResult::Ereserved => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERESERVED,
|
||||
RTSPAddressPoolResult::Erange => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ERANGE,
|
||||
RTSPAddressPoolResult::Elast => gst_rtsp_server_sys::GST_RTSP_ADDRESS_POOL_ELAST,
|
||||
RTSPAddressPoolResult::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
||||
fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPAddressPoolResult> for RTSPAddressPoolResult {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressPoolResult) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPAddressPoolResult::Ok,
|
||||
|
@ -67,21 +67,21 @@ pub enum RTSPFilterResult {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPFilterResult {
|
||||
type GlibType = ffi::GstRTSPFilterResult;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPFilterResult;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPFilterResult {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
match *self {
|
||||
RTSPFilterResult::Remove => ffi::GST_RTSP_FILTER_REMOVE,
|
||||
RTSPFilterResult::Keep => ffi::GST_RTSP_FILTER_KEEP,
|
||||
RTSPFilterResult::Ref => ffi::GST_RTSP_FILTER_REF,
|
||||
RTSPFilterResult::Remove => gst_rtsp_server_sys::GST_RTSP_FILTER_REMOVE,
|
||||
RTSPFilterResult::Keep => gst_rtsp_server_sys::GST_RTSP_FILTER_KEEP,
|
||||
RTSPFilterResult::Ref => gst_rtsp_server_sys::GST_RTSP_FILTER_REF,
|
||||
RTSPFilterResult::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPFilterResult> for RTSPFilterResult {
|
||||
fn from_glib(value: ffi::GstRTSPFilterResult) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPFilterResult> for RTSPFilterResult {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPFilterResult) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPFilterResult::Remove,
|
||||
|
@ -107,24 +107,24 @@ pub enum RTSPMediaStatus {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPMediaStatus {
|
||||
type GlibType = ffi::GstRTSPMediaStatus;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPMediaStatus;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPMediaStatus {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPMediaStatus {
|
||||
match *self {
|
||||
RTSPMediaStatus::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED,
|
||||
RTSPMediaStatus::Unpreparing => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARING,
|
||||
RTSPMediaStatus::Preparing => ffi::GST_RTSP_MEDIA_STATUS_PREPARING,
|
||||
RTSPMediaStatus::Prepared => ffi::GST_RTSP_MEDIA_STATUS_PREPARED,
|
||||
RTSPMediaStatus::Suspended => ffi::GST_RTSP_MEDIA_STATUS_SUSPENDED,
|
||||
RTSPMediaStatus::Error => ffi::GST_RTSP_MEDIA_STATUS_ERROR,
|
||||
RTSPMediaStatus::Unprepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARED,
|
||||
RTSPMediaStatus::Unpreparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_UNPREPARING,
|
||||
RTSPMediaStatus::Preparing => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARING,
|
||||
RTSPMediaStatus::Prepared => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_PREPARED,
|
||||
RTSPMediaStatus::Suspended => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_SUSPENDED,
|
||||
RTSPMediaStatus::Error => gst_rtsp_server_sys::GST_RTSP_MEDIA_STATUS_ERROR,
|
||||
RTSPMediaStatus::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPMediaStatus> for RTSPMediaStatus {
|
||||
fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPMediaStatus> for RTSPMediaStatus {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPMediaStatus) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPMediaStatus::Unprepared,
|
||||
|
@ -150,21 +150,21 @@ pub enum RTSPPublishClockMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPPublishClockMode {
|
||||
type GlibType = ffi::GstRTSPPublishClockMode;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPPublishClockMode;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPPublishClockMode {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPPublishClockMode {
|
||||
match *self {
|
||||
RTSPPublishClockMode::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
||||
RTSPPublishClockMode::Clock => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
||||
RTSPPublishClockMode::ClockAndOffset => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET,
|
||||
RTSPPublishClockMode::None => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_NONE,
|
||||
RTSPPublishClockMode::Clock => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK,
|
||||
RTSPPublishClockMode::ClockAndOffset => gst_rtsp_server_sys::GST_RTSP_PUBLISH_CLOCK_MODE_CLOCK_AND_OFFSET,
|
||||
RTSPPublishClockMode::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
||||
fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPPublishClockMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPPublishClockMode::None,
|
||||
|
@ -177,7 +177,7 @@ impl FromGlib<ffi::GstRTSPPublishClockMode> for RTSPPublishClockMode {
|
|||
|
||||
impl StaticType for RTSPPublishClockMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) }
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_publish_clock_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,13 +189,13 @@ impl<'a> FromValueOptional<'a> for RTSPPublishClockMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPPublishClockMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPPublishClockMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,21 +211,21 @@ pub enum RTSPSuspendMode {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPSuspendMode {
|
||||
type GlibType = ffi::GstRTSPSuspendMode;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPSuspendMode;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPSuspendMode {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPSuspendMode {
|
||||
match *self {
|
||||
RTSPSuspendMode::None => ffi::GST_RTSP_SUSPEND_MODE_NONE,
|
||||
RTSPSuspendMode::Pause => ffi::GST_RTSP_SUSPEND_MODE_PAUSE,
|
||||
RTSPSuspendMode::Reset => ffi::GST_RTSP_SUSPEND_MODE_RESET,
|
||||
RTSPSuspendMode::None => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_NONE,
|
||||
RTSPSuspendMode::Pause => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_PAUSE,
|
||||
RTSPSuspendMode::Reset => gst_rtsp_server_sys::GST_RTSP_SUSPEND_MODE_RESET,
|
||||
RTSPSuspendMode::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPSuspendMode> for RTSPSuspendMode {
|
||||
fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPSuspendMode> for RTSPSuspendMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPSuspendMode) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPSuspendMode::None,
|
||||
|
@ -238,7 +238,7 @@ impl FromGlib<ffi::GstRTSPSuspendMode> for RTSPSuspendMode {
|
|||
|
||||
impl StaticType for RTSPSuspendMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) }
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_suspend_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,13 +250,13 @@ impl<'a> FromValueOptional<'a> for RTSPSuspendMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPSuspendMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPSuspendMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,20 +271,20 @@ pub enum RTSPThreadType {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPThreadType {
|
||||
type GlibType = ffi::GstRTSPThreadType;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPThreadType;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPThreadType {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPThreadType {
|
||||
match *self {
|
||||
RTSPThreadType::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT,
|
||||
RTSPThreadType::Media => ffi::GST_RTSP_THREAD_TYPE_MEDIA,
|
||||
RTSPThreadType::Client => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_CLIENT,
|
||||
RTSPThreadType::Media => gst_rtsp_server_sys::GST_RTSP_THREAD_TYPE_MEDIA,
|
||||
RTSPThreadType::__Unknown(value) => value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPThreadType> for RTSPThreadType {
|
||||
fn from_glib(value: ffi::GstRTSPThreadType) -> Self {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPThreadType> for RTSPThreadType {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPThreadType) -> Self {
|
||||
skip_assert_initialized!();
|
||||
match value {
|
||||
0 => RTSPThreadType::Client,
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Type;
|
||||
use glib::translate::*;
|
||||
|
@ -10,7 +9,8 @@ use glib::value::FromValue;
|
|||
use glib::value::FromValueOptional;
|
||||
use glib::value::SetValue;
|
||||
use glib::value::Value;
|
||||
use gobject_ffi;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
bitflags! {
|
||||
pub struct RTSPAddressFlags: u32 {
|
||||
|
@ -25,16 +25,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPAddressFlags {
|
||||
type GlibType = ffi::GstRTSPAddressFlags;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPAddressFlags;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPAddressFlags {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPAddressFlags {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPAddressFlags> for RTSPAddressFlags {
|
||||
fn from_glib(value: ffi::GstRTSPAddressFlags) -> RTSPAddressFlags {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPAddressFlags> for RTSPAddressFlags {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPAddressFlags) -> RTSPAddressFlags {
|
||||
skip_assert_initialized!();
|
||||
RTSPAddressFlags::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -49,16 +49,16 @@ bitflags! {
|
|||
|
||||
#[doc(hidden)]
|
||||
impl ToGlib for RTSPTransportMode {
|
||||
type GlibType = ffi::GstRTSPTransportMode;
|
||||
type GlibType = gst_rtsp_server_sys::GstRTSPTransportMode;
|
||||
|
||||
fn to_glib(&self) -> ffi::GstRTSPTransportMode {
|
||||
fn to_glib(&self) -> gst_rtsp_server_sys::GstRTSPTransportMode {
|
||||
self.bits()
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl FromGlib<ffi::GstRTSPTransportMode> for RTSPTransportMode {
|
||||
fn from_glib(value: ffi::GstRTSPTransportMode) -> RTSPTransportMode {
|
||||
impl FromGlib<gst_rtsp_server_sys::GstRTSPTransportMode> for RTSPTransportMode {
|
||||
fn from_glib(value: gst_rtsp_server_sys::GstRTSPTransportMode) -> RTSPTransportMode {
|
||||
skip_assert_initialized!();
|
||||
RTSPTransportMode::from_bits_truncate(value)
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ impl FromGlib<ffi::GstRTSPTransportMode> for RTSPTransportMode {
|
|||
|
||||
impl StaticType for RTSPTransportMode {
|
||||
fn static_type() -> Type {
|
||||
unsafe { from_glib(ffi::gst_rtsp_transport_mode_get_type()) }
|
||||
unsafe { from_glib(gst_rtsp_server_sys::gst_rtsp_transport_mode_get_type()) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,13 +78,13 @@ impl<'a> FromValueOptional<'a> for RTSPTransportMode {
|
|||
|
||||
impl<'a> FromValue<'a> for RTSPTransportMode {
|
||||
unsafe fn from_value(value: &Value) -> Self {
|
||||
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
|
||||
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
impl SetValue for RTSPTransportMode {
|
||||
unsafe fn set_value(value: &mut Value, this: &Self) {
|
||||
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
// from gir-files (https://github.com/gtk-rs/gir-files)
|
||||
// DO NOT EDIT
|
||||
|
||||
use ffi;
|
||||
use glib::translate::*;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct RTSPAddress(Boxed<ffi::GstRTSPAddress>);
|
||||
pub struct RTSPAddress(Boxed<gst_rtsp_server_sys::GstRTSPAddress>);
|
||||
|
||||
match fn {
|
||||
copy => |ptr| ffi::gst_rtsp_address_copy(mut_override(ptr)),
|
||||
free => |ptr| ffi::gst_rtsp_address_free(ptr),
|
||||
get_type => || ffi::gst_rtsp_address_get_type(),
|
||||
copy => |ptr| gst_rtsp_server_sys::gst_rtsp_address_copy(mut_override(ptr)),
|
||||
free => |ptr| gst_rtsp_server_sys::gst_rtsp_address_free(ptr),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_address_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
|
||||
use RTSPAddress;
|
||||
use RTSPAddressFlags;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::object::IsA;
|
||||
use glib::translate::*;
|
||||
use gst_rtsp_server_sys;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPAddressPool(Object<ffi::GstRTSPAddressPool, ffi::GstRTSPAddressPoolClass, RTSPAddressPoolClass>);
|
||||
pub struct RTSPAddressPool(Object<gst_rtsp_server_sys::GstRTSPAddressPool, gst_rtsp_server_sys::GstRTSPAddressPoolClass, RTSPAddressPoolClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_address_pool_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_address_pool_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ impl RTSPAddressPool {
|
|||
pub fn new() -> RTSPAddressPool {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_address_pool_new())
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,31 +52,31 @@ pub trait RTSPAddressPoolExt: 'static {
|
|||
impl<O: IsA<RTSPAddressPool>> RTSPAddressPoolExt for O {
|
||||
fn acquire_address(&self, flags: RTSPAddressFlags, n_ports: i32) -> Option<RTSPAddress> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_address_pool_acquire_address(self.as_ref().to_glib_none().0, flags.to_glib(), n_ports))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_address_pool_acquire_address(self.as_ref().to_glib_none().0, flags.to_glib(), n_ports))
|
||||
}
|
||||
}
|
||||
|
||||
fn add_range(&self, min_address: &str, max_address: &str, min_port: u16, max_port: u16, ttl: u8) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_rtsp_address_pool_add_range(self.as_ref().to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range")
|
||||
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_address_pool_add_range(self.as_ref().to_glib_none().0, min_address.to_glib_none().0, max_address.to_glib_none().0, min_port, max_port, ttl), "Failed to add address range")
|
||||
}
|
||||
}
|
||||
|
||||
fn clear(&self) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_clear(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn dump(&self) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_address_pool_dump(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn has_unicast_addresses(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_address_pool_has_unicast_addresses(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_address_pool_has_unicast_addresses(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use RTSPToken;
|
||||
use ffi;
|
||||
use gio;
|
||||
use gio_ffi;
|
||||
use gio_sys;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::object::Cast;
|
||||
|
@ -13,17 +12,18 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use glib_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPAuth(Object<ffi::GstRTSPAuth, ffi::GstRTSPAuthClass, RTSPAuthClass>);
|
||||
pub struct RTSPAuth(Object<gst_rtsp_server_sys::GstRTSPAuth, gst_rtsp_server_sys::GstRTSPAuthClass, RTSPAuthClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_auth_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_auth_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,21 +31,21 @@ impl RTSPAuth {
|
|||
pub fn new() -> RTSPAuth {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_auth_new())
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_new())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn check(check: &str) -> Result<(), glib::error::BoolError> {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_rtsp_auth_check(check.to_glib_none().0), "Check failed")
|
||||
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_auth_check(check.to_glib_none().0), "Check failed")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn make_basic(user: &str, pass: &str) -> GString {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_make_basic(user.to_glib_none().0, pass.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,9 +88,9 @@ pub trait RTSPAuthExt: 'static {
|
|||
|
||||
fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode);
|
||||
|
||||
fn set_tls_certificate<'a, P: IsA<gio::TlsCertificate> + 'a, Q: Into<Option<&'a P>>>(&self, cert: Q);
|
||||
fn set_tls_certificate<P: IsA<gio::TlsCertificate>>(&self, cert: Option<&P>);
|
||||
|
||||
fn set_tls_database<'a, P: IsA<gio::TlsDatabase> + 'a, Q: Into<Option<&'a P>>>(&self, database: Q);
|
||||
fn set_tls_database<P: IsA<gio::TlsDatabase>>(&self, database: Option<&P>);
|
||||
|
||||
fn connect_accept_certificate<F: Fn(&Self, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(&self, f: F) -> SignalHandlerId;
|
||||
}
|
||||
|
@ -98,85 +98,83 @@ pub trait RTSPAuthExt: 'static {
|
|||
impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
||||
fn add_basic(&self, basic: &str, token: &RTSPToken) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_add_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_add_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0, token.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_add_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0, pass.to_glib_none().0, token.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_add_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0, pass.to_glib_none().0, token.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_default_token(&self) -> Option<RTSPToken> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_default_token(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_default_token(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn get_supported_methods(&self) -> gst_rtsp::RTSPAuthMethod {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_auth_get_supported_methods(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_auth_get_supported_methods(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tls_authentication_mode(&self) -> gio::TlsAuthenticationMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_auth_get_tls_authentication_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_authentication_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tls_certificate(&self) -> Option<gio::TlsCertificate> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_tls_certificate(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_certificate(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_tls_database(&self) -> Option<gio::TlsDatabase> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_auth_get_tls_database(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_auth_get_tls_database(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn remove_basic(&self, basic: &str) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_remove_basic(self.as_ref().to_glib_none().0, basic.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn remove_digest(&self, user: &str) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_remove_digest(self.as_ref().to_glib_none().0, user.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
fn set_supported_methods(&self, methods: gst_rtsp::RTSPAuthMethod) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_set_supported_methods(self.as_ref().to_glib_none().0, methods.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_supported_methods(self.as_ref().to_glib_none().0, methods.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_tls_authentication_mode(&self, mode: gio::TlsAuthenticationMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_set_tls_authentication_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_authentication_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_tls_certificate<'a, P: IsA<gio::TlsCertificate> + 'a, Q: Into<Option<&'a P>>>(&self, cert: Q) {
|
||||
let cert = cert.into();
|
||||
fn set_tls_certificate<P: IsA<gio::TlsCertificate>>(&self, cert: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_set_tls_certificate(self.as_ref().to_glib_none().0, cert.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_certificate(self.as_ref().to_glib_none().0, cert.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_tls_database<'a, P: IsA<gio::TlsDatabase> + 'a, Q: Into<Option<&'a P>>>(&self, database: Q) {
|
||||
let database = database.into();
|
||||
fn set_tls_database<P: IsA<gio::TlsDatabase>>(&self, database: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_auth_set_tls_database(self.as_ref().to_glib_none().0, database.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_auth_set_tls_database(self.as_ref().to_glib_none().0, database.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,7 +187,7 @@ impl<O: IsA<RTSPAuth>> RTSPAuthExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn accept_certificate_trampoline<P, F: Fn(&P, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(this: *mut ffi::GstRTSPAuth, connection: *mut gio_ffi::GTlsConnection, peer_cert: *mut gio_ffi::GTlsCertificate, errors: gio_ffi::GTlsCertificateFlags, f: glib_ffi::gpointer) -> glib_ffi::gboolean
|
||||
unsafe extern "C" fn accept_certificate_trampoline<P, F: Fn(&P, &gio::TlsConnection, &gio::TlsCertificate, gio::TlsCertificateFlags) -> bool + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPAuth, connection: *mut gio_sys::GTlsConnection, peer_cert: *mut gio_sys::GTlsCertificate, errors: gio_sys::GTlsCertificateFlags, f: glib_sys::gpointer) -> glib_sys::gboolean
|
||||
where P: IsA<RTSPAuth> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPAuth::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(connection), &from_glib_borrow(peer_cert), from_glib(errors)).to_glib()
|
||||
|
|
|
@ -9,7 +9,6 @@ use RTSPMountPoints;
|
|||
use RTSPSession;
|
||||
use RTSPSessionPool;
|
||||
use RTSPThreadPool;
|
||||
use ffi;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
use glib::object::Cast;
|
||||
|
@ -17,20 +16,21 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
use gst_rtsp_ffi;
|
||||
use gst_rtsp_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPClient(Object<ffi::GstRTSPClient, ffi::GstRTSPClientClass, RTSPClientClass>);
|
||||
pub struct RTSPClient(Object<gst_rtsp_server_sys::GstRTSPClient, gst_rtsp_server_sys::GstRTSPClientClass, RTSPClientClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_client_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_client_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ impl RTSPClient {
|
|||
pub fn new() -> RTSPClient {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_client_new())
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,21 +69,21 @@ pub trait RTSPClientExt: 'static {
|
|||
|
||||
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
||||
|
||||
//fn send_message<'a, P: IsA<RTSPSession> + 'a, Q: Into<Option<&'a P>>>(&self, session: Q, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
||||
//fn send_message<P: IsA<RTSPSession>>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult;
|
||||
|
||||
fn session_filter(&self, func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>) -> Vec<RTSPSession>;
|
||||
|
||||
fn set_auth<'a, P: IsA<RTSPAuth> + 'a, Q: Into<Option<&'a P>>>(&self, auth: Q);
|
||||
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>);
|
||||
|
||||
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool;
|
||||
|
||||
fn set_mount_points<'a, P: IsA<RTSPMountPoints> + 'a, Q: Into<Option<&'a P>>>(&self, mounts: Q);
|
||||
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>);
|
||||
|
||||
fn set_session_pool<'a, P: IsA<RTSPSessionPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q);
|
||||
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>);
|
||||
|
||||
fn set_thread_pool<'a, P: IsA<RTSPThreadPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q);
|
||||
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>);
|
||||
|
||||
fn get_property_drop_backlog(&self) -> bool;
|
||||
|
||||
|
@ -159,49 +159,49 @@ pub trait RTSPClientExt: 'static {
|
|||
impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
||||
fn close(&self) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_client_close(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_auth(&self) -> Option<RTSPAuth> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_client_get_auth(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_auth(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_connection(&self) -> /*Ignored*/Option<gst_rtsp::RTSPConnection> {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_client_get_connection() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_get_connection() }
|
||||
//}
|
||||
|
||||
fn get_mount_points(&self) -> Option<RTSPMountPoints> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_client_get_mount_points(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_mount_points(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_session_pool(&self) -> Option<RTSPSessionPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_client_get_session_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_session_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_thread_pool(&self) -> Option<RTSPThreadPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_client_get_thread_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_get_thread_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn handle_message(&self, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_client_handle_message() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_handle_message() }
|
||||
//}
|
||||
|
||||
//fn send_message<'a, P: IsA<RTSPSession> + 'a, Q: Into<Option<&'a P>>>(&self, session: Q, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_client_send_message() }
|
||||
//fn send_message<P: IsA<RTSPSession>>(&self, session: Option<&P>, message: /*Ignored*/&mut gst_rtsp::RTSPMessage) -> gst_rtsp::RTSPResult {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_send_message() }
|
||||
//}
|
||||
|
||||
fn session_filter(&self, func: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>) -> Vec<RTSPSession> {
|
||||
let func_data: Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = func;
|
||||
unsafe extern "C" fn func_func(client: *mut ffi::GstRTSPClient, sess: *mut ffi::GstRTSPSession, user_data: glib_ffi::gpointer) -> ffi::GstRTSPFilterResult {
|
||||
unsafe extern "C" fn func_func(client: *mut gst_rtsp_server_sys::GstRTSPClient, sess: *mut gst_rtsp_server_sys::GstRTSPSession, user_data: glib_sys::gpointer) -> gst_rtsp_server_sys::GstRTSPFilterResult {
|
||||
let client = from_glib_borrow(client);
|
||||
let sess = from_glib_borrow(sess);
|
||||
let callback: *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = user_data as *const _ as usize as *mut Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)>;
|
||||
|
@ -212,60 +212,56 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
};
|
||||
res.to_glib()
|
||||
}
|
||||
let func = Some(func_func as _);
|
||||
let func = if func_data.is_some() { Some(func_func as _) } else { None };
|
||||
let super_callback0: &Option<&mut dyn (FnMut(&RTSPClient, &RTSPSession) -> RTSPFilterResult)> = &func_data;
|
||||
unsafe {
|
||||
FromGlibPtrContainer::from_glib_full(ffi::gst_rtsp_client_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _))
|
||||
FromGlibPtrContainer::from_glib_full(gst_rtsp_server_sys::gst_rtsp_client_session_filter(self.as_ref().to_glib_none().0, func, super_callback0 as *const _ as usize as *mut _))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_auth<'a, P: IsA<RTSPAuth> + 'a, Q: Into<Option<&'a P>>>(&self, auth: Q) {
|
||||
let auth = auth.into();
|
||||
fn set_auth<P: IsA<RTSPAuth>>(&self, auth: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_client_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_auth(self.as_ref().to_glib_none().0, auth.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_client_set_connection() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_connection() }
|
||||
//}
|
||||
|
||||
fn set_mount_points<'a, P: IsA<RTSPMountPoints> + 'a, Q: Into<Option<&'a P>>>(&self, mounts: Q) {
|
||||
let mounts = mounts.into();
|
||||
fn set_mount_points<P: IsA<RTSPMountPoints>>(&self, mounts: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_client_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_mount_points(self.as_ref().to_glib_none().0, mounts.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_send_func(&self, func: /*Unimplemented*/Fn(&RTSPClient, /*Ignored*/gst_rtsp::RTSPMessage, bool) -> bool, user_data: /*Unimplemented*/Option<Fundamental: Pointer>) {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_client_set_send_func() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_client_set_send_func() }
|
||||
//}
|
||||
|
||||
fn set_session_pool<'a, P: IsA<RTSPSessionPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q) {
|
||||
let pool = pool.into();
|
||||
fn set_session_pool<P: IsA<RTSPSessionPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_session_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_thread_pool<'a, P: IsA<RTSPThreadPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q) {
|
||||
let pool = pool.into();
|
||||
fn set_thread_pool<P: IsA<RTSPThreadPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_client_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_client_set_thread_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_drop_backlog(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"drop-backlog\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_drop_backlog(&self, drop_backlog: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"drop-backlog\0".as_ptr() as *const _, Value::from(&drop_backlog).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -496,167 +492,167 @@ impl<O: IsA<RTSPClient>> RTSPClientExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn announce_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn announce_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn closed_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn closed_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn describe_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn describe_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn get_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn get_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn handle_response_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn handle_response_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn new_session_trampoline<P, F: Fn(&P, &RTSPSession) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, object: *mut ffi::GstRTSPSession, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn new_session_trampoline<P, F: Fn(&P, &RTSPSession) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, object: *mut gst_rtsp_server_sys::GstRTSPSession, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn options_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn options_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn pause_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn pause_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn play_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn play_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_announce_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_announce_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_describe_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_describe_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_get_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_get_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_options_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_options_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_pause_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_pause_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_play_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_play_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_record_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_record_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_set_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_set_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_setup_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_setup_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||
unsafe extern "C" fn pre_teardown_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer) -> gst_rtsp_ffi::GstRTSPStatusCode
|
||||
unsafe extern "C" fn pre_teardown_request_trampoline<P, F: Fn(&P, &RTSPContext) -> gst_rtsp::RTSPStatusCode + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer) -> gst_rtsp_sys::GstRTSPStatusCode
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx)).to_glib()
|
||||
}
|
||||
|
||||
unsafe extern "C" fn record_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn record_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn set_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn set_parameter_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn setup_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn setup_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn teardown_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, ctx: *mut ffi::GstRTSPContext, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn teardown_request_trampoline<P, F: Fn(&P, &RTSPContext) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPClient, ctx: *mut gst_rtsp_server_sys::GstRTSPContext, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPClient> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPClient::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(ctx))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_drop_backlog_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_drop_backlog_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_mount_points_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_mount_points_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())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_session_pool_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPClient, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_session_pool_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())
|
||||
|
|
|
@ -8,7 +8,6 @@ use RTSPPublishClockMode;
|
|||
use RTSPStream;
|
||||
use RTSPSuspendMode;
|
||||
use RTSPTransportMode;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
|
@ -18,19 +17,20 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use libc;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMedia(Object<ffi::GstRTSPMedia, ffi::GstRTSPMediaClass, RTSPMediaClass>);
|
||||
pub struct RTSPMedia(Object<gst_rtsp_server_sys::GstRTSPMedia, gst_rtsp_server_sys::GstRTSPMediaClass, RTSPMediaClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_media_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_media_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ impl RTSPMedia {
|
|||
pub fn new<P: IsA<gst::Element>>(element: &P) -> RTSPMedia {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_new(element.as_ref().to_glib_full()))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_new(element.as_ref().to_glib_full()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
fn get_suspend_mode(&self) -> RTSPSuspendMode;
|
||||
|
||||
//fn get_time_provider<'a, P: Into<Option<&'a str>>>(&self, address: P, port: u16) -> /*Ignored*/Option<gst_net::NetTimeProvider>;
|
||||
//fn get_time_provider(&self, address: Option<&str>, port: u16) -> /*Ignored*/Option<gst_net::NetTimeProvider>;
|
||||
|
||||
fn get_transport_mode(&self) -> RTSPTransportMode;
|
||||
|
||||
|
@ -115,17 +115,17 @@ pub trait RTSPMediaExt: 'static {
|
|||
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff;
|
||||
|
||||
fn set_address_pool<'a, P: IsA<RTSPAddressPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q);
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
|
||||
|
||||
fn set_buffer_size(&self, size: u32);
|
||||
|
||||
fn set_clock<'a, P: IsA<gst::Clock> + 'a, Q: Into<Option<&'a P>>>(&self, clock: Q);
|
||||
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>);
|
||||
|
||||
fn set_eos_shutdown(&self, eos_shutdown: bool);
|
||||
|
||||
fn set_latency(&self, latency: u32);
|
||||
|
||||
fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(&self, multicast_iface: P);
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>);
|
||||
|
||||
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>);
|
||||
|
||||
|
@ -213,331 +213,328 @@ pub trait RTSPMediaExt: 'static {
|
|||
impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
||||
fn collect_streams(&self) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_collect_streams(self.as_ref().to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn complete_pipeline(&self, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 9, id: 31 }) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_complete_pipeline() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_complete_pipeline() }
|
||||
//}
|
||||
|
||||
fn create_stream<P: IsA<gst::Element>, Q: IsA<gst::Pad>>(&self, payloader: &P, pad: &Q) -> Option<RTSPStream> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_rtsp_media_create_stream(self.as_ref().to_glib_none().0, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0))
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_create_stream(self.as_ref().to_glib_none().0, payloader.as_ref().to_glib_none().0, pad.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn find_stream(&self, control: &str) -> Option<RTSPStream> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_rtsp_media_find_stream(self.as_ref().to_glib_none().0, control.to_glib_none().0))
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_find_stream(self.as_ref().to_glib_none().0, control.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_get_address_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_address_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_base_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_base_time(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_base_time(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_buffer_size(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0)
|
||||
gst_rtsp_server_sys::gst_rtsp_media_get_buffer_size(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_get_clock(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_clock(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_element(&self) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_element(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_latency(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0)
|
||||
gst_rtsp_server_sys::gst_rtsp_media_get_latency(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_multicast_iface(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_get_permissions() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_get_permissions() }
|
||||
//}
|
||||
|
||||
fn get_profiles(&self) -> gst_rtsp::RTSPProfile {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_profiles(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_profiles(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_protocols(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_protocols(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_publish_clock_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_publish_clock_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_range_string(&self, play: bool, unit: gst_rtsp::RTSPRangeUnit) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_get_range_string(self.as_ref().to_glib_none().0, play.to_glib(), unit.to_glib()))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_get_range_string(self.as_ref().to_glib_none().0, play.to_glib(), unit.to_glib()))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_retransmission_time(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_retransmission_time(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_status(&self) -> RTSPMediaStatus {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_status(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_status(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_stream(&self, idx: u32) -> Option<RTSPStream> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_rtsp_media_get_stream(self.as_ref().to_glib_none().0, idx))
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_get_stream(self.as_ref().to_glib_none().0, idx))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_suspend_mode(&self) -> RTSPSuspendMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_suspend_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_suspend_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_time_provider<'a, P: Into<Option<&'a str>>>(&self, address: P, port: u16) -> /*Ignored*/Option<gst_net::NetTimeProvider> {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_get_time_provider() }
|
||||
//fn get_time_provider(&self, address: Option<&str>, port: u16) -> /*Ignored*/Option<gst_net::NetTimeProvider> {
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_get_time_provider() }
|
||||
//}
|
||||
|
||||
fn get_transport_mode(&self) -> RTSPTransportMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_get_transport_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_get_transport_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn handle_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_handle_sdp() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_handle_sdp() }
|
||||
//}
|
||||
|
||||
fn is_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_eos_shutdown(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_reusable(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_is_reusable(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_reusable(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_shared(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_is_shared(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_shared(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_stop_on_disconnect(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_is_stop_on_disconnect(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_stop_on_disconnect(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_time_provider(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_is_time_provider(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_is_time_provider(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn n_streams(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0)
|
||||
gst_rtsp_server_sys::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
//fn prepare(&self, thread: /*Ignored*/Option<&mut RTSPThread>) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_prepare() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_prepare() }
|
||||
//}
|
||||
|
||||
//fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_seek() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek() }
|
||||
//}
|
||||
|
||||
//fn seek_full(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange, flags: /*Ignored*/gst::SeekFlags) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_seek_full() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seek_full() }
|
||||
//}
|
||||
|
||||
//fn seekable(&self) -> /*Ignored*/gst::ClockTimeDiff {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_seekable() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_seekable() }
|
||||
//}
|
||||
|
||||
fn set_address_pool<'a, P: IsA<RTSPAddressPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q) {
|
||||
let pool = pool.into();
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_buffer_size(&self, size: u32) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_clock<'a, P: IsA<gst::Clock> + 'a, Q: Into<Option<&'a P>>>(&self, clock: Q) {
|
||||
let clock = clock.into();
|
||||
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_eos_shutdown(&self, eos_shutdown: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_latency(&self, latency: u32) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_latency(self.as_ref().to_glib_none().0, latency);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(&self, multicast_iface: P) {
|
||||
let multicast_iface = multicast_iface.into();
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_set_permissions() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_permissions() }
|
||||
//}
|
||||
|
||||
fn set_pipeline_state(&self, state: gst::State) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_pipeline_state(self.as_ref().to_glib_none().0, state.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_pipeline_state(self.as_ref().to_glib_none().0, state.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_reusable(&self, reusable: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_reusable(self.as_ref().to_glib_none().0, reusable.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_shared(&self, shared: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_shared(self.as_ref().to_glib_none().0, shared.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_state(&self, state: gst::State, transports: /*Unknown conversion*//*Unimplemented*/PtrArray TypeId { ns_id: 1, id: 26 }) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_set_state() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_set_state() }
|
||||
//}
|
||||
|
||||
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_transport_mode(&self, mode: RTSPTransportMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
//fn setup_sdp(&self, sdp: /*Ignored*/&mut gst_sdp::SDPMessage, info: /*Ignored*/&mut SDPInfo) -> bool {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_setup_sdp() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_setup_sdp() }
|
||||
//}
|
||||
|
||||
fn suspend(&self) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0), "Failed to suspend media")
|
||||
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_suspend(self.as_ref().to_glib_none().0), "Failed to suspend media")
|
||||
}
|
||||
}
|
||||
|
||||
fn take_pipeline<P: IsA<gst::Pipeline>>(&self, pipeline: &P) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_take_pipeline(self.as_ref().to_glib_none().0, pipeline.as_ref().to_glib_full());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_take_pipeline(self.as_ref().to_glib_none().0, pipeline.as_ref().to_glib_full());
|
||||
}
|
||||
}
|
||||
|
||||
fn unprepare(&self) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0), "Failed to unprepare media")
|
||||
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_unprepare(self.as_ref().to_glib_none().0), "Failed to unprepare media")
|
||||
}
|
||||
}
|
||||
|
||||
fn unsuspend(&self) -> Result<(), glib::error::BoolError> {
|
||||
unsafe {
|
||||
glib_result_from_gboolean!(ffi::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0), "Failed to unsuspend media")
|
||||
glib_result_from_gboolean!(gst_rtsp_server_sys::gst_rtsp_media_unsuspend(self.as_ref().to_glib_none().0), "Failed to unsuspend media")
|
||||
}
|
||||
}
|
||||
|
||||
fn use_time_provider(&self, time_provider: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_use_time_provider(self.as_ref().to_glib_none().0, time_provider.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_use_time_provider(self.as_ref().to_glib_none().0, time_provider.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +542,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
fn get_property_reusable(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"reusable\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -553,7 +550,7 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
fn get_property_shared(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -561,14 +558,14 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
fn get_property_stop_on_disconnect(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_time_provider(&self, time_provider: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"time-provider\0".as_ptr() as *const _, Value::from(&time_provider).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -717,109 +714,109 @@ impl<O: IsA<RTSPMedia>> RTSPMediaExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn new_state_trampoline<P, F: Fn(&P, i32) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn new_state_trampoline<P, F: Fn(&P, i32) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: libc::c_int, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn new_stream_trampoline<P, F: Fn(&P, &RTSPStream) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn new_stream_trampoline<P, F: Fn(&P, &RTSPStream) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: *mut gst_rtsp_server_sys::GstRTSPStream, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn prepared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn prepared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn removed_stream_trampoline<P, F: Fn(&P, &RTSPStream) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, object: *mut ffi::GstRTSPStream, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn removed_stream_trampoline<P, F: Fn(&P, &RTSPStream) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: *mut gst_rtsp_server_sys::GstRTSPStream, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn target_state_trampoline<P, F: Fn(&P, i32) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, object: libc::c_int, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn target_state_trampoline<P, F: Fn(&P, i32) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, object: libc::c_int, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast(), object)
|
||||
}
|
||||
|
||||
unsafe extern "C" fn unprepared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn unprepared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_clock_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_clock_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_eos_shutdown_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_eos_shutdown_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_reusable_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_reusable_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_shared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_shared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stop_on_disconnect_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_stop_on_disconnect_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_suspend_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_suspend_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_time_provider_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_time_provider_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_transport_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMedia, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_transport_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMedia, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMedia> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMedia::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -7,7 +7,6 @@ use RTSPMedia;
|
|||
use RTSPPublishClockMode;
|
||||
use RTSPSuspendMode;
|
||||
use RTSPTransportMode;
|
||||
use ffi;
|
||||
use glib;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
|
@ -17,18 +16,19 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst;
|
||||
use gst_rtsp;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMediaFactory(Object<ffi::GstRTSPMediaFactory, ffi::GstRTSPMediaFactoryClass, RTSPMediaFactoryClass>);
|
||||
pub struct RTSPMediaFactory(Object<gst_rtsp_server_sys::GstRTSPMediaFactory, gst_rtsp_server_sys::GstRTSPMediaFactoryClass, RTSPMediaFactoryClass>);
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_media_factory_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ impl RTSPMediaFactory {
|
|||
pub fn new() -> RTSPMediaFactory {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_new())
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,11 +93,11 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
fn is_stop_on_disonnect(&self) -> bool;
|
||||
|
||||
fn set_address_pool<'a, P: IsA<RTSPAddressPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q);
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>);
|
||||
|
||||
fn set_buffer_size(&self, size: u32);
|
||||
|
||||
fn set_clock<'a, P: IsA<gst::Clock> + 'a, Q: Into<Option<&'a P>>>(&self, clock: Q);
|
||||
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>);
|
||||
|
||||
fn set_eos_shutdown(&self, eos_shutdown: bool);
|
||||
|
||||
|
@ -107,7 +107,7 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
fn set_media_gtype(&self, media_gtype: glib::types::Type);
|
||||
|
||||
fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(&self, multicast_iface: P);
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>);
|
||||
|
||||
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>);
|
||||
|
||||
|
@ -162,228 +162,225 @@ pub trait RTSPMediaFactoryExt: 'static {
|
|||
|
||||
impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
||||
//fn add_role(&self, role: &str, fieldname: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_factory_add_role() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_add_role() }
|
||||
//}
|
||||
|
||||
fn construct(&self, url: &gst_rtsp::RTSPUrl) -> Option<RTSPMedia> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_construct(self.as_ref().to_glib_none().0, url.to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_construct(self.as_ref().to_glib_none().0, url.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn create_element(&self, url: &gst_rtsp::RTSPUrl) -> Option<gst::Element> {
|
||||
unsafe {
|
||||
from_glib_none(ffi::gst_rtsp_media_factory_create_element(self.as_ref().to_glib_none().0, url.to_glib_none().0))
|
||||
from_glib_none(gst_rtsp_server_sys::gst_rtsp_media_factory_create_element(self.as_ref().to_glib_none().0, url.to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_address_pool(&self) -> Option<RTSPAddressPool> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_address_pool(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_address_pool(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_buffer_size(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0)
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_buffer_size(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_clock(&self) -> Option<gst::Clock> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_clock(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_clock(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_latency(&self) -> u32 {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0)
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_get_latency(self.as_ref().to_glib_none().0)
|
||||
}
|
||||
}
|
||||
|
||||
fn get_launch(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_launch(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_launch(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_media_gtype(&self) -> glib::types::Type {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_media_gtype(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_multicast_iface(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_get_multicast_iface(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_get_multicast_iface(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
//fn get_permissions(&self) -> /*Ignored*/Option<RTSPPermissions> {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_factory_get_permissions() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_get_permissions() }
|
||||
//}
|
||||
|
||||
fn get_profiles(&self) -> gst_rtsp::RTSPProfile {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_profiles(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_profiles(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_protocols(&self) -> gst_rtsp::RTSPLowerTrans {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_protocols(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_protocols(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_publish_clock_mode(&self) -> RTSPPublishClockMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_publish_clock_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_publish_clock_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_retransmission_time(&self) -> gst::ClockTime {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_retransmission_time(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_retransmission_time(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_suspend_mode(&self) -> RTSPSuspendMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_suspend_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_suspend_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn get_transport_mode(&self) -> RTSPTransportMode {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_get_transport_mode(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_get_transport_mode(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_eos_shutdown(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_shared(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_shared(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_shared(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn is_stop_on_disonnect(&self) -> bool {
|
||||
unsafe {
|
||||
from_glib(ffi::gst_rtsp_media_factory_is_stop_on_disonnect(self.as_ref().to_glib_none().0))
|
||||
from_glib(gst_rtsp_server_sys::gst_rtsp_media_factory_is_stop_on_disonnect(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_address_pool<'a, P: IsA<RTSPAddressPool> + 'a, Q: Into<Option<&'a P>>>(&self, pool: Q) {
|
||||
let pool = pool.into();
|
||||
fn set_address_pool<P: IsA<RTSPAddressPool>>(&self, pool: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_address_pool(self.as_ref().to_glib_none().0, pool.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_buffer_size(&self, size: u32) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_buffer_size(self.as_ref().to_glib_none().0, size);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_clock<'a, P: IsA<gst::Clock> + 'a, Q: Into<Option<&'a P>>>(&self, clock: Q) {
|
||||
let clock = clock.into();
|
||||
fn set_clock<P: IsA<gst::Clock>>(&self, clock: Option<&P>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_clock(self.as_ref().to_glib_none().0, clock.map(|p| p.as_ref()).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_eos_shutdown(&self, eos_shutdown: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_eos_shutdown(self.as_ref().to_glib_none().0, eos_shutdown.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_latency(&self, latency: u32) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_latency(self.as_ref().to_glib_none().0, latency);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_launch(&self, launch: &str) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_launch(self.as_ref().to_glib_none().0, launch.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_launch(self.as_ref().to_glib_none().0, launch.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn set_media_gtype(&self, media_gtype: glib::types::Type) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_media_gtype(self.as_ref().to_glib_none().0, media_gtype.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_multicast_iface<'a, P: Into<Option<&'a str>>>(&self, multicast_iface: P) {
|
||||
let multicast_iface = multicast_iface.into();
|
||||
fn set_multicast_iface(&self, multicast_iface: Option<&str>) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_multicast_iface(self.as_ref().to_glib_none().0, multicast_iface.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
//fn set_permissions(&self, permissions: /*Ignored*/Option<&mut RTSPPermissions>) {
|
||||
// unsafe { TODO: call ffi::gst_rtsp_media_factory_set_permissions() }
|
||||
// unsafe { TODO: call gst_rtsp_server_sys:gst_rtsp_media_factory_set_permissions() }
|
||||
//}
|
||||
|
||||
fn set_profiles(&self, profiles: gst_rtsp::RTSPProfile) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_profiles(self.as_ref().to_glib_none().0, profiles.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_protocols(&self, protocols: gst_rtsp::RTSPLowerTrans) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_protocols(self.as_ref().to_glib_none().0, protocols.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_publish_clock_mode(&self, mode: RTSPPublishClockMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_publish_clock_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_retransmission_time(&self, time: gst::ClockTime) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_retransmission_time(self.as_ref().to_glib_none().0, time.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_shared(&self, shared: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_shared(self.as_ref().to_glib_none().0, shared.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_shared(self.as_ref().to_glib_none().0, shared.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_stop_on_disconnect(&self, stop_on_disconnect: bool) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_stop_on_disconnect(self.as_ref().to_glib_none().0, stop_on_disconnect.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_suspend_mode(&self, mode: RTSPSuspendMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_suspend_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn set_transport_mode(&self, mode: RTSPTransportMode) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_set_transport_mode(self.as_ref().to_glib_none().0, mode.to_glib());
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_eos_shutdown(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"eos-shutdown\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -391,7 +388,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_shared(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"shared\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -399,7 +396,7 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
fn get_property_stop_on_disconnect(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"stop-on-disconnect\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
@ -509,79 +506,79 @@ impl<O: IsA<RTSPMediaFactory>> RTSPMediaFactoryExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn media_configure_trampoline<P, F: Fn(&P, &RTSPMedia) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn media_configure_trampoline<P, F: Fn(&P, &RTSPMedia) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, object: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn media_constructed_trampoline<P, F: Fn(&P, &RTSPMedia) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, object: *mut ffi::GstRTSPMedia, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn media_constructed_trampoline<P, F: Fn(&P, &RTSPMedia) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, object: *mut gst_rtsp_server_sys::GstRTSPMedia, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast(), &from_glib_borrow(object))
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_buffer_size_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_clock_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_clock_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_eos_shutdown_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_eos_shutdown_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_latency_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_launch_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_launch_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_profiles_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_protocols_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_shared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_shared_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_stop_on_disconnect_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_stop_on_disconnect_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_suspend_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_suspend_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_transport_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactory, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_transport_mode_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactory, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactory> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactory::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// DO NOT EDIT
|
||||
|
||||
use RTSPMediaFactory;
|
||||
use ffi;
|
||||
use glib::GString;
|
||||
use glib::StaticType;
|
||||
use glib::Value;
|
||||
|
@ -12,16 +11,17 @@ use glib::object::IsA;
|
|||
use glib::signal::SignalHandlerId;
|
||||
use glib::signal::connect_raw;
|
||||
use glib::translate::*;
|
||||
use glib_ffi;
|
||||
use gobject_ffi;
|
||||
use glib_sys;
|
||||
use gobject_sys;
|
||||
use gst_rtsp_server_sys;
|
||||
use std::boxed::Box as Box_;
|
||||
use std::mem::transmute;
|
||||
|
||||
glib_wrapper! {
|
||||
pub struct RTSPMediaFactoryURI(Object<ffi::GstRTSPMediaFactoryURI, ffi::GstRTSPMediaFactoryURIClass, RTSPMediaFactoryURIClass>) @extends RTSPMediaFactory;
|
||||
pub struct RTSPMediaFactoryURI(Object<gst_rtsp_server_sys::GstRTSPMediaFactoryURI, gst_rtsp_server_sys::GstRTSPMediaFactoryURIClass, RTSPMediaFactoryURIClass>) @extends RTSPMediaFactory;
|
||||
|
||||
match fn {
|
||||
get_type => || ffi::gst_rtsp_media_factory_uri_get_type(),
|
||||
get_type => || gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_type(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ impl RTSPMediaFactoryURI {
|
|||
pub fn new() -> RTSPMediaFactoryURI {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_uri_new())
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_new())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,27 +62,27 @@ pub trait RTSPMediaFactoryURIExt: 'static {
|
|||
impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
||||
fn get_uri(&self) -> Option<GString> {
|
||||
unsafe {
|
||||
from_glib_full(ffi::gst_rtsp_media_factory_uri_get_uri(self.as_ref().to_glib_none().0))
|
||||
from_glib_full(gst_rtsp_server_sys::gst_rtsp_media_factory_uri_get_uri(self.as_ref().to_glib_none().0))
|
||||
}
|
||||
}
|
||||
|
||||
fn set_uri(&self, uri: &str) {
|
||||
unsafe {
|
||||
ffi::gst_rtsp_media_factory_uri_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0);
|
||||
gst_rtsp_server_sys::gst_rtsp_media_factory_uri_set_uri(self.as_ref().to_glib_none().0, uri.to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_property_use_gstpay(&self) -> bool {
|
||||
unsafe {
|
||||
let mut value = Value::from_type(<bool as StaticType>::static_type());
|
||||
gobject_ffi::g_object_get_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
gobject_sys::g_object_get_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"use-gstpay\0".as_ptr() as *const _, value.to_glib_none_mut().0);
|
||||
value.get().unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
fn set_property_use_gstpay(&self, use_gstpay: bool) {
|
||||
unsafe {
|
||||
gobject_ffi::g_object_set_property(self.to_glib_none().0 as *mut gobject_ffi::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0);
|
||||
gobject_sys::g_object_set_property(self.to_glib_none().0 as *mut gobject_sys::GObject, b"use-gstpay\0".as_ptr() as *const _, Value::from(&use_gstpay).to_glib_none().0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,13 +103,13 @@ impl<O: IsA<RTSPMediaFactoryURI>> RTSPMediaFactoryURIExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_uri_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_uri_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactoryURI> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast())
|
||||
}
|
||||
|
||||
unsafe extern "C" fn notify_use_gstpay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstRTSPMediaFactoryURI, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
|
||||
unsafe extern "C" fn notify_use_gstpay_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_rtsp_server_sys::GstRTSPMediaFactoryURI, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
|
||||
where P: IsA<RTSPMediaFactoryURI> {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(&RTSPMediaFactoryURI::from_glib_borrow(this).unsafe_cast())
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue