mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-28 12:31:10 +00:00
Regenerate with latest gir
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1307>
This commit is contained in:
parent
ba202a5f87
commit
54979d859d
245 changed files with 1590 additions and 1359 deletions
|
@ -30,14 +30,13 @@ pub use self::phys_memory_allocator::PhysMemoryAllocator;
|
||||||
mod flags;
|
mod flags;
|
||||||
pub use self::flags::FdMemoryFlags;
|
pub use self::flags::FdMemoryFlags;
|
||||||
|
|
||||||
pub mod functions;
|
pub(crate) mod functions;
|
||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
pub use self::constants::ALLOCATOR_DMABUF;
|
pub use self::constants::ALLOCATOR_DMABUF;
|
||||||
pub use self::constants::ALLOCATOR_FD;
|
pub use self::constants::ALLOCATOR_FD;
|
||||||
pub use self::constants::CAPS_FEATURE_MEMORY_DMABUF;
|
pub use self::constants::CAPS_FEATURE_MEMORY_DMABUF;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::phys_memory_allocator::PhysMemoryAllocatorExt;
|
pub use super::phys_memory_allocator::PhysMemoryAllocatorExt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAppSink")]
|
#[doc(alias = "GstAppSink")]
|
||||||
|
@ -199,7 +199,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::buffer-list\0".as_ptr() as *const _,
|
b"notify::buffer-list\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_buffer_list_trampoline::<F> as *const (),
|
notify_buffer_list_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -225,7 +225,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::caps\0".as_ptr() as *const _,
|
b"notify::caps\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_caps_trampoline::<F> as *const (),
|
notify_caps_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -251,7 +251,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::drop\0".as_ptr() as *const _,
|
b"notify::drop\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_drop_trampoline::<F> as *const (),
|
notify_drop_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -277,7 +277,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::eos\0".as_ptr() as *const _,
|
b"notify::eos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_eos_trampoline::<F> as *const (),
|
notify_eos_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -305,7 +305,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-buffers\0".as_ptr() as *const _,
|
b"notify::max-buffers\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_buffers_trampoline::<F> as *const (),
|
notify_max_buffers_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -333,7 +333,7 @@ impl AppSink {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::wait-on-eos\0".as_ptr() as *const _,
|
b"notify::wait-on-eos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_wait_on_eos_trampoline::<F> as *const (),
|
notify_wait_on_eos_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAppSrc")]
|
#[doc(alias = "GstAppSrc")]
|
||||||
|
@ -297,7 +297,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::block\0".as_ptr() as *const _,
|
b"notify::block\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_block_trampoline::<F> as *const (),
|
notify_block_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -323,7 +323,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::caps\0".as_ptr() as *const _,
|
b"notify::caps\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_caps_trampoline::<F> as *const (),
|
notify_caps_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -353,7 +353,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::current-level-buffers\0".as_ptr() as *const _,
|
b"notify::current-level-buffers\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_current_level_buffers_trampoline::<F> as *const (),
|
notify_current_level_buffers_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -381,7 +381,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::current-level-bytes\0".as_ptr() as *const _,
|
b"notify::current-level-bytes\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_current_level_bytes_trampoline::<F> as *const (),
|
notify_current_level_bytes_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -411,7 +411,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::current-level-time\0".as_ptr() as *const _,
|
b"notify::current-level-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_current_level_time_trampoline::<F> as *const (),
|
notify_current_level_time_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -437,7 +437,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration\0".as_ptr() as *const _,
|
b"notify::duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_trampoline::<F> as *const (),
|
notify_duration_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -463,7 +463,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::format\0".as_ptr() as *const _,
|
b"notify::format\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_format_trampoline::<F> as *const (),
|
notify_format_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -493,7 +493,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::handle-segment-change\0".as_ptr() as *const _,
|
b"notify::handle-segment-change\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_handle_segment_change_trampoline::<F> as *const (),
|
notify_handle_segment_change_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -519,7 +519,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::is-live\0".as_ptr() as *const _,
|
b"notify::is-live\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_is_live_trampoline::<F> as *const (),
|
notify_is_live_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -549,7 +549,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::leaky-type\0".as_ptr() as *const _,
|
b"notify::leaky-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_leaky_type_trampoline::<F> as *const (),
|
notify_leaky_type_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -579,7 +579,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-buffers\0".as_ptr() as *const _,
|
b"notify::max-buffers\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_buffers_trampoline::<F> as *const (),
|
notify_max_buffers_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -605,7 +605,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-bytes\0".as_ptr() as *const _,
|
b"notify::max-bytes\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_bytes_trampoline::<F> as *const (),
|
notify_max_bytes_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -633,7 +633,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-latency\0".as_ptr() as *const _,
|
b"notify::max-latency\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_latency_trampoline::<F> as *const (),
|
notify_max_latency_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -661,7 +661,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-time\0".as_ptr() as *const _,
|
b"notify::max-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_time_trampoline::<F> as *const (),
|
notify_max_time_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -689,7 +689,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::min-latency\0".as_ptr() as *const _,
|
b"notify::min-latency\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_min_latency_trampoline::<F> as *const (),
|
notify_min_latency_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -717,7 +717,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::min-percent\0".as_ptr() as *const _,
|
b"notify::min-percent\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_min_percent_trampoline::<F> as *const (),
|
notify_min_percent_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -743,7 +743,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::size\0".as_ptr() as *const _,
|
b"notify::size\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_size_trampoline::<F> as *const (),
|
notify_size_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -771,7 +771,7 @@ impl AppSrc {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::stream-type\0".as_ptr() as *const _,
|
b"notify::stream-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_stream_type_trampoline::<F> as *const (),
|
notify_stream_type_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -59,6 +59,7 @@ impl FromGlib<ffi::GstAppLeakyType> for AppLeakyType {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
impl StaticType for AppLeakyType {
|
impl StaticType for AppLeakyType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_app_leaky_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_app_leaky_type_get_type()) }
|
unsafe { from_glib(ffi::gst_app_leaky_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -72,7 +73,7 @@ impl glib::HasParamSpec for AppLeakyType {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,6 +169,7 @@ impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
|
||||||
|
|
||||||
impl StaticType for AppStreamType {
|
impl StaticType for AppStreamType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_app_stream_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_app_stream_type_get_type()) }
|
unsafe { from_glib(ffi::gst_app_stream_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -179,7 +181,7 @@ impl glib::HasParamSpec for AppStreamType {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioAggregator")]
|
#[doc(alias = "GstAudioAggregator")]
|
||||||
|
@ -87,7 +87,7 @@ pub trait AudioAggregatorExt: IsA<AudioAggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::alignment-threshold\0".as_ptr() as *const _,
|
b"notify::alignment-threshold\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_alignment_threshold_trampoline::<Self, F> as *const (),
|
notify_alignment_threshold_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -116,7 +116,7 @@ pub trait AudioAggregatorExt: IsA<AudioAggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::discont-wait\0".as_ptr() as *const _,
|
b"notify::discont-wait\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_discont_wait_trampoline::<Self, F> as *const (),
|
notify_discont_wait_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -145,7 +145,7 @@ pub trait AudioAggregatorExt: IsA<AudioAggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::output-buffer-duration\0".as_ptr() as *const _,
|
b"notify::output-buffer-duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_output_buffer_duration_trampoline::<Self, F> as *const (),
|
notify_output_buffer_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioAggregatorConvertPad")]
|
#[doc(alias = "GstAudioAggregatorConvertPad")]
|
||||||
|
@ -66,7 +66,7 @@ pub trait AudioAggregatorConvertPadExt:
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::converter-config\0".as_ptr() as *const _,
|
b"notify::converter-config\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_converter_config_trampoline::<Self, F> as *const (),
|
notify_converter_config_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_20")]
|
#[cfg(feature = "v1_20")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioAggregatorPad")]
|
#[doc(alias = "GstAudioAggregatorPad")]
|
||||||
|
@ -73,7 +73,7 @@ pub trait AudioAggregatorPadExt: IsA<AudioAggregatorPad> + sealed::Sealed + 'sta
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::qos-messages\0".as_ptr() as *const _,
|
b"notify::qos-messages\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_qos_messages_trampoline::<Self, F> as *const (),
|
notify_qos_messages_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioBaseSink")]
|
#[doc(alias = "GstAudioBaseSink")]
|
||||||
|
@ -189,7 +189,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::alignment-threshold\0".as_ptr() as *const _,
|
b"notify::alignment-threshold\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_alignment_threshold_trampoline::<Self, F> as *const (),
|
notify_alignment_threshold_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -218,7 +218,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::buffer-time\0".as_ptr() as *const _,
|
b"notify::buffer-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_buffer_time_trampoline::<Self, F> as *const (),
|
notify_buffer_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -247,7 +247,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::can-activate-pull\0".as_ptr() as *const _,
|
b"notify::can-activate-pull\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_can_activate_pull_trampoline::<Self, F> as *const (),
|
notify_can_activate_pull_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -276,7 +276,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::discont-wait\0".as_ptr() as *const _,
|
b"notify::discont-wait\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_discont_wait_trampoline::<Self, F> as *const (),
|
notify_discont_wait_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -305,7 +305,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::drift-tolerance\0".as_ptr() as *const _,
|
b"notify::drift-tolerance\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_drift_tolerance_trampoline::<Self, F> as *const (),
|
notify_drift_tolerance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -334,7 +334,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::latency-time\0".as_ptr() as *const _,
|
b"notify::latency-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_latency_time_trampoline::<Self, F> as *const (),
|
notify_latency_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -363,7 +363,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::provide-clock\0".as_ptr() as *const _,
|
b"notify::provide-clock\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_provide_clock_trampoline::<Self, F> as *const (),
|
notify_provide_clock_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -392,7 +392,7 @@ pub trait AudioBaseSinkExt: IsA<AudioBaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::slave-method\0".as_ptr() as *const _,
|
b"notify::slave-method\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_slave_method_trampoline::<Self, F> as *const (),
|
notify_slave_method_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioBaseSrc")]
|
#[doc(alias = "GstAudioBaseSrc")]
|
||||||
|
@ -119,7 +119,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::actual-buffer-time\0".as_ptr() as *const _,
|
b"notify::actual-buffer-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_actual_buffer_time_trampoline::<Self, F> as *const (),
|
notify_actual_buffer_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -148,7 +148,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::actual-latency-time\0".as_ptr() as *const _,
|
b"notify::actual-latency-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_actual_latency_time_trampoline::<Self, F> as *const (),
|
notify_actual_latency_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -177,7 +177,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::buffer-time\0".as_ptr() as *const _,
|
b"notify::buffer-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_buffer_time_trampoline::<Self, F> as *const (),
|
notify_buffer_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -206,7 +206,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::latency-time\0".as_ptr() as *const _,
|
b"notify::latency-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_latency_time_trampoline::<Self, F> as *const (),
|
notify_latency_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -235,7 +235,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::provide-clock\0".as_ptr() as *const _,
|
b"notify::provide-clock\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_provide_clock_trampoline::<Self, F> as *const (),
|
notify_provide_clock_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -264,7 +264,7 @@ pub trait AudioBaseSrcExt: IsA<AudioBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::slave-method\0".as_ptr() as *const _,
|
b"notify::slave-method\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_slave_method_trampoline::<Self, F> as *const (),
|
notify_slave_method_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioDecoder")]
|
#[doc(alias = "GstAudioDecoder")]
|
||||||
|
@ -109,8 +109,8 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_latency")]
|
#[doc(alias = "get_latency")]
|
||||||
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut min = mem::MaybeUninit::uninit();
|
let mut min = std::mem::MaybeUninit::uninit();
|
||||||
let mut max = mem::MaybeUninit::uninit();
|
let mut max = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_audio_decoder_get_latency(
|
ffi::gst_audio_decoder_get_latency(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
min.as_mut_ptr(),
|
min.as_mut_ptr(),
|
||||||
|
@ -154,8 +154,8 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_parse_state")]
|
#[doc(alias = "get_parse_state")]
|
||||||
fn parse_state(&self) -> (bool, bool) {
|
fn parse_state(&self) -> (bool, bool) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut sync = mem::MaybeUninit::uninit();
|
let mut sync = std::mem::MaybeUninit::uninit();
|
||||||
let mut eos = mem::MaybeUninit::uninit();
|
let mut eos = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_audio_decoder_get_parse_state(
|
ffi::gst_audio_decoder_get_parse_state(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
sync.as_mut_ptr(),
|
sync.as_mut_ptr(),
|
||||||
|
@ -336,7 +336,7 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-errors\0".as_ptr() as *const _,
|
b"notify::max-errors\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_errors_trampoline::<Self, F> as *const (),
|
notify_max_errors_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -365,7 +365,7 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::min-latency\0".as_ptr() as *const _,
|
b"notify::min-latency\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_min_latency_trampoline::<Self, F> as *const (),
|
notify_min_latency_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -391,7 +391,7 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::plc\0".as_ptr() as *const _,
|
b"notify::plc\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_plc_trampoline::<Self, F> as *const (),
|
notify_plc_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -420,7 +420,7 @@ pub trait AudioDecoderExt: IsA<AudioDecoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::tolerance\0".as_ptr() as *const _,
|
b"notify::tolerance\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_tolerance_trampoline::<Self, F> as *const (),
|
notify_tolerance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAudioEncoder")]
|
#[doc(alias = "GstAudioEncoder")]
|
||||||
|
@ -120,8 +120,8 @@ pub trait AudioEncoderExt: IsA<AudioEncoder> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_latency")]
|
#[doc(alias = "get_latency")]
|
||||||
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
fn latency(&self) -> (gst::ClockTime, Option<gst::ClockTime>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut min = mem::MaybeUninit::uninit();
|
let mut min = std::mem::MaybeUninit::uninit();
|
||||||
let mut max = mem::MaybeUninit::uninit();
|
let mut max = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_audio_encoder_get_latency(
|
ffi::gst_audio_encoder_get_latency(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
min.as_mut_ptr(),
|
min.as_mut_ptr(),
|
||||||
|
@ -323,7 +323,7 @@ pub trait AudioEncoderExt: IsA<AudioEncoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::hard-resync\0".as_ptr() as *const _,
|
b"notify::hard-resync\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_hard_resync_trampoline::<Self, F> as *const (),
|
notify_hard_resync_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -352,7 +352,7 @@ pub trait AudioEncoderExt: IsA<AudioEncoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mark-granule\0".as_ptr() as *const _,
|
b"notify::mark-granule\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mark_granule_trampoline::<Self, F> as *const (),
|
notify_mark_granule_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -381,7 +381,7 @@ pub trait AudioEncoderExt: IsA<AudioEncoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::perfect-timestamp\0".as_ptr() as *const _,
|
b"notify::perfect-timestamp\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_perfect_timestamp_trampoline::<Self, F> as *const (),
|
notify_perfect_timestamp_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -410,7 +410,7 @@ pub trait AudioEncoderExt: IsA<AudioEncoder> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::tolerance\0".as_ptr() as *const _,
|
b"notify::tolerance\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_tolerance_trampoline::<Self, F> as *const (),
|
notify_tolerance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
@ -56,6 +55,7 @@ impl FromGlib<ffi::GstAudioDitherMethod> for AudioDitherMethod {
|
||||||
|
|
||||||
impl StaticType for AudioDitherMethod {
|
impl StaticType for AudioDitherMethod {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_dither_method_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_dither_method_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_dither_method_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ impl glib::HasParamSpec for AudioDitherMethod {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,9 +189,9 @@ impl AudioFormat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for AudioFormat {
|
impl std::fmt::Display for AudioFormat {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.to_str())
|
f.write_str(&self.to_str())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,7 @@ impl FromGlib<ffi::GstAudioFormat> for AudioFormat {
|
||||||
|
|
||||||
impl StaticType for AudioFormat {
|
impl StaticType for AudioFormat {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_format_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_format_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_format_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -295,7 +296,7 @@ impl glib::HasParamSpec for AudioFormat {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,6 +380,7 @@ impl FromGlib<ffi::GstAudioLayout> for AudioLayout {
|
||||||
|
|
||||||
impl StaticType for AudioLayout {
|
impl StaticType for AudioLayout {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_layout_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_layout_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_layout_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -390,7 +392,7 @@ impl glib::HasParamSpec for AudioLayout {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -486,6 +488,7 @@ impl FromGlib<ffi::GstAudioNoiseShapingMethod> for AudioNoiseShapingMethod {
|
||||||
|
|
||||||
impl StaticType for AudioNoiseShapingMethod {
|
impl StaticType for AudioNoiseShapingMethod {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_noise_shaping_method_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_noise_shaping_method_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_noise_shaping_method_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -497,7 +500,7 @@ impl glib::HasParamSpec for AudioNoiseShapingMethod {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,6 +596,7 @@ impl FromGlib<ffi::GstAudioResamplerMethod> for AudioResamplerMethod {
|
||||||
|
|
||||||
impl StaticType for AudioResamplerMethod {
|
impl StaticType for AudioResamplerMethod {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_resampler_method_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_resampler_method_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_resampler_method_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -604,7 +608,7 @@ impl glib::HasParamSpec for AudioResamplerMethod {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,6 +750,7 @@ impl FromGlib<ffi::GstAudioRingBufferFormatType> for AudioRingBufferFormatType {
|
||||||
|
|
||||||
impl StaticType for AudioRingBufferFormatType {
|
impl StaticType for AudioRingBufferFormatType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_ring_buffer_format_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_ring_buffer_format_type_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_ring_buffer_format_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -757,7 +762,7 @@ impl glib::HasParamSpec for AudioRingBufferFormatType {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ impl FromGlib<ffi::GstAudioFlags> for AudioFlags {
|
||||||
|
|
||||||
impl StaticType for AudioFlags {
|
impl StaticType for AudioFlags {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_flags_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_flags_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_flags_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -46,7 +47,7 @@ impl glib::HasParamSpec for AudioFlags {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +127,7 @@ impl FromGlib<ffi::GstAudioFormatFlags> for AudioFormatFlags {
|
||||||
|
|
||||||
impl StaticType for AudioFormatFlags {
|
impl StaticType for AudioFormatFlags {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_format_flags_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -137,7 +139,7 @@ impl glib::HasParamSpec for AudioFormatFlags {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,6 +211,7 @@ impl FromGlib<ffi::GstAudioPackFlags> for AudioPackFlags {
|
||||||
|
|
||||||
impl StaticType for AudioPackFlags {
|
impl StaticType for AudioPackFlags {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_audio_pack_flags_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) }
|
unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -220,7 +223,7 @@ impl glib::HasParamSpec for AudioPackFlags {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,7 @@ pub use self::flags::AudioFlags;
|
||||||
pub use self::flags::AudioFormatFlags;
|
pub use self::flags::AudioFormatFlags;
|
||||||
pub use self::flags::AudioPackFlags;
|
pub use self::flags::AudioPackFlags;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::audio_aggregator::AudioAggregatorExt;
|
pub use super::audio_aggregator::AudioAggregatorExt;
|
||||||
pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadExt;
|
pub use super::audio_aggregator_convert_pad::AudioAggregatorConvertPadExt;
|
||||||
pub use super::audio_aggregator_pad::AudioAggregatorPadExt;
|
pub use super::audio_aggregator_pad::AudioAggregatorPadExt;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstStreamVolume")]
|
#[doc(alias = "GstStreamVolume")]
|
||||||
|
@ -93,7 +93,7 @@ pub trait StreamVolumeExt: IsA<StreamVolume> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mute\0".as_ptr() as *const _,
|
b"notify::mute\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mute_trampoline::<Self, F> as *const (),
|
notify_mute_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -119,7 +119,7 @@ pub trait StreamVolumeExt: IsA<StreamVolume> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::volume\0".as_ptr() as *const _,
|
b"notify::volume\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_volume_trampoline::<Self, F> as *const (),
|
notify_volume_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAdapter")]
|
#[doc(alias = "GstAdapter")]
|
||||||
|
@ -57,7 +56,7 @@ impl Adapter {
|
||||||
#[doc(alias = "gst_adapter_prev_dts")]
|
#[doc(alias = "gst_adapter_prev_dts")]
|
||||||
pub fn prev_dts(&self) -> (Option<gst::ClockTime>, u64) {
|
pub fn prev_dts(&self) -> (Option<gst::ClockTime>, u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut distance = mem::MaybeUninit::uninit();
|
let mut distance = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_adapter_prev_dts(
|
let ret = from_glib(ffi::gst_adapter_prev_dts(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
distance.as_mut_ptr(),
|
distance.as_mut_ptr(),
|
||||||
|
@ -69,7 +68,7 @@ impl Adapter {
|
||||||
#[doc(alias = "gst_adapter_prev_dts_at_offset")]
|
#[doc(alias = "gst_adapter_prev_dts_at_offset")]
|
||||||
pub fn prev_dts_at_offset(&self, offset: usize) -> (Option<gst::ClockTime>, u64) {
|
pub fn prev_dts_at_offset(&self, offset: usize) -> (Option<gst::ClockTime>, u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut distance = mem::MaybeUninit::uninit();
|
let mut distance = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(
|
let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
offset,
|
offset,
|
||||||
|
@ -82,7 +81,7 @@ impl Adapter {
|
||||||
#[doc(alias = "gst_adapter_prev_offset")]
|
#[doc(alias = "gst_adapter_prev_offset")]
|
||||||
pub fn prev_offset(&self) -> (u64, u64) {
|
pub fn prev_offset(&self) -> (u64, u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut distance = mem::MaybeUninit::uninit();
|
let mut distance = std::mem::MaybeUninit::uninit();
|
||||||
let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr());
|
let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, distance.as_mut_ptr());
|
||||||
(ret, distance.assume_init())
|
(ret, distance.assume_init())
|
||||||
}
|
}
|
||||||
|
@ -91,7 +90,7 @@ impl Adapter {
|
||||||
#[doc(alias = "gst_adapter_prev_pts")]
|
#[doc(alias = "gst_adapter_prev_pts")]
|
||||||
pub fn prev_pts(&self) -> (Option<gst::ClockTime>, u64) {
|
pub fn prev_pts(&self) -> (Option<gst::ClockTime>, u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut distance = mem::MaybeUninit::uninit();
|
let mut distance = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_adapter_prev_pts(
|
let ret = from_glib(ffi::gst_adapter_prev_pts(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
distance.as_mut_ptr(),
|
distance.as_mut_ptr(),
|
||||||
|
@ -103,7 +102,7 @@ impl Adapter {
|
||||||
#[doc(alias = "gst_adapter_prev_pts_at_offset")]
|
#[doc(alias = "gst_adapter_prev_pts_at_offset")]
|
||||||
pub fn prev_pts_at_offset(&self, offset: usize) -> (Option<gst::ClockTime>, u64) {
|
pub fn prev_pts_at_offset(&self, offset: usize) -> (Option<gst::ClockTime>, u64) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut distance = mem::MaybeUninit::uninit();
|
let mut distance = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(
|
let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
offset,
|
offset,
|
||||||
|
|
|
@ -11,7 +11,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAggregator")]
|
#[doc(alias = "GstAggregator")]
|
||||||
|
@ -245,7 +245,7 @@ pub trait AggregatorExt: IsA<Aggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::emit-signals\0".as_ptr() as *const _,
|
b"notify::emit-signals\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_emit_signals_trampoline::<Self, F> as *const (),
|
notify_emit_signals_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -274,7 +274,7 @@ pub trait AggregatorExt: IsA<Aggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::latency\0".as_ptr() as *const _,
|
b"notify::latency\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_latency_trampoline::<Self, F> as *const (),
|
notify_latency_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -303,7 +303,7 @@ pub trait AggregatorExt: IsA<Aggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::start-time\0".as_ptr() as *const _,
|
b"notify::start-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_start_time_trampoline::<Self, F> as *const (),
|
notify_start_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -334,7 +334,7 @@ pub trait AggregatorExt: IsA<Aggregator> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::start-time-selection\0".as_ptr() as *const _,
|
b"notify::start-time-selection\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_start_time_selection_trampoline::<Self, F> as *const (),
|
notify_start_time_selection_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstAggregatorPad")]
|
#[doc(alias = "GstAggregatorPad")]
|
||||||
|
@ -128,7 +128,7 @@ pub trait AggregatorPadExt: IsA<AggregatorPad> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"buffer-consumed\0".as_ptr() as *const _,
|
b"buffer-consumed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
buffer_consumed_trampoline::<Self, F> as *const (),
|
buffer_consumed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -159,7 +159,7 @@ pub trait AggregatorPadExt: IsA<AggregatorPad> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::emit-signals\0".as_ptr() as *const _,
|
b"notify::emit-signals\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_emit_signals_trampoline::<Self, F> as *const (),
|
notify_emit_signals_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstBaseParse")]
|
#[doc(alias = "GstBaseParse")]
|
||||||
|
@ -174,7 +174,7 @@ pub trait BaseParseExt: IsA<BaseParse> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::disable-passthrough\0".as_ptr() as *const _,
|
b"notify::disable-passthrough\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_disable_passthrough_trampoline::<Self, F> as *const (),
|
notify_disable_passthrough_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstBaseSink")]
|
#[doc(alias = "GstBaseSink")]
|
||||||
|
@ -213,7 +213,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
time: impl Into<Option<gst::ClockTime>>,
|
time: impl Into<Option<gst::ClockTime>>,
|
||||||
) -> (Result<gst::FlowSuccess, gst::FlowError>, gst::ClockTimeDiff) {
|
) -> (Result<gst::FlowSuccess, gst::FlowError>, gst::ClockTimeDiff) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut jitter = mem::MaybeUninit::uninit();
|
let mut jitter = std::mem::MaybeUninit::uninit();
|
||||||
let ret = try_from_glib(ffi::gst_base_sink_wait(
|
let ret = try_from_glib(ffi::gst_base_sink_wait(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
time.into().into_glib(),
|
time.into().into_glib(),
|
||||||
|
@ -232,7 +232,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
gst::ClockTimeDiff,
|
gst::ClockTimeDiff,
|
||||||
) {
|
) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut jitter = mem::MaybeUninit::uninit();
|
let mut jitter = std::mem::MaybeUninit::uninit();
|
||||||
let ret = try_from_glib(ffi::gst_base_sink_wait_clock(
|
let ret = try_from_glib(ffi::gst_base_sink_wait_clock(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
time.into_glib(),
|
time.into_glib(),
|
||||||
|
@ -297,7 +297,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::async\0".as_ptr() as *const _,
|
b"notify::async\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_async_trampoline::<Self, F> as *const (),
|
notify_async_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -326,7 +326,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::blocksize\0".as_ptr() as *const _,
|
b"notify::blocksize\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_blocksize_trampoline::<Self, F> as *const (),
|
notify_blocksize_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -355,7 +355,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::enable-last-sample\0".as_ptr() as *const _,
|
b"notify::enable-last-sample\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_enable_last_sample_trampoline::<Self, F> as *const (),
|
notify_enable_last_sample_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -384,7 +384,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::last-sample\0".as_ptr() as *const _,
|
b"notify::last-sample\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_last_sample_trampoline::<Self, F> as *const (),
|
notify_last_sample_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -413,7 +413,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-bitrate\0".as_ptr() as *const _,
|
b"notify::max-bitrate\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_bitrate_trampoline::<Self, F> as *const (),
|
notify_max_bitrate_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -442,7 +442,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-lateness\0".as_ptr() as *const _,
|
b"notify::max-lateness\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_lateness_trampoline::<Self, F> as *const (),
|
notify_max_lateness_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -473,7 +473,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::processing-deadline\0".as_ptr() as *const _,
|
b"notify::processing-deadline\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_processing_deadline_trampoline::<Self, F> as *const (),
|
notify_processing_deadline_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -499,7 +499,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::qos\0".as_ptr() as *const _,
|
b"notify::qos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_qos_trampoline::<Self, F> as *const (),
|
notify_qos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -528,7 +528,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::render-delay\0".as_ptr() as *const _,
|
b"notify::render-delay\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_render_delay_trampoline::<Self, F> as *const (),
|
notify_render_delay_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -556,7 +556,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::stats\0".as_ptr() as *const _,
|
b"notify::stats\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_stats_trampoline::<Self, F> as *const (),
|
notify_stats_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -582,7 +582,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::sync\0".as_ptr() as *const _,
|
b"notify::sync\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_sync_trampoline::<Self, F> as *const (),
|
notify_sync_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -611,7 +611,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::throttle-time\0".as_ptr() as *const _,
|
b"notify::throttle-time\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_throttle_time_trampoline::<Self, F> as *const (),
|
notify_throttle_time_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -640,7 +640,7 @@ pub trait BaseSinkExt: IsA<BaseSink> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::ts-offset\0".as_ptr() as *const _,
|
b"notify::ts-offset\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_ts_offset_trampoline::<Self, F> as *const (),
|
notify_ts_offset_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstBaseSrc")]
|
#[doc(alias = "GstBaseSrc")]
|
||||||
|
@ -245,7 +245,7 @@ pub trait BaseSrcExt: IsA<BaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::blocksize\0".as_ptr() as *const _,
|
b"notify::blocksize\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_blocksize_trampoline::<Self, F> as *const (),
|
notify_blocksize_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -274,7 +274,7 @@ pub trait BaseSrcExt: IsA<BaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::do-timestamp\0".as_ptr() as *const _,
|
b"notify::do-timestamp\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_do_timestamp_trampoline::<Self, F> as *const (),
|
notify_do_timestamp_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -303,7 +303,7 @@ pub trait BaseSrcExt: IsA<BaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::num-buffers\0".as_ptr() as *const _,
|
b"notify::num-buffers\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_num_buffers_trampoline::<Self, F> as *const (),
|
notify_num_buffers_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -332,7 +332,7 @@ pub trait BaseSrcExt: IsA<BaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::typefind\0".as_ptr() as *const _,
|
b"notify::typefind\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_typefind_trampoline::<Self, F> as *const (),
|
notify_typefind_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstBaseTransform")]
|
#[doc(alias = "GstBaseTransform")]
|
||||||
|
@ -176,7 +176,7 @@ pub trait BaseTransformExt: IsA<BaseTransform> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::qos\0".as_ptr() as *const _,
|
b"notify::qos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_qos_trampoline::<Self, F> as *const (),
|
notify_qos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -61,6 +61,7 @@ impl FromGlib<ffi::GstAggregatorStartTimeSelection> for AggregatorStartTimeSelec
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
||||||
impl StaticType for AggregatorStartTimeSelection {
|
impl StaticType for AggregatorStartTimeSelection {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_aggregator_start_time_selection_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_aggregator_start_time_selection_get_type()) }
|
unsafe { from_glib(ffi::gst_aggregator_start_time_selection_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -74,7 +75,7 @@ impl glib::HasParamSpec for AggregatorStartTimeSelection {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,9 @@ pub use self::enums::AggregatorStartTimeSelection;
|
||||||
mod flags;
|
mod flags;
|
||||||
pub use self::flags::BaseParseFrameFlags;
|
pub use self::flags::BaseParseFrameFlags;
|
||||||
|
|
||||||
pub mod functions;
|
pub(crate) mod functions;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::aggregator::AggregatorExt;
|
pub use super::aggregator::AggregatorExt;
|
||||||
pub use super::aggregator_pad::AggregatorPadExt;
|
pub use super::aggregator_pad::AggregatorPadExt;
|
||||||
pub use super::base_parse::BaseParseExt;
|
pub use super::base_parse::BaseParseExt;
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstTestClock")]
|
#[doc(alias = "GstTestClock")]
|
||||||
|
@ -119,7 +119,7 @@ impl TestClock {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::clock-type\0".as_ptr() as *const _,
|
b"notify::clock-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_clock_type_trampoline::<F> as *const (),
|
notify_clock_type_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstARGBControlBinding")]
|
#[doc(alias = "GstARGBControlBinding")]
|
||||||
|
@ -116,7 +116,7 @@ pub trait ARGBControlBindingExt: IsA<ARGBControlBinding> + sealed::Sealed + 'sta
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::control-source-a\0".as_ptr() as *const _,
|
b"notify::control-source-a\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_control_source_a_trampoline::<Self, F> as *const (),
|
notify_control_source_a_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -145,7 +145,7 @@ pub trait ARGBControlBindingExt: IsA<ARGBControlBinding> + sealed::Sealed + 'sta
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::control-source-b\0".as_ptr() as *const _,
|
b"notify::control-source-b\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_control_source_b_trampoline::<Self, F> as *const (),
|
notify_control_source_b_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -174,7 +174,7 @@ pub trait ARGBControlBindingExt: IsA<ARGBControlBinding> + sealed::Sealed + 'sta
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::control-source-g\0".as_ptr() as *const _,
|
b"notify::control-source-g\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_control_source_g_trampoline::<Self, F> as *const (),
|
notify_control_source_g_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -203,7 +203,7 @@ pub trait ARGBControlBindingExt: IsA<ARGBControlBinding> + sealed::Sealed + 'sta
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::control-source-r\0".as_ptr() as *const _,
|
b"notify::control-source-r\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_control_source_r_trampoline::<Self, F> as *const (),
|
notify_control_source_r_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstDirectControlBinding")]
|
#[doc(alias = "GstDirectControlBinding")]
|
||||||
|
@ -101,7 +101,7 @@ pub trait DirectControlBindingExt: IsA<DirectControlBinding> + sealed::Sealed +
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::control-source\0".as_ptr() as *const _,
|
b"notify::control-source\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_control_source_trampoline::<Self, F> as *const (),
|
notify_control_source_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -55,6 +55,7 @@ impl FromGlib<ffi::GstInterpolationMode> for InterpolationMode {
|
||||||
|
|
||||||
impl StaticType for InterpolationMode {
|
impl StaticType for InterpolationMode {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_interpolation_mode_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_interpolation_mode_get_type()) }
|
unsafe { from_glib(ffi::gst_interpolation_mode_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -66,7 +67,7 @@ impl glib::HasParamSpec for InterpolationMode {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +163,7 @@ impl FromGlib<ffi::GstLFOWaveform> for LFOWaveform {
|
||||||
|
|
||||||
impl StaticType for LFOWaveform {
|
impl StaticType for LFOWaveform {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_lfo_waveform_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_lfo_waveform_get_type()) }
|
unsafe { from_glib(ffi::gst_lfo_waveform_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -173,7 +175,7 @@ impl glib::HasParamSpec for LFOWaveform {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstInterpolationControlSource")]
|
#[doc(alias = "GstInterpolationControlSource")]
|
||||||
|
@ -76,7 +76,7 @@ pub trait InterpolationControlSourceExt:
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mode\0".as_ptr() as *const _,
|
b"notify::mode\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mode_trampoline::<Self, F> as *const (),
|
notify_mode_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstLFOControlSource")]
|
#[doc(alias = "GstLFOControlSource")]
|
||||||
|
@ -108,7 +108,7 @@ pub trait LFOControlSourceExt: IsA<LFOControlSource> + sealed::Sealed + 'static
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::amplitude\0".as_ptr() as *const _,
|
b"notify::amplitude\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_amplitude_trampoline::<Self, F> as *const (),
|
notify_amplitude_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -137,7 +137,7 @@ pub trait LFOControlSourceExt: IsA<LFOControlSource> + sealed::Sealed + 'static
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::frequency\0".as_ptr() as *const _,
|
b"notify::frequency\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_frequency_trampoline::<Self, F> as *const (),
|
notify_frequency_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -163,7 +163,7 @@ pub trait LFOControlSourceExt: IsA<LFOControlSource> + sealed::Sealed + 'static
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::offset\0".as_ptr() as *const _,
|
b"notify::offset\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_offset_trampoline::<Self, F> as *const (),
|
notify_offset_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -192,7 +192,7 @@ pub trait LFOControlSourceExt: IsA<LFOControlSource> + sealed::Sealed + 'static
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::timeshift\0".as_ptr() as *const _,
|
b"notify::timeshift\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_timeshift_trampoline::<Self, F> as *const (),
|
notify_timeshift_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -221,7 +221,7 @@ pub trait LFOControlSourceExt: IsA<LFOControlSource> + sealed::Sealed + 'static
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::waveform\0".as_ptr() as *const _,
|
b"notify::waveform\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_waveform_trampoline::<Self, F> as *const (),
|
notify_waveform_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -28,8 +28,7 @@ mod enums;
|
||||||
pub use self::enums::InterpolationMode;
|
pub use self::enums::InterpolationMode;
|
||||||
pub use self::enums::LFOWaveform;
|
pub use self::enums::LFOWaveform;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::argb_control_binding::ARGBControlBindingExt;
|
pub use super::argb_control_binding::ARGBControlBindingExt;
|
||||||
pub use super::direct_control_binding::DirectControlBindingExt;
|
pub use super::direct_control_binding::DirectControlBindingExt;
|
||||||
pub use super::interpolation_control_source::InterpolationControlSourceExt;
|
pub use super::interpolation_control_source::InterpolationControlSourceExt;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstTimedValueControlSource")]
|
#[doc(alias = "GstTimedValueControlSource")]
|
||||||
|
@ -109,7 +109,7 @@ pub trait TimedValueControlSourceExt:
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"value-added\0".as_ptr() as *const _,
|
b"value-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
value_added_trampoline::<Self, F> as *const (),
|
value_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -141,7 +141,7 @@ pub trait TimedValueControlSourceExt:
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"value-changed\0".as_ptr() as *const _,
|
b"value-changed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
value_changed_trampoline::<Self, F> as *const (),
|
value_changed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -173,7 +173,7 @@ pub trait TimedValueControlSourceExt:
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"value-removed\0".as_ptr() as *const _,
|
b"value-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
value_removed_trampoline::<Self, F> as *const (),
|
value_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstTriggerControlSource")]
|
#[doc(alias = "GstTriggerControlSource")]
|
||||||
|
@ -76,7 +76,7 @@ pub trait TriggerControlSourceExt: IsA<TriggerControlSource> + sealed::Sealed +
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::tolerance\0".as_ptr() as *const _,
|
b"notify::tolerance\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_tolerance_trampoline::<Self, F> as *const (),
|
notify_tolerance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, pin::Pin, ptr};
|
use std::{boxed::Box as Box_, pin::Pin};
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESAsset")]
|
#[doc(alias = "GESAsset")]
|
||||||
|
@ -41,7 +41,7 @@ impl Asset {
|
||||||
) -> Result<Option<Asset>, glib::Error> {
|
) -> Result<Option<Asset>, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_asset_request(
|
let ret = ffi::ges_asset_request(
|
||||||
extractable_type.into_glib(),
|
extractable_type.into_glib(),
|
||||||
id.to_glib_none().0,
|
id.to_glib_none().0,
|
||||||
|
@ -83,7 +83,7 @@ impl Asset {
|
||||||
res: *mut gio::ffi::GAsyncResult,
|
res: *mut gio::ffi::GAsyncResult,
|
||||||
user_data: glib::ffi::gpointer,
|
user_data: glib::ffi::gpointer,
|
||||||
) {
|
) {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_asset_request_finish(res, &mut error);
|
let ret = ffi::ges_asset_request_finish(res, &mut error);
|
||||||
let result = if error.is_null() {
|
let result = if error.is_null() {
|
||||||
Ok(from_glib_full(ret))
|
Ok(from_glib_full(ret))
|
||||||
|
@ -138,7 +138,7 @@ pub trait AssetExt: IsA<Asset> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_asset_extract")]
|
#[doc(alias = "ges_asset_extract")]
|
||||||
fn extract(&self) -> Result<Extractable, glib::Error> {
|
fn extract(&self) -> Result<Extractable, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
let ret = ffi::ges_asset_extract(self.as_ref().to_glib_none().0, &mut error);
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
Ok(from_glib_none(ret))
|
Ok(from_glib_none(ret))
|
||||||
|
@ -241,7 +241,7 @@ pub trait AssetExt: IsA<Asset> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::proxy\0".as_ptr() as *const _,
|
b"notify::proxy\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_proxy_trampoline::<Self, F> as *const (),
|
notify_proxy_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -270,7 +270,7 @@ pub trait AssetExt: IsA<Asset> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::proxy-target\0".as_ptr() as *const _,
|
b"notify::proxy-target\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_proxy_target_trampoline::<Self, F> as *const (),
|
notify_proxy_target_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -15,10 +15,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_18")]
|
use std::boxed::Box as Box_;
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::ptr;
|
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESClip")]
|
#[doc(alias = "GESClip")]
|
||||||
|
@ -59,7 +56,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
track: &impl IsA<Track>,
|
track: &impl IsA<Track>,
|
||||||
) -> Result<TrackElement, glib::Error> {
|
) -> Result<TrackElement, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_clip_add_child_to_track(
|
let ret = ffi::ges_clip_add_child_to_track(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
child.as_ref().to_glib_none().0,
|
child.as_ref().to_glib_none().0,
|
||||||
|
@ -79,7 +76,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_clip_add_top_effect")]
|
#[doc(alias = "ges_clip_add_top_effect")]
|
||||||
fn add_top_effect(&self, effect: &impl IsA<BaseEffect>, index: i32) -> Result<(), glib::Error> {
|
fn add_top_effect(&self, effect: &impl IsA<BaseEffect>, index: i32) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_clip_add_top_effect(
|
let is_ok = ffi::ges_clip_add_top_effect(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
effect.as_ref().to_glib_none().0,
|
effect.as_ref().to_glib_none().0,
|
||||||
|
@ -150,7 +147,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
timeline_time: impl Into<Option<gst::ClockTime>>,
|
timeline_time: impl Into<Option<gst::ClockTime>>,
|
||||||
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_clip_get_internal_time_from_timeline_time(
|
let ret = ffi::ges_clip_get_internal_time_from_timeline_time(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
child.as_ref().to_glib_none().0,
|
child.as_ref().to_glib_none().0,
|
||||||
|
@ -191,7 +188,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
internal_time: impl Into<Option<gst::ClockTime>>,
|
internal_time: impl Into<Option<gst::ClockTime>>,
|
||||||
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_clip_get_timeline_time_from_internal_time(
|
let ret = ffi::ges_clip_get_timeline_time_from_internal_time(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
child.as_ref().to_glib_none().0,
|
child.as_ref().to_glib_none().0,
|
||||||
|
@ -215,7 +212,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
frame_number: FrameNumber,
|
frame_number: FrameNumber,
|
||||||
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
) -> Result<Option<gst::ClockTime>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_clip_get_timeline_time_from_source_frame(
|
let ret = ffi::ges_clip_get_timeline_time_from_source_frame(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
frame_number,
|
frame_number,
|
||||||
|
@ -279,7 +276,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_clip_move_to_layer_full")]
|
#[doc(alias = "ges_clip_move_to_layer_full")]
|
||||||
fn move_to_layer_full(&self, layer: &impl IsA<Layer>) -> Result<(), glib::Error> {
|
fn move_to_layer_full(&self, layer: &impl IsA<Layer>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_clip_move_to_layer_full(
|
let is_ok = ffi::ges_clip_move_to_layer_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
layer.as_ref().to_glib_none().0,
|
layer.as_ref().to_glib_none().0,
|
||||||
|
@ -299,7 +296,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_clip_remove_top_effect")]
|
#[doc(alias = "ges_clip_remove_top_effect")]
|
||||||
fn remove_top_effect(&self, effect: &impl IsA<BaseEffect>) -> Result<(), glib::Error> {
|
fn remove_top_effect(&self, effect: &impl IsA<BaseEffect>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_clip_remove_top_effect(
|
let is_ok = ffi::ges_clip_remove_top_effect(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
effect.as_ref().to_glib_none().0,
|
effect.as_ref().to_glib_none().0,
|
||||||
|
@ -351,7 +348,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
newindex: u32,
|
newindex: u32,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_clip_set_top_effect_index_full(
|
let is_ok = ffi::ges_clip_set_top_effect_index_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
effect.as_ref().to_glib_none().0,
|
effect.as_ref().to_glib_none().0,
|
||||||
|
@ -401,7 +398,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_clip_split_full")]
|
#[doc(alias = "ges_clip_split_full")]
|
||||||
fn split_full(&self, position: u64) -> Result<Option<Clip>, glib::Error> {
|
fn split_full(&self, position: u64) -> Result<Option<Clip>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret =
|
let ret =
|
||||||
ffi::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error);
|
ffi::ges_clip_split_full(self.as_ref().to_glib_none().0, position, &mut error);
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
@ -429,7 +426,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration-limit\0".as_ptr() as *const _,
|
b"notify::duration-limit\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_limit_trampoline::<Self, F> as *const (),
|
notify_duration_limit_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -452,7 +449,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::layer\0".as_ptr() as *const _,
|
b"notify::layer\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_layer_trampoline::<Self, F> as *const (),
|
notify_layer_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -478,7 +475,7 @@ pub trait ClipExt: IsA<Clip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::supported-formats\0".as_ptr() as *const _,
|
b"notify::supported-formats\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_supported_formats_trampoline::<Self, F> as *const (),
|
notify_supported_formats_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,10 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_18")]
|
use std::boxed::Box as Box_;
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::mem;
|
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESClipAsset")]
|
#[doc(alias = "GESClipAsset")]
|
||||||
|
@ -58,8 +55,8 @@ pub trait ClipAssetExt: IsA<ClipAsset> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_natural_framerate")]
|
#[doc(alias = "get_natural_framerate")]
|
||||||
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut framerate_n = mem::MaybeUninit::uninit();
|
let mut framerate_n = std::mem::MaybeUninit::uninit();
|
||||||
let mut framerate_d = mem::MaybeUninit::uninit();
|
let mut framerate_d = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_clip_asset_get_natural_framerate(
|
let ret = from_glib(ffi::ges_clip_asset_get_natural_framerate(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
framerate_n.as_mut_ptr(),
|
framerate_n.as_mut_ptr(),
|
||||||
|
@ -114,7 +111,7 @@ pub trait ClipAssetExt: IsA<ClipAsset> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::supported-formats\0".as_ptr() as *const _,
|
b"notify::supported-formats\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_supported_formats_trampoline::<Self, F> as *const (),
|
notify_supported_formats_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -10,7 +10,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESContainer")]
|
#[doc(alias = "GESContainer")]
|
||||||
|
@ -138,7 +138,7 @@ pub trait GESContainerExt: IsA<Container> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"child-added\0".as_ptr() as *const _,
|
b"child-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
child_added_trampoline::<Self, F> as *const (),
|
child_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -170,7 +170,7 @@ pub trait GESContainerExt: IsA<Container> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"child-removed\0".as_ptr() as *const _,
|
b"child-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
child_removed_trampoline::<Self, F> as *const (),
|
child_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -193,7 +193,7 @@ pub trait GESContainerExt: IsA<Container> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::height\0".as_ptr() as *const _,
|
b"notify::height\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_height_trampoline::<Self, F> as *const (),
|
notify_height_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESDiscovererManager")]
|
#[doc(alias = "GESDiscovererManager")]
|
||||||
|
@ -106,7 +106,7 @@ impl DiscovererManager {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"discovered\0".as_ptr() as *const _,
|
b"discovered\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
discovered_trampoline::<F> as *const (),
|
discovered_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -142,7 +142,7 @@ impl DiscovererManager {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"load-serialized-info\0".as_ptr() as *const _,
|
b"load-serialized-info\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
load_serialized_info_trampoline::<F> as *const (),
|
load_serialized_info_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -167,7 +167,7 @@ impl DiscovererManager {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::timeout\0".as_ptr() as *const _,
|
b"notify::timeout\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_timeout_trampoline::<F> as *const (),
|
notify_timeout_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -190,7 +190,7 @@ impl DiscovererManager {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::use-cache\0".as_ptr() as *const _,
|
b"notify::use-cache\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_use_cache_trampoline::<F> as *const (),
|
notify_use_cache_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -7,9 +7,6 @@
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
||||||
use glib::GStr;
|
use glib::GStr;
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
#[cfg(feature = "v1_16")]
|
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
@ -137,9 +134,9 @@ impl Edge {
|
||||||
|
|
||||||
#[cfg(feature = "v1_16")]
|
#[cfg(feature = "v1_16")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
||||||
impl fmt::Display for Edge {
|
impl std::fmt::Display for Edge {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.name())
|
f.write_str(&self.name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,6 +173,7 @@ impl FromGlib<ffi::GESEdge> for Edge {
|
||||||
|
|
||||||
impl StaticType for Edge {
|
impl StaticType for Edge {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_edge_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_edge_get_type()) }
|
unsafe { from_glib(ffi::ges_edge_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -187,7 +185,7 @@ impl glib::HasParamSpec for Edge {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,9 +261,9 @@ impl EditMode {
|
||||||
|
|
||||||
#[cfg(feature = "v1_18")]
|
#[cfg(feature = "v1_18")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
||||||
impl fmt::Display for EditMode {
|
impl std::fmt::Display for EditMode {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.name())
|
f.write_str(&self.name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,6 +304,7 @@ impl FromGlib<ffi::GESEditMode> for EditMode {
|
||||||
|
|
||||||
impl StaticType for EditMode {
|
impl StaticType for EditMode {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_edit_mode_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
|
unsafe { from_glib(ffi::ges_edit_mode_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -317,7 +316,7 @@ impl glib::HasParamSpec for EditMode {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,6 +480,7 @@ impl FromGlib<ffi::GESTextHAlign> for TextHAlign {
|
||||||
|
|
||||||
impl StaticType for TextHAlign {
|
impl StaticType for TextHAlign {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_text_halign_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_text_halign_get_type()) }
|
unsafe { from_glib(ffi::ges_text_halign_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -492,7 +492,7 @@ impl glib::HasParamSpec for TextHAlign {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,6 +592,7 @@ impl FromGlib<ffi::GESTextVAlign> for TextVAlign {
|
||||||
|
|
||||||
impl StaticType for TextVAlign {
|
impl StaticType for TextVAlign {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_text_valign_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_text_valign_get_type()) }
|
unsafe { from_glib(ffi::ges_text_valign_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -603,7 +604,7 @@ impl glib::HasParamSpec for TextVAlign {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -973,6 +974,7 @@ impl FromGlib<ffi::GESVideoStandardTransitionType> for VideoStandardTransitionTy
|
||||||
|
|
||||||
impl StaticType for VideoStandardTransitionType {
|
impl StaticType for VideoStandardTransitionType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_video_standard_transition_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) }
|
unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -984,7 +986,7 @@ impl glib::HasParamSpec for VideoStandardTransitionType {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1130,6 +1132,7 @@ impl FromGlib<ffi::GESVideoTestPattern> for VideoTestPattern {
|
||||||
|
|
||||||
impl StaticType for VideoTestPattern {
|
impl StaticType for VideoTestPattern {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_video_test_pattern_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) }
|
unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -1141,7 +1144,7 @@ impl glib::HasParamSpec for VideoTestPattern {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::{bitflags::bitflags, prelude::*, translate::*, GStr};
|
use glib::{bitflags::bitflags, prelude::*, translate::*, GStr};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[cfg(feature = "v1_20")]
|
#[cfg(feature = "v1_20")]
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
@ -46,6 +45,7 @@ impl FromGlib<ffi::GESMarkerFlags> for MarkerFlags {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
impl StaticType for MarkerFlags {
|
impl StaticType for MarkerFlags {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_marker_flags_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_marker_flags_get_type()) }
|
unsafe { from_glib(ffi::ges_marker_flags_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ impl glib::HasParamSpec for MarkerFlags {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ impl FromGlib<ffi::GESMetaFlag> for MetaFlag {
|
||||||
|
|
||||||
impl StaticType for MetaFlag {
|
impl StaticType for MetaFlag {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_meta_flag_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_meta_flag_get_type()) }
|
unsafe { from_glib(ffi::ges_meta_flag_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -154,7 +155,7 @@ impl glib::HasParamSpec for MetaFlag {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,6 +235,7 @@ impl FromGlib<ffi::GESPipelineFlags> for PipelineFlags {
|
||||||
|
|
||||||
impl StaticType for PipelineFlags {
|
impl StaticType for PipelineFlags {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_pipeline_flags_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) }
|
unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -245,7 +247,7 @@ impl glib::HasParamSpec for PipelineFlags {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,9 +318,9 @@ impl TrackType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for TrackType {
|
impl std::fmt::Display for TrackType {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.name())
|
f.write_str(&self.name())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -344,6 +346,7 @@ impl FromGlib<ffi::GESTrackType> for TrackType {
|
||||||
|
|
||||||
impl StaticType for TrackType {
|
impl StaticType for TrackType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "ges_track_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::ges_track_type_get_type()) }
|
unsafe { from_glib(ffi::ges_track_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -355,7 +358,7 @@ impl glib::HasParamSpec for TrackType {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
use crate::{Asset, Extractable, Timeline};
|
use crate::{Asset, Extractable, Timeline};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESFormatter")]
|
#[doc(alias = "GESFormatter")]
|
||||||
|
@ -24,7 +23,7 @@ impl Formatter {
|
||||||
pub fn can_load_uri(uri: &str) -> Result<(), glib::Error> {
|
pub fn can_load_uri(uri: &str) -> Result<(), glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_formatter_can_load_uri(uri.to_glib_none().0, &mut error);
|
let is_ok = ffi::ges_formatter_can_load_uri(uri.to_glib_none().0, &mut error);
|
||||||
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
@ -39,7 +38,7 @@ impl Formatter {
|
||||||
pub fn can_save_uri(uri: &str) -> Result<(), glib::Error> {
|
pub fn can_save_uri(uri: &str) -> Result<(), glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_formatter_can_save_uri(uri.to_glib_none().0, &mut error);
|
let is_ok = ffi::ges_formatter_can_save_uri(uri.to_glib_none().0, &mut error);
|
||||||
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
@ -70,7 +69,7 @@ pub trait FormatterExt: IsA<Formatter> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_formatter_load_from_uri")]
|
#[doc(alias = "ges_formatter_load_from_uri")]
|
||||||
fn load_from_uri(&self, timeline: &impl IsA<Timeline>, uri: &str) -> Result<(), glib::Error> {
|
fn load_from_uri(&self, timeline: &impl IsA<Timeline>, uri: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_formatter_load_from_uri(
|
let is_ok = ffi::ges_formatter_load_from_uri(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
timeline.as_ref().to_glib_none().0,
|
timeline.as_ref().to_glib_none().0,
|
||||||
|
@ -96,7 +95,7 @@ pub trait FormatterExt: IsA<Formatter> + sealed::Sealed + 'static {
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_formatter_save_to_uri(
|
let is_ok = ffi::ges_formatter_save_to_uri(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
timeline.as_ref().to_glib_none().0,
|
timeline.as_ref().to_glib_none().0,
|
||||||
|
|
|
@ -13,10 +13,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_18")]
|
use std::boxed::Box as Box_;
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::ptr;
|
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESLayer")]
|
#[doc(alias = "GESLayer")]
|
||||||
|
@ -83,7 +80,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
track_types: TrackType,
|
track_types: TrackType,
|
||||||
) -> Result<Clip, glib::Error> {
|
) -> Result<Clip, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_layer_add_asset_full(
|
let ret = ffi::ges_layer_add_asset_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
asset.as_ref().to_glib_none().0,
|
asset.as_ref().to_glib_none().0,
|
||||||
|
@ -119,7 +116,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_layer_add_clip_full")]
|
#[doc(alias = "ges_layer_add_clip_full")]
|
||||||
fn add_clip_full(&self, clip: &impl IsA<Clip>) -> Result<(), glib::Error> {
|
fn add_clip_full(&self, clip: &impl IsA<Clip>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_layer_add_clip_full(
|
let is_ok = ffi::ges_layer_add_clip_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
clip.as_ref().to_glib_none().0,
|
clip.as_ref().to_glib_none().0,
|
||||||
|
@ -289,7 +286,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"clip-added\0".as_ptr() as *const _,
|
b"clip-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
clip_added_trampoline::<Self, F> as *const (),
|
clip_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -315,7 +312,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"clip-removed\0".as_ptr() as *const _,
|
b"clip-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
clip_removed_trampoline::<Self, F> as *const (),
|
clip_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -341,7 +338,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::auto-transition\0".as_ptr() as *const _,
|
b"notify::auto-transition\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_auto_transition_trampoline::<Self, F> as *const (),
|
notify_auto_transition_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -365,7 +362,7 @@ pub trait LayerExt: IsA<Layer> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::priority\0".as_ptr() as *const _,
|
b"notify::priority\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_priority_trampoline::<Self, F> as *const (),
|
notify_priority_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESMarker")]
|
#[doc(alias = "GESMarker")]
|
||||||
|
@ -44,7 +44,7 @@ impl Marker {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::position\0".as_ptr() as *const _,
|
b"notify::position\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_position_trampoline::<F> as *const (),
|
notify_position_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESMarkerList")]
|
#[doc(alias = "GESMarkerList")]
|
||||||
|
@ -110,7 +110,7 @@ impl MarkerList {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"marker-added\0".as_ptr() as *const _,
|
b"marker-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
marker_added_trampoline::<F> as *const (),
|
marker_added_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -147,7 +147,7 @@ impl MarkerList {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"marker-moved\0".as_ptr() as *const _,
|
b"marker-moved\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
marker_moved_trampoline::<F> as *const (),
|
marker_moved_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -172,7 +172,7 @@ impl MarkerList {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"marker-removed\0".as_ptr() as *const _,
|
b"marker-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
marker_removed_trampoline::<F> as *const (),
|
marker_removed_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -197,7 +197,7 @@ impl MarkerList {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::flags\0".as_ptr() as *const _,
|
b"notify::flags\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_flags_trampoline::<F> as *const (),
|
notify_flags_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESMetaContainer")]
|
#[doc(alias = "GESMetaContainer")]
|
||||||
|
@ -46,8 +46,8 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_meta_container_check_meta_registered")]
|
#[doc(alias = "ges_meta_container_check_meta_registered")]
|
||||||
fn check_meta_registered(&self, meta_item: &str) -> Option<(MetaFlag, glib::types::Type)> {
|
fn check_meta_registered(&self, meta_item: &str) -> Option<(MetaFlag, glib::types::Type)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut flags = mem::MaybeUninit::uninit();
|
let mut flags = std::mem::MaybeUninit::uninit();
|
||||||
let mut type_ = mem::MaybeUninit::uninit();
|
let mut type_ = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_check_meta_registered(
|
let ret = from_glib(ffi::ges_meta_container_check_meta_registered(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -95,7 +95,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_boolean")]
|
#[doc(alias = "get_boolean")]
|
||||||
fn boolean(&self, meta_item: &str) -> Option<bool> {
|
fn boolean(&self, meta_item: &str) -> Option<bool> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_boolean(
|
let ret = from_glib(ffi::ges_meta_container_get_boolean(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -113,7 +113,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_date")]
|
#[doc(alias = "get_date")]
|
||||||
fn date(&self, meta_item: &str) -> Option<glib::Date> {
|
fn date(&self, meta_item: &str) -> Option<glib::Date> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = ptr::null_mut();
|
let mut dest = std::ptr::null_mut();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_date(
|
let ret = from_glib(ffi::ges_meta_container_get_date(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -131,7 +131,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_date_time")]
|
#[doc(alias = "get_date_time")]
|
||||||
fn date_time(&self, meta_item: &str) -> Option<gst::DateTime> {
|
fn date_time(&self, meta_item: &str) -> Option<gst::DateTime> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = ptr::null_mut();
|
let mut dest = std::ptr::null_mut();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_date_time(
|
let ret = from_glib(ffi::ges_meta_container_get_date_time(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -149,7 +149,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_double")]
|
#[doc(alias = "get_double")]
|
||||||
fn double(&self, meta_item: &str) -> Option<f64> {
|
fn double(&self, meta_item: &str) -> Option<f64> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_double(
|
let ret = from_glib(ffi::ges_meta_container_get_double(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -167,7 +167,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_float")]
|
#[doc(alias = "get_float")]
|
||||||
fn float(&self, meta_item: &str) -> Option<f32> {
|
fn float(&self, meta_item: &str) -> Option<f32> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_float(
|
let ret = from_glib(ffi::ges_meta_container_get_float(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -185,7 +185,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_int")]
|
#[doc(alias = "get_int")]
|
||||||
fn int(&self, meta_item: &str) -> Option<i32> {
|
fn int(&self, meta_item: &str) -> Option<i32> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_int(
|
let ret = from_glib(ffi::ges_meta_container_get_int(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -203,7 +203,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_int64")]
|
#[doc(alias = "get_int64")]
|
||||||
fn int64(&self, meta_item: &str) -> Option<i64> {
|
fn int64(&self, meta_item: &str) -> Option<i64> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_int64(
|
let ret = from_glib(ffi::ges_meta_container_get_int64(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -256,7 +256,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_uint")]
|
#[doc(alias = "get_uint")]
|
||||||
fn uint(&self, meta_item: &str) -> Option<u32> {
|
fn uint(&self, meta_item: &str) -> Option<u32> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_uint(
|
let ret = from_glib(ffi::ges_meta_container_get_uint(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -274,7 +274,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_uint64")]
|
#[doc(alias = "get_uint64")]
|
||||||
fn uint64(&self, meta_item: &str) -> Option<u64> {
|
fn uint64(&self, meta_item: &str) -> Option<u64> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut dest = mem::MaybeUninit::uninit();
|
let mut dest = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_meta_container_get_uint64(
|
let ret = from_glib(ffi::ges_meta_container_get_uint64(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
meta_item.to_glib_none().0,
|
meta_item.to_glib_none().0,
|
||||||
|
@ -620,7 +620,7 @@ pub trait MetaContainerExt: IsA<MetaContainer> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
signal_name.as_ptr() as *const _,
|
signal_name.as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_meta_trampoline::<Self, F> as *const (),
|
notify_meta_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -213,8 +213,7 @@ pub use self::flags::TrackType;
|
||||||
mod alias;
|
mod alias;
|
||||||
pub use self::alias::FrameNumber;
|
pub use self::alias::FrameNumber;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::asset::AssetExt;
|
pub use super::asset::AssetExt;
|
||||||
pub use super::audio_test_source::AudioTestSourceExt;
|
pub use super::audio_test_source::AudioTestSourceExt;
|
||||||
pub use super::audio_uri_source::AudioUriSourceExt;
|
pub use super::audio_uri_source::AudioUriSourceExt;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESPipeline")]
|
#[doc(alias = "GESPipeline")]
|
||||||
|
@ -118,7 +118,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
location: &str,
|
location: &str,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_pipeline_save_thumbnail(
|
let is_ok = ffi::ges_pipeline_save_thumbnail(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
width,
|
width,
|
||||||
|
@ -239,7 +239,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::audio-filter\0".as_ptr() as *const _,
|
b"notify::audio-filter\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_audio_filter_trampoline::<Self, F> as *const (),
|
notify_audio_filter_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -262,7 +262,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::audio-sink\0".as_ptr() as *const _,
|
b"notify::audio-sink\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_audio_sink_trampoline::<Self, F> as *const (),
|
notify_audio_sink_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -285,7 +285,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mode\0".as_ptr() as *const _,
|
b"notify::mode\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mode_trampoline::<Self, F> as *const (),
|
notify_mode_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -308,7 +308,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::timeline\0".as_ptr() as *const _,
|
b"notify::timeline\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_timeline_trampoline::<Self, F> as *const (),
|
notify_timeline_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -334,7 +334,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::video-filter\0".as_ptr() as *const _,
|
b"notify::video-filter\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_video_filter_trampoline::<Self, F> as *const (),
|
notify_video_filter_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -357,7 +357,7 @@ pub trait GESPipelineExt: IsA<Pipeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::video-sink\0".as_ptr() as *const _,
|
b"notify::video-sink\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_video_sink_trampoline::<Self, F> as *const (),
|
notify_video_sink_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESProject")]
|
#[doc(alias = "GESProject")]
|
||||||
|
@ -95,7 +95,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
extractable_type: glib::types::Type,
|
extractable_type: glib::types::Type,
|
||||||
) -> Result<Option<Asset>, glib::Error> {
|
) -> Result<Option<Asset>, glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_project_create_asset_sync(
|
let ret = ffi::ges_project_create_asset_sync(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
id.to_glib_none().0,
|
id.to_glib_none().0,
|
||||||
|
@ -160,7 +160,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_project_load")]
|
#[doc(alias = "ges_project_load")]
|
||||||
fn load(&self, timeline: &impl IsA<Timeline>) -> Result<(), glib::Error> {
|
fn load(&self, timeline: &impl IsA<Timeline>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_project_load(
|
let is_ok = ffi::ges_project_load(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
timeline.as_ref().to_glib_none().0,
|
timeline.as_ref().to_glib_none().0,
|
||||||
|
@ -197,7 +197,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_project_save(
|
let is_ok = ffi::ges_project_save(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
timeline.as_ref().to_glib_none().0,
|
timeline.as_ref().to_glib_none().0,
|
||||||
|
@ -236,7 +236,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"asset-added\0".as_ptr() as *const _,
|
b"asset-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
asset_added_trampoline::<Self, F> as *const (),
|
asset_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -265,7 +265,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"asset-loading\0".as_ptr() as *const _,
|
b"asset-loading\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
asset_loading_trampoline::<Self, F> as *const (),
|
asset_loading_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -294,7 +294,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"asset-removed\0".as_ptr() as *const _,
|
b"asset-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
asset_removed_trampoline::<Self, F> as *const (),
|
asset_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -330,7 +330,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"error-loading\0".as_ptr() as *const _,
|
b"error-loading\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
error_loading_trampoline::<Self, F> as *const (),
|
error_loading_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -368,7 +368,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"error-loading-asset\0".as_ptr() as *const _,
|
b"error-loading-asset\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
error_loading_asset_trampoline::<Self, F> as *const (),
|
error_loading_asset_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -394,7 +394,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"loaded\0".as_ptr() as *const _,
|
b"loaded\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
loaded_trampoline::<Self, F> as *const (),
|
loaded_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -422,7 +422,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"loading\0".as_ptr() as *const _,
|
b"loading\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
loading_trampoline::<Self, F> as *const (),
|
loading_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -459,7 +459,7 @@ pub trait ProjectExt: IsA<Project> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"missing-uri\0".as_ptr() as *const _,
|
b"missing-uri\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
missing_uri_trampoline::<Self, F> as *const (),
|
missing_uri_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -11,7 +11,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTestClip")]
|
#[doc(alias = "GESTestClip")]
|
||||||
|
@ -123,7 +123,7 @@ pub trait TestClipExt: IsA<TestClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::freq\0".as_ptr() as *const _,
|
b"notify::freq\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_freq_trampoline::<Self, F> as *const (),
|
notify_freq_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -146,7 +146,7 @@ pub trait TestClipExt: IsA<TestClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mute\0".as_ptr() as *const _,
|
b"notify::mute\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mute_trampoline::<Self, F> as *const (),
|
notify_mute_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -169,7 +169,7 @@ pub trait TestClipExt: IsA<TestClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::volume\0".as_ptr() as *const _,
|
b"notify::volume\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_volume_trampoline::<Self, F> as *const (),
|
notify_volume_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -192,7 +192,7 @@ pub trait TestClipExt: IsA<TestClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::vpattern\0".as_ptr() as *const _,
|
b"notify::vpattern\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_vpattern_trampoline::<Self, F> as *const (),
|
notify_vpattern_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTextOverlayClip")]
|
#[doc(alias = "GESTextOverlayClip")]
|
||||||
|
@ -184,7 +184,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::color\0".as_ptr() as *const _,
|
b"notify::color\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_color_trampoline::<Self, F> as *const (),
|
notify_color_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -210,7 +210,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::font-desc\0".as_ptr() as *const _,
|
b"notify::font-desc\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_font_desc_trampoline::<Self, F> as *const (),
|
notify_font_desc_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -236,7 +236,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::halignment\0".as_ptr() as *const _,
|
b"notify::halignment\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_halignment_trampoline::<Self, F> as *const (),
|
notify_halignment_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -262,7 +262,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::text\0".as_ptr() as *const _,
|
b"notify::text\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_text_trampoline::<Self, F> as *const (),
|
notify_text_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -288,7 +288,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::valignment\0".as_ptr() as *const _,
|
b"notify::valignment\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_valignment_trampoline::<Self, F> as *const (),
|
notify_valignment_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -314,7 +314,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::xpos\0".as_ptr() as *const _,
|
b"notify::xpos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_xpos_trampoline::<Self, F> as *const (),
|
notify_xpos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -340,7 +340,7 @@ pub trait TextOverlayClipExt: IsA<TextOverlayClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::ypos\0".as_ptr() as *const _,
|
b"notify::ypos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_ypos_trampoline::<Self, F> as *const (),
|
notify_ypos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -15,7 +15,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTimeline")]
|
#[doc(alias = "GESTimeline")]
|
||||||
|
@ -46,7 +46,7 @@ impl Timeline {
|
||||||
pub fn from_uri(uri: &str) -> Result<Timeline, glib::Error> {
|
pub fn from_uri(uri: &str) -> Result<Timeline, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
let ret = ffi::ges_timeline_new_from_uri(uri.to_glib_none().0, &mut error);
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
Ok(from_glib_none(ret))
|
Ok(from_glib_none(ret))
|
||||||
|
@ -289,7 +289,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_timeline_load_from_uri")]
|
#[doc(alias = "ges_timeline_load_from_uri")]
|
||||||
fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
fn load_from_uri(&self, uri: &str) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_timeline_load_from_uri(
|
let is_ok = ffi::ges_timeline_load_from_uri(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
uri.to_glib_none().0,
|
uri.to_glib_none().0,
|
||||||
|
@ -375,7 +375,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
overwrite: bool,
|
overwrite: bool,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_timeline_save_to_uri(
|
let is_ok = ffi::ges_timeline_save_to_uri(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
uri.to_glib_none().0,
|
uri.to_glib_none().0,
|
||||||
|
@ -435,7 +435,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"commited\0".as_ptr() as *const _,
|
b"commited\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
commited_trampoline::<Self, F> as *const (),
|
commited_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -464,7 +464,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"group-added\0".as_ptr() as *const _,
|
b"group-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
group_added_trampoline::<Self, F> as *const (),
|
group_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -498,7 +498,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"layer-added\0".as_ptr() as *const _,
|
b"layer-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
layer_added_trampoline::<Self, F> as *const (),
|
layer_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -527,7 +527,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"layer-removed\0".as_ptr() as *const _,
|
b"layer-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
layer_removed_trampoline::<Self, F> as *const (),
|
layer_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -566,7 +566,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"select-element-track\0".as_ptr() as *const _,
|
b"select-element-track\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
select_element_track_trampoline::<Self, F> as *const (),
|
select_element_track_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -607,7 +607,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"snapping-ended\0".as_ptr() as *const _,
|
b"snapping-ended\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
snapping_ended_trampoline::<Self, F> as *const (),
|
snapping_ended_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -643,7 +643,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"snapping-started\0".as_ptr() as *const _,
|
b"snapping-started\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
snapping_started_trampoline::<Self, F> as *const (),
|
snapping_started_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -672,7 +672,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"track-added\0".as_ptr() as *const _,
|
b"track-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
track_added_trampoline::<Self, F> as *const (),
|
track_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -701,7 +701,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"track-removed\0".as_ptr() as *const _,
|
b"track-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
track_removed_trampoline::<Self, F> as *const (),
|
track_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -727,7 +727,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::auto-transition\0".as_ptr() as *const _,
|
b"notify::auto-transition\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_auto_transition_trampoline::<Self, F> as *const (),
|
notify_auto_transition_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -750,7 +750,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration\0".as_ptr() as *const _,
|
b"notify::duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_trampoline::<Self, F> as *const (),
|
notify_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -776,7 +776,7 @@ pub trait TimelineExt: IsA<Timeline> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::snapping-distance\0".as_ptr() as *const _,
|
b"notify::snapping-distance\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_snapping_distance_trampoline::<Self, F> as *const (),
|
notify_snapping_distance_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -13,7 +13,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTimelineElement")]
|
#[doc(alias = "GESTimelineElement")]
|
||||||
|
@ -97,7 +97,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
position: u64,
|
position: u64,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_timeline_element_edit_full(
|
let is_ok = ffi::ges_timeline_element_edit_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
new_layer_priority,
|
new_layer_priority,
|
||||||
|
@ -215,8 +215,8 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_natural_framerate")]
|
#[doc(alias = "get_natural_framerate")]
|
||||||
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut framerate_n = mem::MaybeUninit::uninit();
|
let mut framerate_n = std::mem::MaybeUninit::uninit();
|
||||||
let mut framerate_d = mem::MaybeUninit::uninit();
|
let mut framerate_d = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_timeline_element_get_natural_framerate(
|
let ret = from_glib(ffi::ges_timeline_element_get_natural_framerate(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
framerate_n.as_mut_ptr(),
|
framerate_n.as_mut_ptr(),
|
||||||
|
@ -292,7 +292,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_timeline_element_list_children_properties")]
|
#[doc(alias = "ges_timeline_element_list_children_properties")]
|
||||||
fn list_children_properties(&self) -> Vec<glib::ParamSpec> {
|
fn list_children_properties(&self) -> Vec<glib::ParamSpec> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut n_properties = mem::MaybeUninit::uninit();
|
let mut n_properties = std::mem::MaybeUninit::uninit();
|
||||||
let ret = FromGlibContainer::from_glib_full_num(
|
let ret = FromGlibContainer::from_glib_full_num(
|
||||||
ffi::ges_timeline_element_list_children_properties(
|
ffi::ges_timeline_element_list_children_properties(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
@ -307,8 +307,8 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_timeline_element_lookup_child")]
|
#[doc(alias = "ges_timeline_element_lookup_child")]
|
||||||
fn lookup_child(&self, prop_name: &str) -> Option<(glib::Object, glib::ParamSpec)> {
|
fn lookup_child(&self, prop_name: &str) -> Option<(glib::Object, glib::ParamSpec)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut child = ptr::null_mut();
|
let mut child = std::ptr::null_mut();
|
||||||
let mut pspec = ptr::null_mut();
|
let mut pspec = std::ptr::null_mut();
|
||||||
let ret = from_glib(ffi::ges_timeline_element_lookup_child(
|
let ret = from_glib(ffi::ges_timeline_element_lookup_child(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
prop_name.to_glib_none().0,
|
prop_name.to_glib_none().0,
|
||||||
|
@ -439,7 +439,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
value: &glib::Value,
|
value: &glib::Value,
|
||||||
) -> Result<(), glib::Error> {
|
) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_timeline_element_set_child_property_full(
|
let is_ok = ffi::ges_timeline_element_set_child_property_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
property_name.to_glib_none().0,
|
property_name.to_glib_none().0,
|
||||||
|
@ -607,7 +607,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"child-property-added\0".as_ptr() as *const _,
|
b"child-property-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
child_property_added_trampoline::<Self, F> as *const (),
|
child_property_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -643,7 +643,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"child-property-removed\0".as_ptr() as *const _,
|
b"child-property-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
child_property_removed_trampoline::<Self, F> as *const (),
|
child_property_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -682,7 +682,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
signal_name.as_ptr() as *const _,
|
signal_name.as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
deep_notify_trampoline::<Self, F> as *const (),
|
deep_notify_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -708,7 +708,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration\0".as_ptr() as *const _,
|
b"notify::duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_trampoline::<Self, F> as *const (),
|
notify_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -734,7 +734,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::in-point\0".as_ptr() as *const _,
|
b"notify::in-point\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_in_point_trampoline::<Self, F> as *const (),
|
notify_in_point_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -760,7 +760,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::max-duration\0".as_ptr() as *const _,
|
b"notify::max-duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_max_duration_trampoline::<Self, F> as *const (),
|
notify_max_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -786,7 +786,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::name\0".as_ptr() as *const _,
|
b"notify::name\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_name_trampoline::<Self, F> as *const (),
|
notify_name_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -812,7 +812,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::parent\0".as_ptr() as *const _,
|
b"notify::parent\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_parent_trampoline::<Self, F> as *const (),
|
notify_parent_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -839,7 +839,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::priority\0".as_ptr() as *const _,
|
b"notify::priority\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_priority_trampoline::<Self, F> as *const (),
|
notify_priority_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -865,7 +865,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::serialize\0".as_ptr() as *const _,
|
b"notify::serialize\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_serialize_trampoline::<Self, F> as *const (),
|
notify_serialize_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -891,7 +891,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::start\0".as_ptr() as *const _,
|
b"notify::start\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_start_trampoline::<Self, F> as *const (),
|
notify_start_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -917,7 +917,7 @@ pub trait TimelineElementExt: IsA<TimelineElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::timeline\0".as_ptr() as *const _,
|
b"notify::timeline\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_timeline_trampoline::<Self, F> as *const (),
|
notify_timeline_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -13,7 +13,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTitleClip")]
|
#[doc(alias = "GESTitleClip")]
|
||||||
|
@ -220,7 +220,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::background\0".as_ptr() as *const _,
|
b"notify::background\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_background_trampoline::<Self, F> as *const (),
|
notify_background_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -244,7 +244,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::color\0".as_ptr() as *const _,
|
b"notify::color\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_color_trampoline::<Self, F> as *const (),
|
notify_color_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -268,7 +268,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::font-desc\0".as_ptr() as *const _,
|
b"notify::font-desc\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_font_desc_trampoline::<Self, F> as *const (),
|
notify_font_desc_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -295,7 +295,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::halignment\0".as_ptr() as *const _,
|
b"notify::halignment\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_halignment_trampoline::<Self, F> as *const (),
|
notify_halignment_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -319,7 +319,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::text\0".as_ptr() as *const _,
|
b"notify::text\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_text_trampoline::<Self, F> as *const (),
|
notify_text_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -346,7 +346,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::valignment\0".as_ptr() as *const _,
|
b"notify::valignment\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_valignment_trampoline::<Self, F> as *const (),
|
notify_valignment_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -370,7 +370,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::xpos\0".as_ptr() as *const _,
|
b"notify::xpos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_xpos_trampoline::<Self, F> as *const (),
|
notify_xpos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -394,7 +394,7 @@ pub trait TitleClipExt: IsA<TitleClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::ypos\0".as_ptr() as *const _,
|
b"notify::ypos\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_ypos_trampoline::<Self, F> as *const (),
|
notify_ypos_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,10 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_18")]
|
use std::boxed::Box as Box_;
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::ptr;
|
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTrack")]
|
#[doc(alias = "GESTrack")]
|
||||||
|
@ -57,7 +54,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_track_add_element_full")]
|
#[doc(alias = "ges_track_add_element_full")]
|
||||||
fn add_element_full(&self, object: &impl IsA<TrackElement>) -> Result<(), glib::Error> {
|
fn add_element_full(&self, object: &impl IsA<TrackElement>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_track_add_element_full(
|
let is_ok = ffi::ges_track_add_element_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
object.as_ref().to_glib_none().0,
|
object.as_ref().to_glib_none().0,
|
||||||
|
@ -138,7 +135,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_track_remove_element_full")]
|
#[doc(alias = "ges_track_remove_element_full")]
|
||||||
fn remove_element_full(&self, object: &impl IsA<TrackElement>) -> Result<(), glib::Error> {
|
fn remove_element_full(&self, object: &impl IsA<TrackElement>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::ges_track_remove_element_full(
|
let is_ok = ffi::ges_track_remove_element_full(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
object.as_ref().to_glib_none().0,
|
object.as_ref().to_glib_none().0,
|
||||||
|
@ -235,7 +232,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"commited\0".as_ptr() as *const _,
|
b"commited\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
commited_trampoline::<Self, F> as *const (),
|
commited_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -267,7 +264,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"track-element-added\0".as_ptr() as *const _,
|
b"track-element-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
track_element_added_trampoline::<Self, F> as *const (),
|
track_element_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -299,7 +296,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"track-element-removed\0".as_ptr() as *const _,
|
b"track-element-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
track_element_removed_trampoline::<Self, F> as *const (),
|
track_element_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -322,7 +319,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration\0".as_ptr() as *const _,
|
b"notify::duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_trampoline::<Self, F> as *const (),
|
notify_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -347,7 +344,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::id\0".as_ptr() as *const _,
|
b"notify::id\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_id_trampoline::<Self, F> as *const (),
|
notify_id_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -370,7 +367,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mixing\0".as_ptr() as *const _,
|
b"notify::mixing\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mixing_trampoline::<Self, F> as *const (),
|
notify_mixing_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -396,7 +393,7 @@ pub trait GESTrackExt: IsA<Track> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::restriction-caps\0".as_ptr() as *const _,
|
b"notify::restriction-caps\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_restriction_caps_trampoline::<Self, F> as *const (),
|
notify_restriction_caps_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -10,7 +10,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTrackElement")]
|
#[doc(alias = "GESTrackElement")]
|
||||||
|
@ -243,7 +243,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_track_element_list_children_properties")]
|
#[doc(alias = "ges_track_element_list_children_properties")]
|
||||||
fn list_children_properties(&self) -> Vec<glib::ParamSpec> {
|
fn list_children_properties(&self) -> Vec<glib::ParamSpec> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut n_properties = mem::MaybeUninit::uninit();
|
let mut n_properties = std::mem::MaybeUninit::uninit();
|
||||||
let ret = FromGlibContainer::from_glib_full_num(
|
let ret = FromGlibContainer::from_glib_full_num(
|
||||||
ffi::ges_track_element_list_children_properties(
|
ffi::ges_track_element_list_children_properties(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
|
@ -258,8 +258,8 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "ges_track_element_lookup_child")]
|
#[doc(alias = "ges_track_element_lookup_child")]
|
||||||
fn lookup_child(&self, prop_name: &str) -> Option<(gst::Element, glib::ParamSpec)> {
|
fn lookup_child(&self, prop_name: &str) -> Option<(gst::Element, glib::ParamSpec)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut element = ptr::null_mut();
|
let mut element = std::ptr::null_mut();
|
||||||
let mut pspec = ptr::null_mut();
|
let mut pspec = std::ptr::null_mut();
|
||||||
let ret = from_glib(ffi::ges_track_element_lookup_child(
|
let ret = from_glib(ffi::ges_track_element_lookup_child(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
prop_name.to_glib_none().0,
|
prop_name.to_glib_none().0,
|
||||||
|
@ -411,7 +411,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"control-binding-added\0".as_ptr() as *const _,
|
b"control-binding-added\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
control_binding_added_trampoline::<Self, F> as *const (),
|
control_binding_added_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -443,7 +443,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"control-binding-removed\0".as_ptr() as *const _,
|
b"control-binding-removed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
control_binding_removed_trampoline::<Self, F> as *const (),
|
control_binding_removed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -466,7 +466,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::active\0".as_ptr() as *const _,
|
b"notify::active\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_active_trampoline::<Self, F> as *const (),
|
notify_active_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -497,7 +497,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::auto-clamp-control-sources\0".as_ptr() as *const _,
|
b"notify::auto-clamp-control-sources\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_auto_clamp_control_sources_trampoline::<Self, F> as *const (),
|
notify_auto_clamp_control_sources_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -525,7 +525,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::has-internal-source\0".as_ptr() as *const _,
|
b"notify::has-internal-source\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_has_internal_source_trampoline::<Self, F> as *const (),
|
notify_has_internal_source_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -548,7 +548,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::track\0".as_ptr() as *const _,
|
b"notify::track\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_track_trampoline::<Self, F> as *const (),
|
notify_track_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -574,7 +574,7 @@ pub trait TrackElementExt: IsA<TrackElement> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::track-type\0".as_ptr() as *const _,
|
b"notify::track-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_track_type_trampoline::<Self, F> as *const (),
|
notify_track_type_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,10 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
#[cfg(feature = "v1_18")]
|
use std::boxed::Box as Box_;
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::mem;
|
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTrackElementAsset")]
|
#[doc(alias = "GESTrackElementAsset")]
|
||||||
|
@ -42,8 +39,8 @@ pub trait TrackElementAssetExt: IsA<TrackElementAsset> + sealed::Sealed + 'stati
|
||||||
#[doc(alias = "get_natural_framerate")]
|
#[doc(alias = "get_natural_framerate")]
|
||||||
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
fn natural_framerate(&self) -> Option<(i32, i32)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut framerate_n = mem::MaybeUninit::uninit();
|
let mut framerate_n = std::mem::MaybeUninit::uninit();
|
||||||
let mut framerate_d = mem::MaybeUninit::uninit();
|
let mut framerate_d = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_track_element_asset_get_natural_framerate(
|
let ret = from_glib(ffi::ges_track_element_asset_get_natural_framerate(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
framerate_n.as_mut_ptr(),
|
framerate_n.as_mut_ptr(),
|
||||||
|
@ -98,7 +95,7 @@ pub trait TrackElementAssetExt: IsA<TrackElementAsset> + sealed::Sealed + 'stati
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::track-type\0".as_ptr() as *const _,
|
b"notify::track-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_track_type_trampoline::<Self, F> as *const (),
|
notify_track_type_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESTransitionClip")]
|
#[doc(alias = "GESTransitionClip")]
|
||||||
|
@ -72,7 +72,7 @@ pub trait TransitionClipExt: IsA<TransitionClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::vtype\0".as_ptr() as *const _,
|
b"notify::vtype\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_vtype_trampoline::<Self, F> as *const (),
|
notify_vtype_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESUriClip")]
|
#[doc(alias = "GESUriClip")]
|
||||||
|
@ -84,7 +84,7 @@ pub trait UriClipExt: IsA<UriClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::is-image\0".as_ptr() as *const _,
|
b"notify::is-image\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_is_image_trampoline::<Self, F> as *const (),
|
notify_is_image_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -107,7 +107,7 @@ pub trait UriClipExt: IsA<UriClip> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::mute\0".as_ptr() as *const _,
|
b"notify::mute\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_mute_trampoline::<Self, F> as *const (),
|
notify_mute_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
#[cfg(feature = "v1_18")]
|
#[cfg(feature = "v1_18")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
||||||
|
@ -54,7 +54,7 @@ impl UriClipAsset {
|
||||||
pub fn request_sync(uri: &str) -> Result<UriClipAsset, glib::Error> {
|
pub fn request_sync(uri: &str) -> Result<UriClipAsset, glib::Error> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
let ret = ffi::ges_uri_clip_asset_request_sync(uri.to_glib_none().0, &mut error);
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
Ok(from_glib_full(ret))
|
Ok(from_glib_full(ret))
|
||||||
|
@ -159,7 +159,7 @@ pub trait UriClipAssetExt: IsA<UriClipAsset> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::duration\0".as_ptr() as *const _,
|
b"notify::duration\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_duration_trampoline::<Self, F> as *const (),
|
notify_duration_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -190,7 +190,7 @@ pub trait UriClipAssetExt: IsA<UriClipAsset> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::is-nested-timeline\0".as_ptr() as *const _,
|
b"notify::is-nested-timeline\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_is_nested_timeline_trampoline::<Self, F> as *const (),
|
notify_is_nested_timeline_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -8,9 +8,6 @@ use glib::prelude::*;
|
||||||
#[cfg(feature = "v1_18")]
|
#[cfg(feature = "v1_18")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
||||||
use glib::translate::*;
|
use glib::translate::*;
|
||||||
#[cfg(feature = "v1_18")]
|
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESVideoSource")]
|
#[doc(alias = "GESVideoSource")]
|
||||||
|
@ -37,8 +34,8 @@ pub trait VideoSourceExt: IsA<VideoSource> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_natural_size")]
|
#[doc(alias = "get_natural_size")]
|
||||||
fn natural_size(&self) -> Option<(i32, i32)> {
|
fn natural_size(&self) -> Option<(i32, i32)> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut width = mem::MaybeUninit::uninit();
|
let mut width = std::mem::MaybeUninit::uninit();
|
||||||
let mut height = mem::MaybeUninit::uninit();
|
let mut height = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::ges_video_source_get_natural_size(
|
let ret = from_glib(ffi::ges_video_source_get_natural_size(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
width.as_mut_ptr(),
|
width.as_mut_ptr(),
|
||||||
|
|
|
@ -13,7 +13,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GESVideoTransition")]
|
#[doc(alias = "GESVideoTransition")]
|
||||||
|
@ -134,7 +134,7 @@ pub trait VideoTransitionExt: IsA<VideoTransition> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::border\0".as_ptr() as *const _,
|
b"notify::border\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_border_trampoline::<Self, F> as *const (),
|
notify_border_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -161,7 +161,7 @@ pub trait VideoTransitionExt: IsA<VideoTransition> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::invert\0".as_ptr() as *const _,
|
b"notify::invert\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_invert_trampoline::<Self, F> as *const (),
|
notify_invert_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -187,7 +187,7 @@ pub trait VideoTransitionExt: IsA<VideoTransition> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::transition-type\0".as_ptr() as *const _,
|
b"notify::transition-type\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_transition_type_trampoline::<Self, F> as *const (),
|
notify_transition_type_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Generated by gir (https://github.com/gtk-rs/gir @ 1d1ce102e130)
|
Generated by gir (https://github.com/gtk-rs/gir @ 0f2c059e0939)
|
||||||
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
from gir-files (https://github.com/gtk-rs/gir-files @ 060b114d8edb)
|
||||||
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ e23da450405e)
|
||||||
|
|
|
@ -11,7 +11,7 @@ use std::error::Error;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{align_of, size_of};
|
use std::mem::{align_of, size_of};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process::Command;
|
use std::process::{Command, Stdio};
|
||||||
use std::str;
|
use std::str;
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
|
@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> {
|
||||||
let mut cmd = Command::new(pkg_config);
|
let mut cmd = Command::new(pkg_config);
|
||||||
cmd.arg("--cflags");
|
cmd.arg("--cflags");
|
||||||
cmd.args(packages);
|
cmd.args(packages);
|
||||||
|
cmd.stderr(Stdio::inherit());
|
||||||
let out = cmd.output()?;
|
let out = cmd.output()?;
|
||||||
if !out.status.success() {
|
if !out.status.success() {
|
||||||
return Err(format!("command {cmd:?} returned {}", out.status).into());
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
let stdout = str::from_utf8(&out.stdout)?;
|
let stdout = str::from_utf8(&out.stdout)?;
|
||||||
Ok(shell_words::split(stdout.trim())?)
|
Ok(shell_words::split(stdout.trim())?)
|
||||||
|
@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> {
|
||||||
let cc = Compiler::new().expect("configured compiler");
|
let cc = Compiler::new().expect("configured compiler");
|
||||||
cc.compile(&c_file, &exe)?;
|
cc.compile(&c_file, &exe)?;
|
||||||
|
|
||||||
let mut abi_cmd = Command::new(exe);
|
let mut cmd = Command::new(exe);
|
||||||
let output = abi_cmd.output()?;
|
cmd.stderr(Stdio::inherit());
|
||||||
if !output.status.success() {
|
let out = cmd.output()?;
|
||||||
return Err(format!("command {abi_cmd:?} failed, {output:?}").into());
|
if !out.status.success() {
|
||||||
|
let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout));
|
||||||
|
return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(String::from_utf8(output.stdout)?)
|
Ok(String::from_utf8(out.stdout)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
const RUST_LAYOUTS: &[(&str, Layout)] = &[
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::{GLContext, GLSLProfile};
|
use crate::{GLContext, GLSLProfile};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
#[cfg(feature = "v1_20")]
|
#[cfg(feature = "v1_20")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
|
@ -72,6 +71,7 @@ impl FromGlib<ffi::GstGLConfigCaveat> for GLConfigCaveat {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
impl StaticType for GLConfigCaveat {
|
impl StaticType for GLConfigCaveat {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_config_caveat_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_config_caveat_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_config_caveat_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ impl glib::HasParamSpec for GLConfigCaveat {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@ impl glib::error::ErrorDomain for GLContextError {
|
||||||
|
|
||||||
impl StaticType for GLContextError {
|
impl StaticType for GLContextError {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_context_error_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_context_error_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_context_error_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -228,7 +229,7 @@ impl glib::HasParamSpec for GLContextError {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,8 +361,8 @@ impl GLFormat {
|
||||||
pub fn type_from_sized_gl_format(self) -> (GLFormat, u32) {
|
pub fn type_from_sized_gl_format(self) -> (GLFormat, u32) {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut unsized_format = mem::MaybeUninit::uninit();
|
let mut unsized_format = std::mem::MaybeUninit::uninit();
|
||||||
let mut gl_type = mem::MaybeUninit::uninit();
|
let mut gl_type = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_gl_format_type_from_sized_gl_format(
|
ffi::gst_gl_format_type_from_sized_gl_format(
|
||||||
self.into_glib(),
|
self.into_glib(),
|
||||||
unsized_format.as_mut_ptr(),
|
unsized_format.as_mut_ptr(),
|
||||||
|
@ -443,6 +444,7 @@ impl FromGlib<ffi::GstGLFormat> for GLFormat {
|
||||||
|
|
||||||
impl StaticType for GLFormat {
|
impl StaticType for GLFormat {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_format_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_format_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_format_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -454,7 +456,7 @@ impl glib::HasParamSpec for GLFormat {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,6 +544,7 @@ impl FromGlib<ffi::GstGLQueryType> for GLQueryType {
|
||||||
|
|
||||||
impl StaticType for GLQueryType {
|
impl StaticType for GLQueryType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_query_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_query_type_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_query_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -553,7 +556,7 @@ impl glib::HasParamSpec for GLQueryType {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,6 +667,7 @@ impl glib::error::ErrorDomain for GLSLError {
|
||||||
|
|
||||||
impl StaticType for GLSLError {
|
impl StaticType for GLSLError {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_glsl_error_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_glsl_error_get_type()) }
|
unsafe { from_glib(ffi::gst_glsl_error_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -675,7 +679,7 @@ impl glib::HasParamSpec for GLSLError {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,8 +774,8 @@ impl GLSLVersion {
|
||||||
pub fn profile_from_string(string: &str) -> Option<(GLSLVersion, GLSLProfile)> {
|
pub fn profile_from_string(string: &str) -> Option<(GLSLVersion, GLSLProfile)> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut version_ret = mem::MaybeUninit::uninit();
|
let mut version_ret = std::mem::MaybeUninit::uninit();
|
||||||
let mut profile_ret = mem::MaybeUninit::uninit();
|
let mut profile_ret = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_glsl_version_profile_from_string(
|
let ret = from_glib(ffi::gst_glsl_version_profile_from_string(
|
||||||
string.to_glib_none().0,
|
string.to_glib_none().0,
|
||||||
version_ret.as_mut_ptr(),
|
version_ret.as_mut_ptr(),
|
||||||
|
@ -865,6 +869,7 @@ impl FromGlib<ffi::GstGLSLVersion> for GLSLVersion {
|
||||||
|
|
||||||
impl StaticType for GLSLVersion {
|
impl StaticType for GLSLVersion {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_glsl_version_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_glsl_version_get_type()) }
|
unsafe { from_glib(ffi::gst_glsl_version_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -876,7 +881,7 @@ impl glib::HasParamSpec for GLSLVersion {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -964,6 +969,7 @@ impl FromGlib<ffi::GstGLStereoDownmix> for GLStereoDownmix {
|
||||||
|
|
||||||
impl StaticType for GLStereoDownmix {
|
impl StaticType for GLStereoDownmix {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_stereo_downmix_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_stereo_downmix_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_stereo_downmix_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -975,7 +981,7 @@ impl glib::HasParamSpec for GLStereoDownmix {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1104,6 +1110,7 @@ impl FromGlib<ffi::GstGLTextureTarget> for GLTextureTarget {
|
||||||
|
|
||||||
impl StaticType for GLTextureTarget {
|
impl StaticType for GLTextureTarget {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_texture_target_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_texture_target_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_texture_target_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -1115,7 +1122,7 @@ impl glib::HasParamSpec for GLTextureTarget {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1211,6 +1218,7 @@ impl FromGlib<ffi::GstGLUploadReturn> for GLUploadReturn {
|
||||||
|
|
||||||
impl StaticType for GLUploadReturn {
|
impl StaticType for GLUploadReturn {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_upload_return_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_upload_return_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_upload_return_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -1222,7 +1230,7 @@ impl glib::HasParamSpec for GLUploadReturn {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1334,6 +1342,7 @@ impl glib::error::ErrorDomain for GLWindowError {
|
||||||
|
|
||||||
impl StaticType for GLWindowError {
|
impl StaticType for GLWindowError {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_window_error_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_window_error_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_window_error_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1354,7 @@ impl glib::HasParamSpec for GLWindowError {
|
||||||
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name, default_value| Self::ParamSpec::builder_with_default(name, default_value)
|
Self::ParamSpec::builder_with_default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
// DO NOT EDIT
|
// DO NOT EDIT
|
||||||
|
|
||||||
use glib::{bitflags::bitflags, prelude::*, translate::*};
|
use glib::{bitflags::bitflags, prelude::*, translate::*};
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
|
||||||
|
@ -36,9 +35,9 @@ impl GLAPI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GLAPI {
|
impl std::fmt::Display for GLAPI {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.to_str())
|
f.write_str(&self.to_str())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +63,7 @@ impl FromGlib<ffi::GstGLAPI> for GLAPI {
|
||||||
|
|
||||||
impl StaticType for GLAPI {
|
impl StaticType for GLAPI {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_api_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_api_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_api_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ impl glib::HasParamSpec for GLAPI {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,6 +172,7 @@ impl FromGlib<ffi::GstGLConfigSurfaceType> for GLConfigSurfaceType {
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
||||||
impl StaticType for GLConfigSurfaceType {
|
impl StaticType for GLConfigSurfaceType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_config_surface_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_config_surface_type_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_config_surface_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -185,7 +186,7 @@ impl glib::HasParamSpec for GLConfigSurfaceType {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +296,7 @@ impl FromGlib<ffi::GstGLDisplayType> for GLDisplayType {
|
||||||
|
|
||||||
impl StaticType for GLDisplayType {
|
impl StaticType for GLDisplayType {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_display_type_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_display_type_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_display_type_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -306,7 +308,7 @@ impl glib::HasParamSpec for GLDisplayType {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,9 +386,9 @@ impl GLPlatform {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for GLPlatform {
|
impl std::fmt::Display for GLPlatform {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
f.write_str(&self.to_str())
|
f.write_str(&self.to_str())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,6 +414,7 @@ impl FromGlib<ffi::GstGLPlatform> for GLPlatform {
|
||||||
|
|
||||||
impl StaticType for GLPlatform {
|
impl StaticType for GLPlatform {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_gl_platform_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_gl_platform_get_type()) }
|
unsafe { from_glib(ffi::gst_gl_platform_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -423,7 +426,7 @@ impl glib::HasParamSpec for GLPlatform {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,6 +517,7 @@ impl FromGlib<ffi::GstGLSLProfile> for GLSLProfile {
|
||||||
|
|
||||||
impl StaticType for GLSLProfile {
|
impl StaticType for GLSLProfile {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[doc(alias = "gst_glsl_profile_get_type")]
|
||||||
fn static_type() -> glib::Type {
|
fn static_type() -> glib::Type {
|
||||||
unsafe { from_glib(ffi::gst_glsl_profile_get_type()) }
|
unsafe { from_glib(ffi::gst_glsl_profile_get_type()) }
|
||||||
}
|
}
|
||||||
|
@ -525,7 +529,7 @@ impl glib::HasParamSpec for GLSLProfile {
|
||||||
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
type BuilderFn = fn(&str) -> glib::ParamSpecFlagsBuilder<Self>;
|
||||||
|
|
||||||
fn param_spec_builder() -> Self::BuilderFn {
|
fn param_spec_builder() -> Self::BuilderFn {
|
||||||
|name| Self::ParamSpec::builder(name)
|
Self::ParamSpec::builder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::{GLDisplay, GLSLProfile, GLSLVersion};
|
use crate::{GLDisplay, GLSLProfile, GLSLVersion};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
#[doc(alias = "gst_gl_check_extension")]
|
#[doc(alias = "gst_gl_check_extension")]
|
||||||
pub fn gl_check_extension(name: &str, ext: &str) -> bool {
|
pub fn gl_check_extension(name: &str, ext: &str) -> bool {
|
||||||
|
@ -50,8 +49,8 @@ pub fn gl_element_propagate_display_context(
|
||||||
pub fn glsl_string_get_version_profile(s: &str) -> Option<(GLSLVersion, GLSLProfile)> {
|
pub fn glsl_string_get_version_profile(s: &str) -> Option<(GLSLVersion, GLSLProfile)> {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut version = mem::MaybeUninit::uninit();
|
let mut version = std::mem::MaybeUninit::uninit();
|
||||||
let mut profile = mem::MaybeUninit::uninit();
|
let mut profile = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_glsl_string_get_version_profile(
|
let ret = from_glib(ffi::gst_glsl_string_get_version_profile(
|
||||||
s.to_glib_none().0,
|
s.to_glib_none().0,
|
||||||
version.as_mut_ptr(),
|
version.as_mut_ptr(),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLBaseFilter")]
|
#[doc(alias = "GstGLBaseFilter")]
|
||||||
|
@ -81,7 +81,7 @@ pub trait GLBaseFilterExt: IsA<GLBaseFilter> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::context\0".as_ptr() as *const _,
|
b"notify::context\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_context_trampoline::<Self, F> as *const (),
|
notify_context_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -8,7 +8,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLBaseSrc")]
|
#[doc(alias = "GstGLBaseSrc")]
|
||||||
|
@ -63,7 +63,7 @@ pub trait GLBaseSrcExt: IsA<GLBaseSrc> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::timestamp-offset\0".as_ptr() as *const _,
|
b"notify::timestamp-offset\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_timestamp_offset_trampoline::<Self, F> as *const (),
|
notify_timestamp_offset_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::{GLDisplay, GLPlatform, GLSLProfile, GLSLVersion, GLWindow, GLAPI};
|
use crate::{GLDisplay, GLPlatform, GLSLProfile, GLSLVersion, GLWindow, GLAPI};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::{mem, ptr};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLContext")]
|
#[doc(alias = "GstGLContext")]
|
||||||
|
@ -37,8 +36,8 @@ impl GLContext {
|
||||||
pub fn current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32) {
|
pub fn current_gl_api(platform: GLPlatform) -> (GLAPI, u32, u32) {
|
||||||
assert_initialized_main_thread!();
|
assert_initialized_main_thread!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut major = mem::MaybeUninit::uninit();
|
let mut major = std::mem::MaybeUninit::uninit();
|
||||||
let mut minor = mem::MaybeUninit::uninit();
|
let mut minor = std::mem::MaybeUninit::uninit();
|
||||||
let ret = from_glib(ffi::gst_gl_context_get_current_gl_api(
|
let ret = from_glib(ffi::gst_gl_context_get_current_gl_api(
|
||||||
platform.into_glib(),
|
platform.into_glib(),
|
||||||
major.as_mut_ptr(),
|
major.as_mut_ptr(),
|
||||||
|
@ -127,7 +126,7 @@ pub trait GLContextExt: IsA<GLContext> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "gst_gl_context_create")]
|
#[doc(alias = "gst_gl_context_create")]
|
||||||
fn create(&self, other_context: Option<&impl IsA<GLContext>>) -> Result<(), glib::Error> {
|
fn create(&self, other_context: Option<&impl IsA<GLContext>>) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::gst_gl_context_create(
|
let is_ok = ffi::gst_gl_context_create(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
other_context.map(|p| p.as_ref()).to_glib_none().0,
|
other_context.map(|p| p.as_ref()).to_glib_none().0,
|
||||||
|
@ -152,7 +151,7 @@ pub trait GLContextExt: IsA<GLContext> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "gst_gl_context_fill_info")]
|
#[doc(alias = "gst_gl_context_fill_info")]
|
||||||
fn fill_info(&self) -> Result<(), glib::Error> {
|
fn fill_info(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error);
|
let is_ok = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error);
|
||||||
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
@ -209,8 +208,8 @@ pub trait GLContextExt: IsA<GLContext> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_gl_platform_version")]
|
#[doc(alias = "get_gl_platform_version")]
|
||||||
fn gl_platform_version(&self) -> (i32, i32) {
|
fn gl_platform_version(&self) -> (i32, i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut major = mem::MaybeUninit::uninit();
|
let mut major = std::mem::MaybeUninit::uninit();
|
||||||
let mut minor = mem::MaybeUninit::uninit();
|
let mut minor = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_gl_context_get_gl_platform_version(
|
ffi::gst_gl_context_get_gl_platform_version(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
major.as_mut_ptr(),
|
major.as_mut_ptr(),
|
||||||
|
@ -224,8 +223,8 @@ pub trait GLContextExt: IsA<GLContext> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_gl_version")]
|
#[doc(alias = "get_gl_version")]
|
||||||
fn gl_version(&self) -> (i32, i32) {
|
fn gl_version(&self) -> (i32, i32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut maj = mem::MaybeUninit::uninit();
|
let mut maj = std::mem::MaybeUninit::uninit();
|
||||||
let mut min = mem::MaybeUninit::uninit();
|
let mut min = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_gl_context_get_gl_version(
|
ffi::gst_gl_context_get_gl_version(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
maj.as_mut_ptr(),
|
maj.as_mut_ptr(),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLDisplay")]
|
#[doc(alias = "GstGLDisplay")]
|
||||||
|
@ -148,7 +148,7 @@ pub trait GLDisplayExt: IsA<GLDisplay> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"create-context\0".as_ptr() as *const _,
|
b"create-context\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
create_context_trampoline::<Self, F> as *const (),
|
create_context_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::{GLBaseMemory, GLContext};
|
use crate::{GLBaseMemory, GLContext};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::mem;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLFramebuffer")]
|
#[doc(alias = "GstGLFramebuffer")]
|
||||||
|
@ -76,8 +75,8 @@ pub trait GLFramebufferExt: IsA<GLFramebuffer> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_effective_dimensions")]
|
#[doc(alias = "get_effective_dimensions")]
|
||||||
fn effective_dimensions(&self) -> (u32, u32) {
|
fn effective_dimensions(&self) -> (u32, u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut width = mem::MaybeUninit::uninit();
|
let mut width = std::mem::MaybeUninit::uninit();
|
||||||
let mut height = mem::MaybeUninit::uninit();
|
let mut height = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_gl_framebuffer_get_effective_dimensions(
|
ffi::gst_gl_framebuffer_get_effective_dimensions(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
width.as_mut_ptr(),
|
width.as_mut_ptr(),
|
||||||
|
|
|
@ -10,7 +10,7 @@ use glib::signal::{connect_raw, SignalHandlerId};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
#[cfg(feature = "v1_16")]
|
#[cfg(feature = "v1_16")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLOverlayCompositor")]
|
#[doc(alias = "GstGLOverlayCompositor")]
|
||||||
|
@ -90,7 +90,7 @@ impl GLOverlayCompositor {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::yinvert\0".as_ptr() as *const _,
|
b"notify::yinvert\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_yinvert_trampoline::<F> as *const (),
|
notify_yinvert_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -12,7 +12,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute, ptr};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLShader")]
|
#[doc(alias = "GstGLShader")]
|
||||||
|
@ -34,7 +34,7 @@ impl GLShader {
|
||||||
pub fn new_default(context: &impl IsA<GLContext>) -> Result<GLShader, glib::Error> {
|
pub fn new_default(context: &impl IsA<GLContext>) -> Result<GLShader, glib::Error> {
|
||||||
skip_assert_initialized!();
|
skip_assert_initialized!();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let ret = ffi::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error);
|
let ret = ffi::gst_gl_shader_new_default(context.as_ref().to_glib_none().0, &mut error);
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
Ok(from_glib_full(ret))
|
Ok(from_glib_full(ret))
|
||||||
|
@ -100,7 +100,7 @@ impl GLShader {
|
||||||
#[doc(alias = "gst_gl_shader_compile_attach_stage")]
|
#[doc(alias = "gst_gl_shader_compile_attach_stage")]
|
||||||
pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), glib::Error> {
|
pub fn compile_attach_stage(&self, stage: &GLSLStage) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::gst_gl_shader_compile_attach_stage(
|
let is_ok = ffi::gst_gl_shader_compile_attach_stage(
|
||||||
self.to_glib_none().0,
|
self.to_glib_none().0,
|
||||||
stage.to_glib_none().0,
|
stage.to_glib_none().0,
|
||||||
|
@ -151,7 +151,7 @@ impl GLShader {
|
||||||
#[doc(alias = "gst_gl_shader_link")]
|
#[doc(alias = "gst_gl_shader_link")]
|
||||||
pub fn link(&self) -> Result<(), glib::Error> {
|
pub fn link(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error);
|
||||||
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
@ -442,7 +442,7 @@ impl GLShader {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::linked\0".as_ptr() as *const _,
|
b"notify::linked\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_linked_trampoline::<F> as *const (),
|
notify_linked_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::GLContext;
|
use crate::GLContext;
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLUpload")]
|
#[doc(alias = "GstGLUpload")]
|
||||||
|
@ -27,8 +26,8 @@ impl GLUpload {
|
||||||
#[doc(alias = "get_caps")]
|
#[doc(alias = "get_caps")]
|
||||||
pub fn caps(&self) -> (gst::Caps, gst::Caps) {
|
pub fn caps(&self) -> (gst::Caps, gst::Caps) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut in_caps = ptr::null_mut();
|
let mut in_caps = std::ptr::null_mut();
|
||||||
let mut out_caps = ptr::null_mut();
|
let mut out_caps = std::ptr::null_mut();
|
||||||
ffi::gst_gl_upload_get_caps(self.to_glib_none().0, &mut in_caps, &mut out_caps);
|
ffi::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))
|
(from_glib_full(in_caps), from_glib_full(out_caps))
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLViewConvert")]
|
#[doc(alias = "GstGLViewConvert")]
|
||||||
|
@ -159,7 +159,7 @@ impl GLViewConvert {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::downmix-mode\0".as_ptr() as *const _,
|
b"notify::downmix-mode\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_downmix_mode_trampoline::<F> as *const (),
|
notify_downmix_mode_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -187,7 +187,7 @@ impl GLViewConvert {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::input-flags-override\0".as_ptr() as *const _,
|
b"notify::input-flags-override\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_input_flags_override_trampoline::<F> as *const (),
|
notify_input_flags_override_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -215,7 +215,7 @@ impl GLViewConvert {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::input-mode-override\0".as_ptr() as *const _,
|
b"notify::input-mode-override\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_input_mode_override_trampoline::<F> as *const (),
|
notify_input_mode_override_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -243,7 +243,7 @@ impl GLViewConvert {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::output-flags-override\0".as_ptr() as *const _,
|
b"notify::output-flags-override\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_output_flags_override_trampoline::<F> as *const (),
|
notify_output_flags_override_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -271,7 +271,7 @@ impl GLViewConvert {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"notify::output-mode-override\0".as_ptr() as *const _,
|
b"notify::output-mode-override\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
notify_output_mode_override_trampoline::<F> as *const (),
|
notify_output_mode_override_trampoline::<F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -9,7 +9,7 @@ use glib::{
|
||||||
signal::{connect_raw, SignalHandlerId},
|
signal::{connect_raw, SignalHandlerId},
|
||||||
translate::*,
|
translate::*,
|
||||||
};
|
};
|
||||||
use std::{boxed::Box as Box_, mem, mem::transmute};
|
use std::boxed::Box as Box_;
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLWindow")]
|
#[doc(alias = "GstGLWindow")]
|
||||||
|
@ -71,8 +71,8 @@ pub trait GLWindowExt: IsA<GLWindow> + sealed::Sealed + 'static {
|
||||||
#[doc(alias = "get_surface_dimensions")]
|
#[doc(alias = "get_surface_dimensions")]
|
||||||
fn surface_dimensions(&self) -> (u32, u32) {
|
fn surface_dimensions(&self) -> (u32, u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut width = mem::MaybeUninit::uninit();
|
let mut width = std::mem::MaybeUninit::uninit();
|
||||||
let mut height = mem::MaybeUninit::uninit();
|
let mut height = std::mem::MaybeUninit::uninit();
|
||||||
ffi::gst_gl_window_get_surface_dimensions(
|
ffi::gst_gl_window_get_surface_dimensions(
|
||||||
self.as_ref().to_glib_none().0,
|
self.as_ref().to_glib_none().0,
|
||||||
width.as_mut_ptr(),
|
width.as_mut_ptr(),
|
||||||
|
@ -232,7 +232,7 @@ pub trait GLWindowExt: IsA<GLWindow> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"key-event\0".as_ptr() as *const _,
|
b"key-event\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
key_event_trampoline::<Self, F> as *const (),
|
key_event_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -270,7 +270,7 @@ pub trait GLWindowExt: IsA<GLWindow> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"mouse-event\0".as_ptr() as *const _,
|
b"mouse-event\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
mouse_event_trampoline::<Self, F> as *const (),
|
mouse_event_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -310,7 +310,7 @@ pub trait GLWindowExt: IsA<GLWindow> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"scroll-event\0".as_ptr() as *const _,
|
b"scroll-event\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
scroll_event_trampoline::<Self, F> as *const (),
|
scroll_event_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
@ -340,7 +340,7 @@ pub trait GLWindowExt: IsA<GLWindow> + sealed::Sealed + 'static {
|
||||||
connect_raw(
|
connect_raw(
|
||||||
self.as_ptr() as *mut _,
|
self.as_ptr() as *mut _,
|
||||||
b"window-handle-changed\0".as_ptr() as *const _,
|
b"window-handle-changed\0".as_ptr() as *const _,
|
||||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
Some(std::mem::transmute::<_, unsafe extern "C" fn()>(
|
||||||
window_handle_changed_trampoline::<Self, F> as *const (),
|
window_handle_changed_trampoline::<Self, F> as *const (),
|
||||||
)),
|
)),
|
||||||
Box_::into_raw(f),
|
Box_::into_raw(f),
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
use crate::{GLContext, GLSLProfile, GLSLVersion};
|
use crate::{GLContext, GLSLProfile, GLSLVersion};
|
||||||
use glib::{prelude::*, translate::*};
|
use glib::{prelude::*, translate::*};
|
||||||
use std::ptr;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
#[doc(alias = "GstGLSLStage")]
|
#[doc(alias = "GstGLSLStage")]
|
||||||
|
@ -95,7 +94,7 @@ impl GLSLStage {
|
||||||
#[doc(alias = "gst_glsl_stage_compile")]
|
#[doc(alias = "gst_glsl_stage_compile")]
|
||||||
pub fn compile(&self) -> Result<(), glib::Error> {
|
pub fn compile(&self) -> Result<(), glib::Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut error = ptr::null_mut();
|
let mut error = std::ptr::null_mut();
|
||||||
let is_ok = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
let is_ok = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error);
|
||||||
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
|
||||||
if error.is_null() {
|
if error.is_null() {
|
||||||
|
|
|
@ -84,7 +84,7 @@ pub use self::flags::GLPlatform;
|
||||||
pub use self::flags::GLSLProfile;
|
pub use self::flags::GLSLProfile;
|
||||||
pub use self::flags::GLAPI;
|
pub use self::flags::GLAPI;
|
||||||
|
|
||||||
pub mod functions;
|
pub(crate) mod functions;
|
||||||
|
|
||||||
mod constants;
|
mod constants;
|
||||||
pub use self::constants::BUFFER_POOL_OPTION_GL_SYNC_META;
|
pub use self::constants::BUFFER_POOL_OPTION_GL_SYNC_META;
|
||||||
|
@ -116,8 +116,7 @@ pub use self::constants::GL_TEXTURE_TARGET_2D_STR;
|
||||||
pub use self::constants::GL_TEXTURE_TARGET_EXTERNAL_OES_STR;
|
pub use self::constants::GL_TEXTURE_TARGET_EXTERNAL_OES_STR;
|
||||||
pub use self::constants::GL_TEXTURE_TARGET_RECTANGLE_STR;
|
pub use self::constants::GL_TEXTURE_TARGET_RECTANGLE_STR;
|
||||||
|
|
||||||
#[doc(hidden)]
|
pub(crate) mod traits {
|
||||||
pub mod traits {
|
|
||||||
pub use super::gl_base_filter::GLBaseFilterExt;
|
pub use super::gl_base_filter::GLBaseFilterExt;
|
||||||
#[cfg(feature = "v1_18")]
|
#[cfg(feature = "v1_18")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue