Fix build

This commit is contained in:
Sebastian Dröge 2018-03-15 10:46:49 +02:00
parent 7f479b0e14
commit 4864a1e089
12 changed files with 55 additions and 12 deletions

View file

@ -644,6 +644,10 @@ status = "generate"
name = "Gst.PadTemplate" name = "Gst.PadTemplate"
status = "generate" status = "generate"
trait = false trait = false
[[object.function]]
name = "new_from_static_pad_template_with_gtype"
# static pad template manual
ignore = true
[[object]] [[object]]
name = "Gst.GhostPad" name = "Gst.GhostPad"
@ -1054,6 +1058,11 @@ status = "generate"
# newtype wrapper # newtype wrapper
ignore = true ignore = true
[[object.function]]
name = "protection_filter_systems_by_available_decryptors"
# wrong array annotations
ignore = true
[[object.function]] [[object.function]]
name = "debug_bin_to_dot_data" name = "debug_bin_to_dot_data"
[object.function.return] [object.function.return]

View file

@ -75,7 +75,7 @@ impl<'a> AudioInfoBuilder<'a> {
self.format.to_glib(), self.format.to_glib(),
self.rate as i32, self.rate as i32,
self.channels as i32, self.channels as i32,
positions_ptr, positions_ptr as *mut _,
); );
if info.finfo.is_null() || info.rate <= 0 || info.channels <= 0 { if info.finfo.is_null() || info.rate <= 0 || info.channels <= 0 {

View file

@ -7,9 +7,12 @@
// except according to those terms. // except according to those terms.
use ffi; use ffi;
use AudioStreamAlign; use AudioStreamAlign;
use gst;
use glib::translate::*;
use std::mem;
impl AudioStreamAlign { impl AudioStreamAlign {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn process(&mut self, discont: bool, timestamp: gst::ClockTime, n_samples: u32) -> (bool, gst::ClockTime, gst::ClockTime, u64) { pub fn process(&mut self, discont: bool, timestamp: gst::ClockTime, n_samples: u32) -> (bool, gst::ClockTime, gst::ClockTime, u64) {
@ -18,7 +21,7 @@ impl AudioStreamAlign {
let mut out_duration = mem::uninitialized(); let mut out_duration = mem::uninitialized();
let mut out_sample_position = mem::uninitialized(); let mut out_sample_position = mem::uninitialized();
let ret = from_glib(ffi::gst_audio_stream_align_process(self.to_glib_none_mut().0, discont.to_glib(), timestamp.to_glib(), n_samples, &mut out_timestamp, &mut out_duration, &mut out_sample_position)); let ret = from_glib(ffi::gst_audio_stream_align_process(self.to_glib_none_mut().0, discont.to_glib(), timestamp.to_glib(), n_samples, &mut out_timestamp, &mut out_duration, &mut out_sample_position));
(from_glib(ret), from_glib(out_timestamp), from_glib(out_duration), out_sample_position)) (ret, from_glib(out_timestamp), from_glib(out_duration), out_sample_position)
} }
} }
} }

View file

@ -54,6 +54,7 @@ mod audio_info;
pub use audio_info::*; pub use audio_info::*;
mod audio_channel_position; mod audio_channel_position;
pub use audio_channel_position::*; pub use audio_channel_position::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
mod audio_stream_align; mod audio_stream_align;
use glib::translate::{from_glib_full, ToGlibPtr}; use glib::translate::{from_glib_full, ToGlibPtr};

View file

@ -10,6 +10,7 @@ use ffi;
use NetClientClock; use NetClientClock;
use gst; use gst;
use glib::object::Downcast;
use glib::translate::*; use glib::translate::*;
impl NetClientClock { impl NetClientClock {

View file

@ -10,6 +10,7 @@ use ffi;
use NtpClock; use NtpClock;
use gst; use gst;
use glib::object::Downcast;
use glib::translate::*; use glib::translate::*;
impl NtpClock { impl NtpClock {

View file

@ -10,6 +10,7 @@ use ffi;
use PtpClock; use PtpClock;
use gst; use gst;
use glib::object::Downcast;
use glib::translate::*; use glib::translate::*;
impl PtpClock { impl PtpClock {

View file

@ -8,8 +8,11 @@
use RTSPMediaFactory; use RTSPMediaFactory;
use glib::translate::*; use glib::IsA;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use gst; use gst;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use ffi;
pub trait RTSPMediaFactoryExtManual { pub trait RTSPMediaFactoryExtManual {
#[cfg(any(feature = "v1_14", feature = "dox"))] #[cfg(any(feature = "v1_14", feature = "dox"))]

View file

@ -176,14 +176,6 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, Error> {
} }
} }
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn protection_filter_systems_by_available_decryptors(system_identifiers: &str) -> Vec<String> {
assert_initialized_main_thread!();
unsafe {
FromGlibPtrContainer::from_glib_full(ffi::gst_protection_filter_systems_by_available_decryptors(system_identifiers.to_glib_none().0))
}
}
pub fn update_registry() -> bool { pub fn update_registry() -> bool {
assert_initialized_main_thread!(); assert_initialized_main_thread!();
unsafe { unsafe {

View file

@ -15,6 +15,8 @@ use glib::source::{CallbackGuard, Continue, Priority, SourceId};
use glib_ffi; use glib_ffi;
use glib_ffi::{gboolean, gpointer}; use glib_ffi::{gboolean, gpointer};
use std::ptr; use std::ptr;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use std::mem;
#[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))] #[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))]
use std::os::unix; use std::os::unix;

View file

@ -153,6 +153,8 @@ pub use clock::{ClockExtManual, ClockId};
mod buffer_pool; mod buffer_pool;
pub use buffer_pool::*; pub use buffer_pool::*;
mod pad_template;
pub mod functions; pub mod functions;
pub use functions::*; pub use functions::*;

View file

@ -0,0 +1,28 @@
// Copyright (C) 2018 Sebastian Dröge <sebastian@centricular.com>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use StaticPadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib::translate::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use ffi;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib;
impl PadTemplate {
#[cfg(any(feature = "v1_14", feature = "dox"))]
pub fn new_from_static_pad_template_with_gtype(pad_template: &StaticPadTemplate, pad_type: glib::types::Type) -> PadTemplate {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::gst_pad_template_new_from_static_pad_template_with_gtype(mut_override(pad_template.to_glib_none().0), pad_type.to_glib()))
}
}
}