Commit 24305a19 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Regenerate everything with latest gir

parent 2a6343a6
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ffi;
use glib::StaticType;
use glib::Type;
use glib::translate::*;
......@@ -10,7 +9,8 @@ use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use gobject_ffi;
use gobject_sys;
use gst_app_sys;
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Clone, Copy)]
......@@ -24,21 +24,21 @@ pub enum AppStreamType {
#[doc(hidden)]
impl ToGlib for AppStreamType {
type GlibType = ffi::GstAppStreamType;
type GlibType = gst_app_sys::GstAppStreamType;
fn to_glib(&self) -> ffi::GstAppStreamType {
fn to_glib(&self) -> gst_app_sys::GstAppStreamType {
match *self {
AppStreamType::Stream => ffi::GST_APP_STREAM_TYPE_STREAM,
AppStreamType::Seekable => ffi::GST_APP_STREAM_TYPE_SEEKABLE,
AppStreamType::RandomAccess => ffi::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
AppStreamType::Stream => gst_app_sys::GST_APP_STREAM_TYPE_STREAM,
AppStreamType::Seekable => gst_app_sys::GST_APP_STREAM_TYPE_SEEKABLE,
AppStreamType::RandomAccess => gst_app_sys::GST_APP_STREAM_TYPE_RANDOM_ACCESS,
AppStreamType::__Unknown(value) => value
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
fn from_glib(value: ffi::GstAppStreamType) -> Self {
impl FromGlib<gst_app_sys::GstAppStreamType> for AppStreamType {
fn from_glib(value: gst_app_sys::GstAppStreamType) -> Self {
skip_assert_initialized!();
match value {
0 => AppStreamType::Stream,
......@@ -51,7 +51,7 @@ impl FromGlib<ffi::GstAppStreamType> for AppStreamType {
impl StaticType for AppStreamType {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_app_stream_type_get_type()) }
unsafe { from_glib(gst_app_sys::gst_app_stream_type_get_type()) }
}
}
......@@ -63,13 +63,13 @@ impl<'a> FromValueOptional<'a> for AppStreamType {
impl<'a> FromValue<'a> for AppStreamType {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0))
from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
}
}
impl SetValue for AppStreamType {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
}
}
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -2,20 +2,20 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib::translate::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use gst;
use gst_audio_sys;
glib_wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct AudioStreamAlign(Boxed<ffi::GstAudioStreamAlign>);
pub struct AudioStreamAlign(Boxed<gst_audio_sys::GstAudioStreamAlign>);
match fn {
copy => |ptr| ffi::gst_audio_stream_align_copy(mut_override(ptr)),
free => |ptr| ffi::gst_audio_stream_align_free(ptr),
get_type => || ffi::gst_audio_stream_align_get_type(),
copy => |ptr| gst_audio_sys::gst_audio_stream_align_copy(mut_override(ptr)),
free => |ptr| gst_audio_sys::gst_audio_stream_align_free(ptr),
get_type => || gst_audio_sys::gst_audio_stream_align_get_type(),
}
}
......@@ -24,70 +24,70 @@ impl AudioStreamAlign {
pub fn new(rate: i32, alignment_threshold: gst::ClockTime, discont_wait: gst::ClockTime) -> AudioStreamAlign {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib()))
from_glib_full(gst_audio_sys::gst_audio_stream_align_new(rate, alignment_threshold.to_glib(), discont_wait.to_glib()))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_alignment_threshold(&mut self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0))
from_glib(gst_audio_sys::gst_audio_stream_align_get_alignment_threshold(self.to_glib_none_mut().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_discont_wait(&mut self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0))
from_glib(gst_audio_sys::gst_audio_stream_align_get_discont_wait(self.to_glib_none_mut().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_rate(&mut self) -> i32 {
unsafe {
ffi::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0)
gst_audio_sys::gst_audio_stream_align_get_rate(self.to_glib_none_mut().0)
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_samples_since_discont(&mut self) -> u64 {
unsafe {
ffi::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0)
gst_audio_sys::gst_audio_stream_align_get_samples_since_discont(self.to_glib_none_mut().0)
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn get_timestamp_at_discont(&mut self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0))
from_glib(gst_audio_sys::gst_audio_stream_align_get_timestamp_at_discont(self.to_glib_none_mut().0))
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn mark_discont(&mut self) {
unsafe {
ffi::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0);
gst_audio_sys::gst_audio_stream_align_mark_discont(self.to_glib_none_mut().0);
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn set_alignment_threshold(&mut self, alignment_threshold: gst::ClockTime) {
unsafe {
ffi::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib());
gst_audio_sys::gst_audio_stream_align_set_alignment_threshold(self.to_glib_none_mut().0, alignment_threshold.to_glib());
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn set_discont_wait(&mut self, discont_wait: gst::ClockTime) {
unsafe {
ffi::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib());
gst_audio_sys::gst_audio_stream_align_set_discont_wait(self.to_glib_none_mut().0, discont_wait.to_glib());
}
}
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn set_rate(&mut self, rate: i32) {
unsafe {
ffi::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate);
gst_audio_sys::gst_audio_stream_align_set_rate(self.to_glib_none_mut().0, rate);
}
}
}
......
This diff is collapsed.
......@@ -2,7 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ffi;
use glib::StaticType;
use glib::Type;
use glib::translate::*;
......@@ -10,7 +9,8 @@ use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use gobject_ffi;
use gobject_sys;
use gst_audio_sys;
bitflags! {
pub struct AudioFlags: u32 {
......@@ -21,16 +21,16 @@ bitflags! {
#[doc(hidden)]
impl ToGlib for AudioFlags {
type GlibType = ffi::GstAudioFlags;
type GlibType = gst_audio_sys::GstAudioFlags;
fn to_glib(&self) -> ffi::GstAudioFlags {
fn to_glib(&self) -> gst_audio_sys::GstAudioFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstAudioFlags> for AudioFlags {
fn from_glib(value: ffi::GstAudioFlags) -> AudioFlags {
impl FromGlib<gst_audio_sys::GstAudioFlags> for AudioFlags {
fn from_glib(value: gst_audio_sys::GstAudioFlags) -> AudioFlags {
skip_assert_initialized!();
AudioFlags::from_bits_truncate(value)
}
......@@ -38,7 +38,7 @@ impl FromGlib<ffi::GstAudioFlags> for AudioFlags {
impl StaticType for AudioFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_audio_flags_get_type()) }
unsafe { from_glib(gst_audio_sys::gst_audio_flags_get_type()) }
}
}
......@@ -50,13 +50,13 @@ impl<'a> FromValueOptional<'a> for AudioFlags {
impl<'a> FromValue<'a> for AudioFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for AudioFlags {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
......@@ -72,16 +72,16 @@ bitflags! {
#[doc(hidden)]
impl ToGlib for AudioFormatFlags {
type GlibType = ffi::GstAudioFormatFlags;
type GlibType = gst_audio_sys::GstAudioFormatFlags;
fn to_glib(&self) -> ffi::GstAudioFormatFlags {
fn to_glib(&self) -> gst_audio_sys::GstAudioFormatFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstAudioFormatFlags> for AudioFormatFlags {
fn from_glib(value: ffi::GstAudioFormatFlags) -> AudioFormatFlags {
impl FromGlib<gst_audio_sys::GstAudioFormatFlags> for AudioFormatFlags {
fn from_glib(value: gst_audio_sys::GstAudioFormatFlags) -> AudioFormatFlags {
skip_assert_initialized!();
AudioFormatFlags::from_bits_truncate(value)
}
......@@ -89,7 +89,7 @@ impl FromGlib<ffi::GstAudioFormatFlags> for AudioFormatFlags {
impl StaticType for AudioFormatFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) }
unsafe { from_glib(gst_audio_sys::gst_audio_format_flags_get_type()) }
}
}
......@@ -101,13 +101,13 @@ impl<'a> FromValueOptional<'a> for AudioFormatFlags {
impl<'a> FromValue<'a> for AudioFormatFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for AudioFormatFlags {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
......@@ -120,16 +120,16 @@ bitflags! {
#[doc(hidden)]
impl ToGlib for AudioPackFlags {
type GlibType = ffi::GstAudioPackFlags;
type GlibType = gst_audio_sys::GstAudioPackFlags;
fn to_glib(&self) -> ffi::GstAudioPackFlags {
fn to_glib(&self) -> gst_audio_sys::GstAudioPackFlags {
self.bits()
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstAudioPackFlags> for AudioPackFlags {
fn from_glib(value: ffi::GstAudioPackFlags) -> AudioPackFlags {
impl FromGlib<gst_audio_sys::GstAudioPackFlags> for AudioPackFlags {
fn from_glib(value: gst_audio_sys::GstAudioPackFlags) -> AudioPackFlags {
skip_assert_initialized!();
AudioPackFlags::from_bits_truncate(value)
}
......@@ -137,7 +137,7 @@ impl FromGlib<ffi::GstAudioPackFlags> for AudioPackFlags {
impl StaticType for AudioPackFlags {
fn static_type() -> Type {
unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) }
unsafe { from_glib(gst_audio_sys::gst_audio_pack_flags_get_type()) }
}
}
......@@ -149,13 +149,13 @@ impl<'a> FromValueOptional<'a> for AudioPackFlags {
impl<'a> FromValue<'a> for AudioPackFlags {
unsafe fn from_value(value: &Value) -> Self {
from_glib(gobject_ffi::g_value_get_flags(value.to_glib_none().0))
from_glib(gobject_sys::g_value_get_flags(value.to_glib_none().0))
}
}
impl SetValue for AudioPackFlags {
unsafe fn set_value(value: &mut Value, this: &Self) {
gobject_ffi::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
gobject_sys::g_value_set_flags(value.to_glib_none_mut().0, this.to_glib())
}
}
......@@ -3,21 +3,21 @@
// DO NOT EDIT
use StreamVolumeFormat;
use ffi;
use glib::object::Cast;
use glib::object::IsA;
use glib::signal::SignalHandlerId;
use glib::signal::connect_raw;
use glib::translate::*;
use glib_ffi;
use glib_sys;
use gst_audio_sys;
use std::boxed::Box as Box_;
use std::mem::transmute;
glib_wrapper! {
pub struct StreamVolume(Interface<ffi::GstStreamVolume>);
pub struct StreamVolume(Interface<gst_audio_sys::GstStreamVolume>);
match fn {
get_type => || ffi::gst_stream_volume_get_type(),
get_type => || gst_audio_sys::gst_stream_volume_get_type(),
}
}
......@@ -25,7 +25,7 @@ impl StreamVolume {
pub fn convert_volume(from: StreamVolumeFormat, to: StreamVolumeFormat, val: f64) -> f64 {
assert_initialized_main_thread!();
unsafe {
ffi::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val)
gst_audio_sys::gst_stream_volume_convert_volume(from.to_glib(), to.to_glib(), val)
}
}
}
......@@ -52,25 +52,25 @@ pub trait StreamVolumeExt: 'static {
impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
fn get_mute(&self) -> bool {
unsafe {
from_glib(ffi::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0))
from_glib(gst_audio_sys::gst_stream_volume_get_mute(self.as_ref().to_glib_none().0))
}
}
fn get_volume(&self, format: StreamVolumeFormat) -> f64 {
unsafe {
ffi::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib())
gst_audio_sys::gst_stream_volume_get_volume(self.as_ref().to_glib_none().0, format.to_glib())
}
}
fn set_mute(&self, mute: bool) {
unsafe {
ffi::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
gst_audio_sys::gst_stream_volume_set_mute(self.as_ref().to_glib_none().0, mute.to_glib());
}
}
fn set_volume(&self, format: StreamVolumeFormat, val: f64) {
unsafe {
ffi::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val);
gst_audio_sys::gst_stream_volume_set_volume(self.as_ref().to_glib_none().0, format.to_glib(), val);
}
}
......@@ -91,13 +91,13 @@ impl<O: IsA<StreamVolume>> StreamVolumeExt for O {
}
}
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_mute_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<StreamVolume> {
let f: &F = &*(f as *const F);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
}
unsafe extern "C" fn notify_volume_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut ffi::GstStreamVolume, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
unsafe extern "C" fn notify_volume_trampoline<P, F: Fn(&P) + Send + Sync + 'static>(this: *mut gst_audio_sys::GstStreamVolume, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer)
where P: IsA<StreamVolume> {
let f: &F = &*(f as *const F);
f(&StreamVolume::from_glib_borrow(this).unsafe_cast())
......
Generated by gir (https://github.com/gtk-rs/gir @ 48d40b3)
Generated by gir (https://github.com/gtk-rs/gir @ 58cffd4)
from gir-files (https://github.com/gtk-rs/gir-files @ ???)
......@@ -2,18 +2,18 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use ffi;
use glib;
use glib::ObjectExt;
use glib::translate::*;
use gst;
use gst_base_sys;
use std::mem;
glib_wrapper! {
pub struct Adapter(Object<ffi::GstAdapter, ffi::GstAdapterClass, AdapterClass>);
pub struct Adapter(Object<gst_base_sys::GstAdapter, gst_base_sys::GstAdapterClass, AdapterClass>);
match fn {
get_type => || ffi::gst_adapter_get_type(),
get_type => || gst_base_sys::gst_adapter_get_type(),
}
}
......@@ -21,87 +21,87 @@ impl Adapter {
pub fn new() -> Adapter {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gst_adapter_new())
from_glib_full(gst_base_sys::gst_adapter_new())
}
}
pub fn available(&self) -> usize {
unsafe {
ffi::gst_adapter_available(self.to_glib_none().0)
gst_base_sys::gst_adapter_available(self.to_glib_none().0)
}
}
pub fn available_fast(&self) -> usize {
unsafe {
ffi::gst_adapter_available_fast(self.to_glib_none().0)
gst_base_sys::gst_adapter_available_fast(self.to_glib_none().0)
}
}
pub fn clear(&self) {
unsafe {
ffi::gst_adapter_clear(self.to_glib_none().0);
gst_base_sys::gst_adapter_clear(self.to_glib_none().0);
}
}
pub fn copy_bytes(&self, offset: usize, size: usize) -> Option<glib::Bytes> {
unsafe {
from_glib_full(ffi::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size))
from_glib_full(gst_base_sys::gst_adapter_copy_bytes(self.to_glib_none().0, offset, size))
}
}
pub fn distance_from_discont(&self) -> u64 {
unsafe {
ffi::gst_adapter_distance_from_discont(self.to_glib_none().0)
gst_base_sys::gst_adapter_distance_from_discont(self.to_glib_none().0)
}
}
#[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn dts_at_discont(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_adapter_dts_at_discont(self.to_glib_none().0))
from_glib(gst_base_sys::gst_adapter_dts_at_discont(self.to_glib_none().0))
}
}
pub fn flush(&self, flush: usize) {
unsafe {
ffi::gst_adapter_flush(self.to_glib_none().0, flush);
gst_base_sys::gst_adapter_flush(self.to_glib_none().0, flush);
}
}
pub fn get_buffer(&self, nbytes: usize) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_adapter_get_buffer(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_get_buffer(self.to_glib_none().0, nbytes))
}
}
pub fn get_buffer_fast(&self, nbytes: usize) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_get_buffer_fast(self.to_glib_none().0, nbytes))
}
}
pub fn get_buffer_list(&self, nbytes: usize) -> Option<gst::BufferList> {
unsafe {
from_glib_full(ffi::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_get_buffer_list(self.to_glib_none().0, nbytes))
}
}
pub fn get_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_get_list(self.to_glib_none().0, nbytes))
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_get_list(self.to_glib_none().0, nbytes))
}
}
pub fn masked_scan_uint32(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> isize {
unsafe {
ffi::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size)
gst_base_sys::gst_adapter_masked_scan_uint32(self.to_glib_none().0, mask, pattern, offset, size)
}
}
pub fn masked_scan_uint32_peek(&self, mask: u32, pattern: u32, offset: usize, size: usize) -> (isize, u32) {
unsafe {
let mut value = mem::uninitialized();
let ret = ffi::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value);
let ret = gst_base_sys::gst_adapter_masked_scan_uint32_peek(self.to_glib_none().0, mask, pattern, offset, size, &mut value);
(ret, value)
}
}
......@@ -109,14 +109,14 @@ impl Adapter {
#[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn offset_at_discont(&self) -> u64 {
unsafe {
ffi::gst_adapter_offset_at_discont(self.to_glib_none().0)
gst_base_sys::gst_adapter_offset_at_discont(self.to_glib_none().0)
}
}
pub fn prev_dts(&self) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::uninitialized();
let ret = from_glib(ffi::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance));
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts(self.to_glib_none().0, &mut distance));
(ret, distance)
}
}
......@@ -124,7 +124,7 @@ impl Adapter {
pub fn prev_dts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::uninitialized();
let ret = from_glib(ffi::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance));
let ret = from_glib(gst_base_sys::gst_adapter_prev_dts_at_offset(self.to_glib_none().0, offset, &mut distance));
(ret, distance)
}
}
......@@ -133,7 +133,7 @@ impl Adapter {
pub fn prev_offset(&self) -> (u64, u64) {
unsafe {
let mut distance = mem::uninitialized();
let ret = ffi::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance);
let ret = gst_base_sys::gst_adapter_prev_offset(self.to_glib_none().0, &mut distance);
(ret, distance)
}
}
......@@ -141,7 +141,7 @@ impl Adapter {
pub fn prev_pts(&self) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::uninitialized();
let ret = from_glib(ffi::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance));
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts(self.to_glib_none().0, &mut distance));
(ret, distance)
}
}
......@@ -149,7 +149,7 @@ impl Adapter {
pub fn prev_pts_at_offset(&self, offset: usize) -> (gst::ClockTime, u64) {
unsafe {
let mut distance = mem::uninitialized();
let ret = from_glib(ffi::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance));
let ret = from_glib(gst_base_sys::gst_adapter_prev_pts_at_offset(self.to_glib_none().0, offset, &mut distance));
(ret, distance)
}
}
......@@ -157,31 +157,31 @@ impl Adapter {
#[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn pts_at_discont(&self) -> gst::ClockTime {
unsafe {
from_glib(ffi::gst_adapter_pts_at_discont(self.to_glib_none().0))
from_glib(gst_base_sys::gst_adapter_pts_at_discont(self.to_glib_none().0))
}
}
pub fn take_buffer(&self, nbytes: usize) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_adapter_take_buffer(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_take_buffer(self.to_glib_none().0, nbytes))
}
}
pub fn take_buffer_fast(&self, nbytes: usize) -> Option<gst::Buffer> {
unsafe {
from_glib_full(ffi::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_take_buffer_fast(self.to_glib_none().0, nbytes))
}
}
pub fn take_buffer_list(&self, nbytes: usize) -> Option<gst::BufferList> {
unsafe {
from_glib_full(ffi::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes))
from_glib_full(gst_base_sys::gst_adapter_take_buffer_list(self.to_glib_none().0, nbytes))
}
}
pub fn take_list(&self, nbytes: usize) -> Vec<gst::Buffer> {
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_adapter_take_list(self.to_glib_none().0, nbytes))
FromGlibPtrContainer::from_glib_full(gst_base_sys::gst_adapter_take_list(self.to_glib_none().0, nbytes))
}
}
}
......