mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-01 14:58:42 +00:00
fallbackswitch: Clean up 1.18 aggregator compat code
This commit is contained in:
parent
a63991e325
commit
2019cdb8cb
7 changed files with 30 additions and 55 deletions
|
@ -8,22 +8,22 @@ edition = "2018"
|
|||
description = "Fallback Switcher Plugin"
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
libc = { version = "0.2", optional = true }
|
||||
glib = { git = "https://github.com/gtk-rs/glib" }
|
||||
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
||||
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" }
|
||||
gstreamer-audio = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
gstreamer-video = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
glib-sys = { git = "https://github.com/gtk-rs/sys", optional = true }
|
||||
gobject-sys = { git = "https://github.com/gtk-rs/sys", optional = true }
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||
gst-sys = { package = "gstreamer-sys", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", optional = true }
|
||||
gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
||||
gtk = { git = "https://github.com/gtk-rs/gtk", optional = true }
|
||||
gio = { git = "https://github.com/gtk-rs/gio", optional = true }
|
||||
once_cell = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
gstreamer-check = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"]}
|
||||
gstreamer-app = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"]}
|
||||
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"]}
|
||||
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"]}
|
||||
|
||||
[lib]
|
||||
name = "gstfallbackswitch"
|
||||
|
@ -41,5 +41,5 @@ cc = "1.0"
|
|||
pkg-config = "0.3"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
#v1_18 = ["gstreamer/v1_18", "gstreamer-base"]
|
||||
default = ["glib-sys", "gobject-sys", "gst-sys", "libc"]
|
||||
#v1_18 = ["gstreamer-base/v1_18"]
|
||||
|
|
|
@ -15,18 +15,12 @@
|
|||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||
// Boston, MA 02110-1335, USA.
|
||||
|
||||
extern crate glib;
|
||||
use glib::prelude::*;
|
||||
extern crate gio;
|
||||
use gio::prelude::*;
|
||||
|
||||
extern crate gstreamer as gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
extern crate gstfallbackswitch;
|
||||
|
||||
extern crate gtk;
|
||||
use gtk::prelude::*;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::env;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
clippy::unreadable_literal
|
||||
)]
|
||||
|
||||
extern crate gstreamer_sys as gst;
|
||||
use gst_sys as gst;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use libc::{
|
||||
|
|
|
@ -15,14 +15,11 @@
|
|||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||
// Boston, MA 02110-1335, USA.
|
||||
|
||||
use glib;
|
||||
use glib::prelude::*;
|
||||
use glib::subclass;
|
||||
use glib::subclass::prelude::*;
|
||||
use gst;
|
||||
use gst::prelude::*;
|
||||
use gst::subclass::prelude::*;
|
||||
use gstreamer_base as gst_base;
|
||||
|
||||
use std::mem;
|
||||
use std::sync::Mutex;
|
||||
|
|
|
@ -16,14 +16,20 @@
|
|||
// Boston, MA 02110-1335, USA.
|
||||
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
use super::base as gst_base;
|
||||
use glib::prelude::*;
|
||||
use self::gst_base::prelude::*;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
use self::gst_base::subclass::prelude::*;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
use super::gst_base_compat as gst_base;
|
||||
|
||||
#[cfg(feature = "v1_18")]
|
||||
use gst_base::prelude::*;
|
||||
#[cfg(feature = "v1_18")]
|
||||
use gst_base::subclass::prelude::*;
|
||||
|
||||
use glib::subclass;
|
||||
use glib::subclass::prelude::*;
|
||||
use gst::prelude::*;
|
||||
use gst::subclass::prelude::*;
|
||||
use gst_base::prelude::*;
|
||||
use gst_base::subclass::prelude::*;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
|
|
|
@ -18,35 +18,18 @@
|
|||
#[macro_use]
|
||||
extern crate glib;
|
||||
#[macro_use]
|
||||
extern crate gstreamer as gst;
|
||||
|
||||
extern crate gstreamer_audio as gst_audio;
|
||||
extern crate gstreamer_video as gst_video;
|
||||
extern crate gst;
|
||||
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
extern crate glib_sys;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
extern crate gobject_sys;
|
||||
#[cfg(feature = "v1_18")]
|
||||
extern crate gstreamer_base as gst_base;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
extern crate gstreamer_sys as gst_sys;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
#[allow(dead_code)]
|
||||
mod base;
|
||||
#[cfg(not(feature = "v1_18"))]
|
||||
mod gst_base {
|
||||
pub use super::base::*;
|
||||
}
|
||||
|
||||
extern crate once_cell;
|
||||
#[path = "base/mod.rs"]
|
||||
pub mod gst_base_compat;
|
||||
|
||||
mod fallbacksrc;
|
||||
mod fallbackswitch;
|
||||
|
||||
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||
fallbackswitch::register(plugin)?;
|
||||
fallbacksrc::register(plugin)?;
|
||||
fallbackswitch::register(plugin)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -15,16 +15,11 @@
|
|||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||
// Boston, MA 02110-1335, USA.
|
||||
|
||||
extern crate glib;
|
||||
use glib::prelude::*;
|
||||
|
||||
#[macro_use]
|
||||
extern crate gstreamer as gst;
|
||||
extern crate gst;
|
||||
use gst::prelude::*;
|
||||
extern crate gstreamer_app as gst_app;
|
||||
extern crate gstreamer_check as gst_check;
|
||||
|
||||
extern crate gstfallbackswitch;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
|
|
Loading…
Reference in a new issue