forked from mirrors/gstreamer-rs
Fix build
This commit is contained in:
parent
7f479b0e14
commit
4864a1e089
12 changed files with 55 additions and 12 deletions
|
@ -644,6 +644,10 @@ status = "generate"
|
|||
name = "Gst.PadTemplate"
|
||||
status = "generate"
|
||||
trait = false
|
||||
[[object.function]]
|
||||
name = "new_from_static_pad_template_with_gtype"
|
||||
# static pad template manual
|
||||
ignore = true
|
||||
|
||||
[[object]]
|
||||
name = "Gst.GhostPad"
|
||||
|
@ -1054,6 +1058,11 @@ status = "generate"
|
|||
# newtype wrapper
|
||||
ignore = true
|
||||
|
||||
[[object.function]]
|
||||
name = "protection_filter_systems_by_available_decryptors"
|
||||
# wrong array annotations
|
||||
ignore = true
|
||||
|
||||
[[object.function]]
|
||||
name = "debug_bin_to_dot_data"
|
||||
[object.function.return]
|
||||
|
|
|
@ -75,7 +75,7 @@ impl<'a> AudioInfoBuilder<'a> {
|
|||
self.format.to_glib(),
|
||||
self.rate as i32,
|
||||
self.channels as i32,
|
||||
positions_ptr,
|
||||
positions_ptr as *mut _,
|
||||
);
|
||||
|
||||
if info.finfo.is_null() || info.rate <= 0 || info.channels <= 0 {
|
||||
|
|
|
@ -7,9 +7,12 @@
|
|||
// except according to those terms.
|
||||
|
||||
use ffi;
|
||||
|
||||
use AudioStreamAlign;
|
||||
|
||||
use gst;
|
||||
use glib::translate::*;
|
||||
use std::mem;
|
||||
|
||||
impl AudioStreamAlign {
|
||||
#[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) {
|
||||
|
@ -18,7 +21,7 @@ impl AudioStreamAlign {
|
|||
let mut out_duration = 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));
|
||||
(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;
|
|||
pub use audio_info::*;
|
||||
mod audio_channel_position;
|
||||
pub use audio_channel_position::*;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
mod audio_stream_align;
|
||||
|
||||
use glib::translate::{from_glib_full, ToGlibPtr};
|
||||
|
|
|
@ -10,6 +10,7 @@ use ffi;
|
|||
use NetClientClock;
|
||||
|
||||
use gst;
|
||||
use glib::object::Downcast;
|
||||
use glib::translate::*;
|
||||
|
||||
impl NetClientClock {
|
||||
|
|
|
@ -10,6 +10,7 @@ use ffi;
|
|||
use NtpClock;
|
||||
|
||||
use gst;
|
||||
use glib::object::Downcast;
|
||||
use glib::translate::*;
|
||||
|
||||
impl NtpClock {
|
||||
|
|
|
@ -10,6 +10,7 @@ use ffi;
|
|||
use PtpClock;
|
||||
|
||||
use gst;
|
||||
use glib::object::Downcast;
|
||||
use glib::translate::*;
|
||||
|
||||
impl PtpClock {
|
||||
|
|
|
@ -8,8 +8,11 @@
|
|||
|
||||
use RTSPMediaFactory;
|
||||
|
||||
use glib::translate::*;
|
||||
use glib::IsA;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
use gst;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
use ffi;
|
||||
|
||||
pub trait RTSPMediaFactoryExtManual {
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
|
|
|
@ -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 {
|
||||
assert_initialized_main_thread!();
|
||||
unsafe {
|
||||
|
|
|
@ -15,6 +15,8 @@ use glib::source::{CallbackGuard, Continue, Priority, SourceId};
|
|||
use glib_ffi;
|
||||
use glib_ffi::{gboolean, gpointer};
|
||||
use std::ptr;
|
||||
#[cfg(any(feature = "v1_14", feature = "dox"))]
|
||||
use std::mem;
|
||||
|
||||
#[cfg(any(all(unix, feature = "v1_14"), feature = "dox"))]
|
||||
use std::os::unix;
|
||||
|
|
|
@ -153,6 +153,8 @@ pub use clock::{ClockExtManual, ClockId};
|
|||
mod buffer_pool;
|
||||
pub use buffer_pool::*;
|
||||
|
||||
mod pad_template;
|
||||
|
||||
pub mod functions;
|
||||
pub use functions::*;
|
||||
|
||||
|
|
28
gstreamer/src/pad_template.rs
Normal file
28
gstreamer/src/pad_template.rs
Normal 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()))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue