Manual code fixes

This commit is contained in:
Guillaume Gomez 2019-11-10 18:00:00 +01:00 committed by Sebastian Dröge
parent 457ac9118b
commit a58cd4b5bc
4 changed files with 8 additions and 8 deletions

View file

@ -28,10 +28,10 @@ extern crate gio;
static GES_INIT: Once = Once::new();
pub use glib::{
BoolError, Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value,
Cast, Continue, Error, IsA, StaticType, ToValue, Type, TypedValue, Value,
};
pub fn init() -> Result<(), BoolError> {
pub fn init() -> Result<(), glib::Error> {
if gst::init().is_err() {
return Err(glib_bool_error!("Could not initialize GStreamer."));
}

View file

@ -6,12 +6,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use glib;
use glib::translate::*;
use gst_sys;
use std::ptr;
use Element;
use Error;
use ParseContext;
use ParseFlags;
@ -20,7 +20,7 @@ pub fn parse_bin_from_description_full(
ghost_unlinked_pads: bool,
mut context: Option<&mut ParseContext>,
flags: ParseFlags,
) -> Result<Element, Error> {
) -> Result<Element, glib::Error> {
assert_initialized_main_thread!();
unsafe {
let mut error = ptr::null_mut();
@ -43,7 +43,7 @@ pub fn parse_launch_full(
pipeline_description: &str,
mut context: Option<&mut ParseContext>,
flags: ParseFlags,
) -> Result<Element, Error> {
) -> Result<Element, glib::Error> {
assert_initialized_main_thread!();
unsafe {
let mut error = ptr::null_mut();
@ -65,7 +65,7 @@ pub fn parse_launchv_full(
argv: &[&str],
mut context: Option<&mut ParseContext>,
flags: ParseFlags,
) -> Result<Element, Error> {
) -> Result<Element, glib::Error> {
assert_initialized_main_thread!();
unsafe {
let mut error = ptr::null_mut();

View file

@ -1101,7 +1101,7 @@ impl<'a> DeviceRemoved<'a> {
declare_concrete_message!(PropertyNotify);
impl<'a> PropertyNotify<'a> {
#[cfg(any(feature = "v1_10", feature = "dox"))]
pub fn get(&self) -> (Object, &str, Option<&'a ::Value>) {
pub fn get(&self) -> (Object, &str, Option<&'a glib::Value>) {
unsafe {
let mut object = ptr::null_mut();
let mut property_name = ptr::null();

View file

@ -45,7 +45,7 @@ struct SampleDe {
}
impl From<SampleDe> for Sample {
fn from(mut buf_de: SampleDe) -> Self {
fn from(buf_de: SampleDe) -> Self {
let mut builder = Sample::new();
if let Some(buffer) = buf_de.buffer.as_ref() {