Commit 4864a1e0 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Fix build

parent 7f479b0e
...@@ -644,6 +644,10 @@ status = "generate" ...@@ -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" ...@@ -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]
......
...@@ -75,7 +75,7 @@ impl<'a> AudioInfoBuilder<'a> { ...@@ -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 {
......
...@@ -7,9 +7,12 @@ ...@@ -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 { ...@@ -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)
} }
} }
} }
...@@ -54,6 +54,7 @@ mod audio_info; ...@@ -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};
......
...@@ -10,6 +10,7 @@ use ffi; ...@@ -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 {
......
...@@ -10,6 +10,7 @@ use ffi; ...@@ -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 {
......
...@@ -10,6 +10,7 @@ use ffi; ...@@ -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 {
......
...@@ -8,8 +8,11 @@ ...@@ -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"))]
......
...@@ -176,14 +176,6 @@ pub fn parse_launchv(argv: &[&str]) -> Result<Element, Error> { ...@@ -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 {
......
...@@ -15,6 +15,8 @@ use glib::source::{CallbackGuard, Continue, Priority, SourceId}; ...@@ -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;
......
...@@ -153,6 +153,8 @@ pub use clock::{ClockExtManual, ClockId}; ...@@ -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::*;
......
// 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()))
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment