Commit e7898c1b authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Update manual code

parent 24305a19
......@@ -14,7 +14,7 @@ extern crate failure_derive;
extern crate gstreamer as gst;
extern crate gstreamer_rtsp as gst_rtsp;
extern crate gstreamer_rtsp_server as gst_rtsp_server;
extern crate gstreamer_rtsp_server_sys as ffi;
extern crate gstreamer_rtsp_server_sys as gst_rtsp_server_sys;
use failure::Error;
use std::env;
......@@ -93,7 +93,7 @@ fn main_loop() -> Result<(), Error> {
// This declares that the user "user" (once authenticated) has a role that
// allows them to access and construct media factories.
unsafe {
ffi::gst_rtsp_media_factory_add_role(
gst_rtsp_server_sys::gst_rtsp_media_factory_add_role(
factory.to_glib_none().0,
"user".to_glib_none().0,
RTSP_PERM_MEDIA_FACTORY_ACCESS.to_glib_none().0,
......
......@@ -6,14 +6,14 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use glib::object::ObjectType;
use glib::signal::connect_raw;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib_ffi::gpointer;
use glib_sys::gpointer;
use gst;
use gst_ffi;
use gst_app_sys;
use gst_sys;
use std::boxed::Box as Box_;
use std::cell::RefCell;
use std::mem::transmute;
......@@ -29,7 +29,7 @@ pub struct AppSinkCallbacks {
new_sample: Option<
RefCell<Box<FnMut(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + 'static>>,
>,
callbacks: ffi::GstAppSinkCallbacks,
callbacks: gst_app_sys::GstAppSinkCallbacks,
}
unsafe impl Send for AppSinkCallbacks {}
......@@ -99,7 +99,7 @@ impl AppSinkCallbacksBuilder {
eos: self.eos,
new_preroll: self.new_preroll,
new_sample: self.new_sample,
callbacks: ffi::GstAppSinkCallbacks {
callbacks: gst_app_sys::GstAppSinkCallbacks {
eos: if have_eos { Some(trampoline_eos) } else { None },
new_preroll: if have_new_preroll {
Some(trampoline_new_preroll)
......@@ -122,7 +122,7 @@ impl AppSinkCallbacksBuilder {
}
}
unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gpointer) {
unsafe extern "C" fn trampoline_eos(appsink: *mut gst_app_sys::GstAppSink, callbacks: gpointer) {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
if let Some(ref eos) = callbacks.eos {
......@@ -131,9 +131,9 @@ unsafe extern "C" fn trampoline_eos(appsink: *mut ffi::GstAppSink, callbacks: gp
}
unsafe extern "C" fn trampoline_new_preroll(
appsink: *mut ffi::GstAppSink,
appsink: *mut gst_app_sys::GstAppSink,
callbacks: gpointer,
) -> gst_ffi::GstFlowReturn {
) -> gst_sys::GstFlowReturn {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
let ret = if let Some(ref new_preroll) = callbacks.new_preroll {
......@@ -146,9 +146,9 @@ unsafe extern "C" fn trampoline_new_preroll(
}
unsafe extern "C" fn trampoline_new_sample(
appsink: *mut ffi::GstAppSink,
appsink: *mut gst_app_sys::GstAppSink,
callbacks: gpointer,
) -> gst_ffi::GstFlowReturn {
) -> gst_sys::GstFlowReturn {
let callbacks = &*(callbacks as *const AppSinkCallbacks);
let ret = if let Some(ref new_sample) = callbacks.new_sample {
......@@ -167,7 +167,7 @@ unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
impl AppSink {
pub fn set_callbacks(&self, callbacks: AppSinkCallbacks) {
unsafe {
ffi::gst_app_sink_set_callbacks(
gst_app_sys::gst_app_sink_set_callbacks(
self.to_glib_none().0,
mut_override(&callbacks.callbacks),
Box::into_raw(Box::new(callbacks)) as *mut _,
......@@ -214,9 +214,9 @@ impl AppSink {
unsafe extern "C" fn new_sample_trampoline<
F: Fn(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + Sync + 'static,
>(
this: *mut ffi::GstAppSink,
f: glib_ffi::gpointer,
) -> gst_ffi::GstFlowReturn {
this: *mut gst_app_sys::GstAppSink,
f: glib_sys::gpointer,
) -> gst_sys::GstFlowReturn {
let f: &F = &*(f as *const F);
let ret: gst::FlowReturn = f(&from_glib_borrow(this)).into();
ret.to_glib()
......@@ -225,9 +225,9 @@ unsafe extern "C" fn new_sample_trampoline<
unsafe extern "C" fn new_preroll_trampoline<
F: Fn(&AppSink) -> Result<gst::FlowSuccess, gst::FlowError> + Send + Sync + 'static,
>(
this: *mut ffi::GstAppSink,
f: glib_ffi::gpointer,
) -> gst_ffi::GstFlowReturn {
this: *mut gst_app_sys::GstAppSink,
f: glib_sys::gpointer,
) -> gst_sys::GstFlowReturn {
let f: &F = &*(f as *const F);
let ret: gst::FlowReturn = f(&from_glib_borrow(this)).into();
ret.to_glib()
......
......@@ -6,10 +6,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use glib::translate::*;
use glib_ffi::{gboolean, gpointer};
use glib_sys::{gboolean, gpointer};
use gst;
use gst_app_sys;
use std::cell::RefCell;
use std::mem;
use std::ptr;
......@@ -20,7 +20,7 @@ pub struct AppSrcCallbacks {
need_data: Option<RefCell<Box<FnMut(&AppSrc, u32) + Send + 'static>>>,
enough_data: Option<Box<Fn(&AppSrc) + Send + Sync + 'static>>,
seek_data: Option<Box<Fn(&AppSrc, u64) -> bool + Send + Sync + 'static>>,
callbacks: ffi::GstAppSrcCallbacks,
callbacks: gst_app_sys::GstAppSrcCallbacks,
}
unsafe impl Send for AppSrcCallbacks {}
......@@ -80,7 +80,7 @@ impl AppSrcCallbacksBuilder {
need_data: self.need_data,
enough_data: self.enough_data,
seek_data: self.seek_data,
callbacks: ffi::GstAppSrcCallbacks {
callbacks: gst_app_sys::GstAppSrcCallbacks {
need_data: if have_need_data {
Some(trampoline_need_data)
} else {
......@@ -108,7 +108,7 @@ impl AppSrcCallbacksBuilder {
}
unsafe extern "C" fn trampoline_need_data(
appsrc: *mut ffi::GstAppSrc,
appsrc: *mut gst_app_sys::GstAppSrc,
length: u32,
callbacks: gpointer,
) {
......@@ -119,7 +119,10 @@ unsafe extern "C" fn trampoline_need_data(
}
}
unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbacks: gpointer) {
unsafe extern "C" fn trampoline_enough_data(
appsrc: *mut gst_app_sys::GstAppSrc,
callbacks: gpointer,
) {
let callbacks = &*(callbacks as *const AppSrcCallbacks);
if let Some(ref enough_data) = callbacks.enough_data {
......@@ -128,7 +131,7 @@ unsafe extern "C" fn trampoline_enough_data(appsrc: *mut ffi::GstAppSrc, callbac
}
unsafe extern "C" fn trampoline_seek_data(
appsrc: *mut ffi::GstAppSrc,
appsrc: *mut gst_app_sys::GstAppSrc,
offset: u64,
callbacks: gpointer,
) -> gboolean {
......@@ -149,14 +152,17 @@ unsafe extern "C" fn destroy_callbacks(ptr: gpointer) {
impl AppSrc {
pub fn end_of_stream(&self) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn =
unsafe { from_glib(ffi::gst_app_src_end_of_stream(self.to_glib_none().0)) };
let ret: gst::FlowReturn = unsafe {
from_glib(gst_app_sys::gst_app_src_end_of_stream(
self.to_glib_none().0,
))
};
ret.into_result()
}
pub fn push_buffer(&self, buffer: gst::Buffer) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe {
from_glib(ffi::gst_app_src_push_buffer(
from_glib(gst_app_sys::gst_app_src_push_buffer(
self.to_glib_none().0,
buffer.into_ptr(),
))
......@@ -170,7 +176,7 @@ impl AppSrc {
list: gst::BufferList,
) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe {
from_glib(ffi::gst_app_src_push_buffer_list(
from_glib(gst_app_sys::gst_app_src_push_buffer_list(
self.to_glib_none().0,
list.into_ptr(),
))
......@@ -180,7 +186,7 @@ impl AppSrc {
pub fn push_sample(&self, sample: &gst::Sample) -> Result<gst::FlowSuccess, gst::FlowError> {
let ret: gst::FlowReturn = unsafe {
from_glib(ffi::gst_app_src_push_sample(
from_glib(gst_app_sys::gst_app_src_push_sample(
self.to_glib_none().0,
sample.to_glib_none().0,
))
......@@ -190,7 +196,7 @@ impl AppSrc {
pub fn set_callbacks(&self, callbacks: AppSrcCallbacks) {
unsafe {
ffi::gst_app_src_set_callbacks(
gst_app_sys::gst_app_src_set_callbacks(
self.to_glib_none().0,
mut_override(&callbacks.callbacks),
Box::into_raw(Box::new(callbacks)) as *mut _,
......@@ -201,7 +207,11 @@ impl AppSrc {
pub fn set_latency(&self, min: gst::ClockTime, max: gst::ClockTime) {
unsafe {
ffi::gst_app_src_set_latency(self.to_glib_none().0, min.to_glib(), max.to_glib());
gst_app_sys::gst_app_src_set_latency(
self.to_glib_none().0,
min.to_glib(),
max.to_glib(),
);
}
}
......@@ -209,7 +219,7 @@ impl AppSrc {
unsafe {
let mut min = mem::uninitialized();
let mut max = mem::uninitialized();
ffi::gst_app_src_get_latency(self.to_glib_none().0, &mut min, &mut max);
gst_app_sys::gst_app_src_get_latency(self.to_glib_none().0, &mut min, &mut max);
(from_glib(min), from_glib(max))
}
}
......
......@@ -2,6 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ffi;
use gst_app_sys;
use glib::translate::*;
......@@ -8,13 +8,13 @@
extern crate libc;
extern crate glib_sys as glib_ffi;
extern crate gobject_sys as gobject_ffi;
extern crate glib_sys;
extern crate gobject_sys;
extern crate gstreamer as gst;
extern crate gstreamer_app_sys as ffi;
extern crate gstreamer_app_sys as gst_app_sys;
extern crate gstreamer_base as gst_base;
extern crate gstreamer_base_sys as gst_base_ffi;
extern crate gstreamer_sys as gst_ffi;
extern crate gstreamer_base_sys as gst_base_sys;
extern crate gstreamer_sys as gst_sys;
#[macro_use]
extern crate glib;
......
......@@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use gst_audio_sys;
use AudioChannelPosition;
use std::mem;
......@@ -25,7 +25,7 @@ impl AudioChannelPosition {
return 0;
}
unsafe {
let val = mem::transmute::<ffi::GstAudioChannelPosition, u32>(pos);
let val = mem::transmute::<gst_audio_sys::GstAudioChannelPosition, u32>(pos);
1 << val
}
}
......@@ -38,17 +38,18 @@ impl AudioChannelPosition {
return None;
}
let positions_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
positions[i].to_glib()
}
});
let positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] =
array_init::array_init_copy(|i| {
if i >= len as usize {
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
positions[i].to_glib()
}
});
unsafe {
let mut mask = mem::uninitialized();
let valid: bool = from_glib(ffi::gst_audio_channel_positions_to_mask(
let valid: bool = from_glib(gst_audio_sys::gst_audio_channel_positions_to_mask(
positions_raw.as_ptr() as *mut _,
len as i32,
force_order.to_glib(),
......@@ -73,10 +74,10 @@ impl AudioChannelPosition {
}
let len = positions.len();
let mut positions_raw: [ffi::GstAudioChannelPosition; 64] =
[ffi::GST_AUDIO_CHANNEL_POSITION_INVALID; 64];
let mut positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] =
[gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID; 64];
let valid: bool = unsafe {
from_glib(ffi::gst_audio_channel_positions_from_mask(
from_glib(gst_audio_sys::gst_audio_channel_positions_from_mask(
len as i32,
mask,
positions_raw.as_mut_ptr(),
......@@ -105,17 +106,17 @@ impl AudioChannelPosition {
}
let len = positions.len();
let mut positions_raw: [ffi::GstAudioChannelPosition; 64] =
let mut positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] =
array_init::array_init_copy(|i| {
if i >= len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
positions[i].to_glib()
}
});
let valid: bool = unsafe {
from_glib(ffi::gst_audio_channel_positions_to_valid_order(
from_glib(gst_audio_sys::gst_audio_channel_positions_to_valid_order(
positions_raw.as_mut_ptr(),
len as i32,
))
......@@ -136,7 +137,7 @@ impl AudioChannelPosition {
pub fn get_fallback_mask(channels: u32) -> u64 {
assert_initialized_main_thread!();
unsafe { ffi::gst_audio_channel_get_fallback_mask(channels as i32) }
unsafe { gst_audio_sys::gst_audio_channel_get_fallback_mask(channels as i32) }
}
pub fn check_valid_channel_positions(
......@@ -150,16 +151,17 @@ impl AudioChannelPosition {
}
let len = positions.len();
let positions_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
positions[i].to_glib()
}
});
let positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] =
array_init::array_init_copy(|i| {
if i >= len as usize {
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
positions[i].to_glib()
}
});
unsafe {
from_glib(ffi::gst_audio_check_valid_channel_positions(
from_glib(gst_audio_sys::gst_audio_check_valid_channel_positions(
positions_raw.as_ptr() as *mut _,
len as i32,
force_order.to_glib(),
......@@ -184,24 +186,24 @@ pub fn buffer_reorder_channels(
let from_len = from.len();
let to_len = to.len();
let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= from_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
from[i].to_glib()
}
});
let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= to_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
to[i].to_glib()
}
});
let valid: bool = unsafe {
from_glib(ffi::gst_audio_buffer_reorder_channels(
from_glib(gst_audio_sys::gst_audio_buffer_reorder_channels(
buffer.as_mut_ptr(),
format.to_glib(),
channels as i32,
......@@ -233,24 +235,24 @@ pub fn reorder_channels(
let from_len = from.len();
let to_len = to.len();
let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= from_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
from[i].to_glib()
}
});
let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= to_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
to[i].to_glib()
}
});
let valid: bool = unsafe {
from_glib(ffi::gst_audio_reorder_channels(
from_glib(gst_audio_sys::gst_audio_reorder_channels(
data.as_mut_ptr() as *mut _,
data.len(),
format.to_glib(),
......@@ -281,17 +283,17 @@ pub fn get_channel_reorder_map(
let from_len = from.len();
let to_len = to.len();
let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= from_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
from[i].to_glib()
}
});
let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| {
if i >= to_len as usize {
ffi::GST_AUDIO_CHANNEL_POSITION_INVALID
gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID
} else {
to[i].to_glib()
}
......@@ -299,7 +301,7 @@ pub fn get_channel_reorder_map(
let mut reorder_map_raw = [0i32, 64];
let valid: bool = unsafe {
from_glib(ffi::gst_audio_get_channel_reorder_map(
from_glib(gst_audio_sys::gst_audio_get_channel_reorder_map(
from_len as i32,
from_raw.as_ptr() as *mut _,
to_raw.as_ptr() as *mut _,
......
......@@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use gst_audio_sys;
use std::ffi::CStr;
use std::fmt;
......@@ -24,7 +24,7 @@ impl ::AudioFormat {
assert_initialized_main_thread!();
unsafe {
from_glib(ffi::gst_audio_format_build_integer(
from_glib(gst_audio_sys::gst_audio_format_build_integer(
sign.to_glib(),
endianness.to_glib(),
width,
......@@ -36,7 +36,11 @@ impl ::AudioFormat {
pub fn from_string(s: &str) -> ::AudioFormat {
assert_initialized_main_thread!();
unsafe { from_glib(ffi::gst_audio_format_from_string(s.to_glib_none().0)) }
unsafe {
from_glib(gst_audio_sys::gst_audio_format_from_string(
s.to_glib_none().0,
))
}
}
pub fn to_string<'a>(self) -> &'a str {
......@@ -45,7 +49,7 @@ impl ::AudioFormat {
}
unsafe {
CStr::from_ptr(ffi::gst_audio_format_to_string(self.to_glib()))
CStr::from_ptr(gst_audio_sys::gst_audio_format_to_string(self.to_glib()))
.to_str()
.unwrap()
}
......
......@@ -6,9 +6,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use glib_ffi;
use gobject_ffi;
use glib_sys;
use gobject_sys;
use gst_audio_sys;
use std::ffi::CStr;
use std::fmt;
......@@ -48,14 +48,14 @@ impl ToGlib for AudioEndianness {
}
}
pub struct AudioFormatInfo(&'static ffi::GstAudioFormatInfo);
pub struct AudioFormatInfo(&'static gst_audio_sys::GstAudioFormatInfo);
impl AudioFormatInfo {
pub fn from_format(format: ::AudioFormat) -> AudioFormatInfo {
assert_initialized_main_thread!();
unsafe {
let info = ffi::gst_audio_format_get_info(format.to_glib());
let info = gst_audio_sys::gst_audio_format_get_info(format.to_glib());
assert!(!info.is_null());
AudioFormatInfo(&*info)
......@@ -178,7 +178,11 @@ impl AudioFormatInfo {
}
unsafe {
ffi::gst_audio_format_fill_silence(self.0, dest.as_mut_ptr() as *mut _, dest.len())
gst_audio_sys::gst_audio_format_fill_silence(
self.0,
dest.as_mut_ptr() as *mut _,
dest.len(),
)
}
}
......@@ -245,26 +249,29 @@ impl From<::AudioFormat> for AudioFormatInfo {
impl glib::types::StaticType for AudioFormatInfo {
fn static_type() -> glib::types::Type {
unsafe { glib::translate::from_glib(ffi::gst_audio_format_info_get_type()) }
unsafe { glib::translate::from_glib(gst_audio_sys::gst_audio_format_info_get_type()) }
}
}
#[doc(hidden)]
impl<'a> glib::value::FromValueOptional<'a> for AudioFormatInfo {
unsafe fn from_value_optional(value: &glib::Value) -> Option<Self> {
Option::<AudioFormatInfo>::from_glib_none(gobject_ffi::g_value_get_boxed(
Option::<AudioFormatInfo>::from_glib_none(gobject_sys::g_value_get_boxed(
value.to_glib_none().0,
) as *mut ffi::GstAudioFormatInfo)
)
as *mut gst_audio_sys::GstAudioFormatInfo)
}
}
#[doc(hidden)]
impl glib::value::SetValue for AudioFormatInfo {
unsafe fn set_value(value: &mut glib::Value, this: &Self) {
gobject_ffi::g_value_set_boxed(
gobject_sys::g_value_set_boxed(
value.to_glib_none_mut().0,
glib::translate::ToGlibPtr::<*const ffi::GstAudioFormatInfo>::to_glib_none(this).0
as glib_ffi::gpointer,
glib::translate::ToGlibPtr::<*const gst_audio_sys::GstAudioFormatInfo>::to_glib_none(
this,
)
.0 as glib_sys::gpointer,
)
}
}
......@@ -272,36 +279,42 @@ impl glib::value::SetValue for AudioFormatInfo {
#[doc(hidden)]
impl glib::value::SetValueOptional for AudioFormatInfo {
unsafe fn set_value_optional(value: &mut glib::Value, this: Option<&Self>) {
gobject_ffi::g_value_set_boxed(
gobject_sys::g_value_set_boxed(
value.to_glib_none_mut().0,
glib::translate::ToGlibPtr::<*const ffi::GstAudioFormatInfo>::to_glib_none(&this).0
as glib_ffi::gpointer,
glib::translate::ToGlibPtr::<*const gst_audio_sys::GstAudioFormatInfo>::to_glib_none(
&this,
)
.0 as glib_sys::gpointer,
)
}
}
#[doc(hidden)]
impl glib::translate::GlibPtrDefault for AudioFormatInfo {
type GlibType = *mut ffi::GstAudioFormatInfo;
type GlibType = *mut gst_audio_sys::GstAudioFormatInfo;
}
#[doc(hidden)]
impl<'a> glib::translate::ToGlibPtr<'a, *const ffi::GstAudioFormatInfo> for AudioFormatInfo {
impl<'a> glib::translate::ToGlibPtr<'a, *const gst_audio_sys::GstAudioFormatInfo>
for AudioFormatInfo
{
type Storage = &'a AudioFormatInfo;
fn to_glib_none(&'a self) -> glib::translate::Stash<'a, *const ffi::GstAudioFormatInfo, Self> {
fn to_glib_none(
&'a self,
) -> glib::translate::Stash<'a, *const gst_audio_sys::GstAudioFormatInfo, Self> {
glib::translate::Stash(self.0, self)
}
fn to_glib_full(&self) -> *const ffi::GstAudioFormatInfo {
fn to_glib_full(&self) -> *const gst_audio_sys::GstAudioFormatInfo {
unimplemented!()
}
}
#[doc(hidden)]
impl glib::translate::FromGlibPtrNone<*mut ffi::GstAudioFormatInfo> for AudioFormatInfo {
impl glib::translate::FromGlibPtrNone<*mut gst_audio_sys::GstAudioFormatInfo> for AudioFormatInfo {
#[inline]
unsafe fn from_glib_none(ptr: *mut ffi::GstAudioFormatInfo) -> Self {
unsafe fn from_glib_none(ptr: *mut gst_audio_sys::GstAudioFormatInfo) -> Self {
AudioFormatInfo(&*ptr)
}
}
......
......@@ -6,9 +6,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.