mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-15 14:52:04 +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"
|
description = "Fallback Switcher Plugin"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2"
|
libc = { version = "0.2", optional = true }
|
||||||
glib = { git = "https://github.com/gtk-rs/glib" }
|
glib = { git = "https://github.com/gtk-rs/glib" }
|
||||||
glib-sys = { git = "https://github.com/gtk-rs/sys" }
|
glib-sys = { git = "https://github.com/gtk-rs/sys", optional = true }
|
||||||
gobject-sys = { git = "https://github.com/gtk-rs/sys" }
|
gobject-sys = { git = "https://github.com/gtk-rs/sys", optional = true }
|
||||||
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
gst = { package = "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"] }
|
gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] }
|
||||||
gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" }
|
gst-sys = { package = "gstreamer-sys", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", optional = true }
|
||||||
gstreamer-audio = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_14"] }
|
gst-audio = { package = "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"] }
|
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 }
|
gtk = { git = "https://github.com/gtk-rs/gtk", optional = true }
|
||||||
gio = { git = "https://github.com/gtk-rs/gio", optional = true }
|
gio = { git = "https://github.com/gtk-rs/gio", optional = true }
|
||||||
once_cell = "1.0"
|
once_cell = "1.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
gstreamer-check = { 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"]}
|
||||||
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]
|
[lib]
|
||||||
name = "gstfallbackswitch"
|
name = "gstfallbackswitch"
|
||||||
|
@ -41,5 +41,5 @@ cc = "1.0"
|
||||||
pkg-config = "0.3"
|
pkg-config = "0.3"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["glib-sys", "gobject-sys", "gst-sys", "libc"]
|
||||||
#v1_18 = ["gstreamer/v1_18", "gstreamer-base"]
|
#v1_18 = ["gstreamer-base/v1_18"]
|
||||||
|
|
|
@ -15,18 +15,12 @@
|
||||||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||||
// Boston, MA 02110-1335, USA.
|
// Boston, MA 02110-1335, USA.
|
||||||
|
|
||||||
extern crate glib;
|
|
||||||
use glib::prelude::*;
|
|
||||||
extern crate gio;
|
|
||||||
use gio::prelude::*;
|
use gio::prelude::*;
|
||||||
|
|
||||||
extern crate gstreamer as gst;
|
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
|
|
||||||
extern crate gstfallbackswitch;
|
|
||||||
|
|
||||||
extern crate gtk;
|
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
clippy::unreadable_literal
|
clippy::unreadable_literal
|
||||||
)]
|
)]
|
||||||
|
|
||||||
extern crate gstreamer_sys as gst;
|
use gst_sys as gst;
|
||||||
|
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use libc::{
|
use libc::{
|
||||||
|
|
|
@ -15,14 +15,11 @@
|
||||||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||||
// Boston, MA 02110-1335, USA.
|
// Boston, MA 02110-1335, USA.
|
||||||
|
|
||||||
use glib;
|
|
||||||
use glib::prelude::*;
|
use glib::prelude::*;
|
||||||
use glib::subclass;
|
use glib::subclass;
|
||||||
use glib::subclass::prelude::*;
|
use glib::subclass::prelude::*;
|
||||||
use gst;
|
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
use gst::subclass::prelude::*;
|
use gst::subclass::prelude::*;
|
||||||
use gstreamer_base as gst_base;
|
|
||||||
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
|
@ -16,14 +16,20 @@
|
||||||
// Boston, MA 02110-1335, USA.
|
// Boston, MA 02110-1335, USA.
|
||||||
|
|
||||||
#[cfg(not(feature = "v1_18"))]
|
#[cfg(not(feature = "v1_18"))]
|
||||||
use super::base as gst_base;
|
use self::gst_base::prelude::*;
|
||||||
use glib::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;
|
||||||
use glib::subclass::prelude::*;
|
use glib::subclass::prelude::*;
|
||||||
use gst::prelude::*;
|
|
||||||
use gst::subclass::prelude::*;
|
use gst::subclass::prelude::*;
|
||||||
use gst_base::prelude::*;
|
|
||||||
use gst_base::subclass::prelude::*;
|
|
||||||
|
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
|
|
@ -18,35 +18,18 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate glib;
|
extern crate glib;
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate gstreamer as gst;
|
extern crate gst;
|
||||||
|
|
||||||
extern crate gstreamer_audio as gst_audio;
|
|
||||||
extern crate gstreamer_video as gst_video;
|
|
||||||
|
|
||||||
#[cfg(not(feature = "v1_18"))]
|
#[cfg(not(feature = "v1_18"))]
|
||||||
extern crate glib_sys;
|
#[path = "base/mod.rs"]
|
||||||
#[cfg(not(feature = "v1_18"))]
|
pub mod gst_base_compat;
|
||||||
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;
|
|
||||||
|
|
||||||
mod fallbacksrc;
|
mod fallbacksrc;
|
||||||
mod fallbackswitch;
|
mod fallbackswitch;
|
||||||
|
|
||||||
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
|
||||||
fallbackswitch::register(plugin)?;
|
|
||||||
fallbacksrc::register(plugin)?;
|
fallbacksrc::register(plugin)?;
|
||||||
|
fallbackswitch::register(plugin)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,11 @@
|
||||||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||||
// Boston, MA 02110-1335, USA.
|
// Boston, MA 02110-1335, USA.
|
||||||
|
|
||||||
extern crate glib;
|
|
||||||
use glib::prelude::*;
|
use glib::prelude::*;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate gstreamer as gst;
|
extern crate gst;
|
||||||
use gst::prelude::*;
|
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;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue