diff --git a/gst-plugin-closedcaption/Cargo.toml b/gst-plugin-closedcaption/Cargo.toml index 2c111e05e..81c1e31b3 100644 --- a/gst-plugin-closedcaption/Cargo.toml +++ b/gst-plugin-closedcaption/Cargo.toml @@ -7,19 +7,34 @@ edition = "2018" [dependencies] glib = { git = "https://github.com/gtk-rs/glib", features = ["subclassing"] } -gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["subclassing", "v1_10"] } -gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["subclassing", "v1_10"] } -gstreamer-video = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_10"] } combine = "3.6" either = "1" uuid = { version = "0.7", features = ["v4"] } chrono = "0.4" +[dependencies.gst] +git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" +features = ["subclassing", "v1_10"] +package="gstreamer" + +[dependencies.gst-base] +git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" +features = ["subclassing", "v1_10"] +package="gstreamer-base" + +[dependencies.gst-video] +git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" +features = ["v1_10"] +package="gstreamer-video" + [dev-dependencies] pretty_assertions = "0.5.1" -gstreamer-check = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } rand = "0.6" +[dev-dependencies.gst-check] +git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" +package="gstreamer-check" + [lib] name = "gstrsclosedcaption" crate-type = ["cdylib", "rlib"] diff --git a/gst-plugin-closedcaption/src/lib.rs b/gst-plugin-closedcaption/src/lib.rs index c533ea0ee..45e83a11e 100644 --- a/gst-plugin-closedcaption/src/lib.rs +++ b/gst-plugin-closedcaption/src/lib.rs @@ -17,18 +17,15 @@ #![crate_type = "cdylib"] +// These macros are in weird paths currently, +// and extern crate is used to avoid the explicit imports +// should not be needed ideally in the upcoming releases. +// https://github.com/gtk-rs/glib/issues/420 +// https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/issues/170 #[macro_use] extern crate glib; #[macro_use] -extern crate gstreamer as gst; -extern crate gstreamer_base as gst_base; -extern crate gstreamer_video as gst_video; - -extern crate combine; -extern crate either; - -extern crate chrono; -extern crate uuid; +extern crate gst; #[cfg(test)] #[macro_use] diff --git a/gst-plugin-closedcaption/tests/mcc_enc.rs b/gst-plugin-closedcaption/tests/mcc_enc.rs index 4e4b267d2..8ce51fdb9 100644 --- a/gst-plugin-closedcaption/tests/mcc_enc.rs +++ b/gst-plugin-closedcaption/tests/mcc_enc.rs @@ -15,18 +15,11 @@ // Free Software Foundation, Inc., 51 Franklin Street, Suite 500, // Boston, MA 02110-1335, USA. -extern crate glib; -use glib::prelude::*; - -extern crate gstreamer as gst; -extern crate gstreamer_check as gst_check; -extern crate gstreamer_video as gst_video; - -extern crate gstrsclosedcaption; - #[macro_use] extern crate pretty_assertions; +use glib::prelude::*; + fn init() { use std::sync::{Once, ONCE_INIT}; static INIT: Once = ONCE_INIT; diff --git a/gst-plugin-closedcaption/tests/mcc_parse.rs b/gst-plugin-closedcaption/tests/mcc_parse.rs index 27203a50c..7e113daae 100644 --- a/gst-plugin-closedcaption/tests/mcc_parse.rs +++ b/gst-plugin-closedcaption/tests/mcc_parse.rs @@ -15,21 +15,12 @@ // Free Software Foundation, Inc., 51 Franklin Street, Suite 500, // Boston, MA 02110-1335, USA. -extern crate glib; - -extern crate gstreamer as gst; -use gst::prelude::*; -extern crate gstreamer_check as gst_check; -extern crate gstreamer_video as gst_video; - -extern crate rand; -use rand::{Rng, SeedableRng}; - -extern crate gstrsclosedcaption; - #[macro_use] extern crate pretty_assertions; +use gst::prelude::*; +use rand::{Rng, SeedableRng}; + fn init() { use std::sync::{Once, ONCE_INIT}; static INIT: Once = ONCE_INIT;