From d18dbb85d87059ccf84119c3ef010a8bf3fe4da1 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 21 Oct 2019 13:01:03 +0530 Subject: [PATCH] rusoto: Rename s3 as rusoto Will disambiguate from any other S3 plugins, and matches how we name other plugins (soup, lewton, rav1e, ...). Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/76 --- Cargo.toml | 2 +- {gst-plugin-s3 => gst-plugin-rusoto}/Cargo.toml | 4 ++-- {gst-plugin-s3 => gst-plugin-rusoto}/README.md | 0 {gst-plugin-s3 => gst-plugin-rusoto}/build.rs | 0 {gst-plugin-s3 => gst-plugin-rusoto}/src/lib.rs | 2 +- .../src/s3sink.rs | 10 +++++----- {gst-plugin-s3 => gst-plugin-rusoto}/src/s3src.rs | 15 ++++++++++----- {gst-plugin-s3 => gst-plugin-rusoto}/src/s3url.rs | 0 .../src/s3utils.rs | 0 9 files changed, 19 insertions(+), 14 deletions(-) rename {gst-plugin-s3 => gst-plugin-rusoto}/Cargo.toml (94%) rename {gst-plugin-s3 => gst-plugin-rusoto}/README.md (100%) rename {gst-plugin-s3 => gst-plugin-rusoto}/build.rs (100%) rename {gst-plugin-s3 => gst-plugin-rusoto}/src/lib.rs (98%) rename {gst-plugin-s3 => gst-plugin-rusoto}/src/s3sink.rs (98%) rename {gst-plugin-s3 => gst-plugin-rusoto}/src/s3src.rs (97%) rename {gst-plugin-s3 => gst-plugin-rusoto}/src/s3url.rs (100%) rename {gst-plugin-s3 => gst-plugin-rusoto}/src/s3utils.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 71f6fcc3..3f1e12fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ members = [ "gst-plugin-sodium", "gst-plugin-cdg", "gst-plugin-rav1e", - "gst-plugin-s3", + "gst-plugin-rusoto", "gst-plugin-fallbackswitch", "gst-plugin-lewton", ] diff --git a/gst-plugin-s3/Cargo.toml b/gst-plugin-rusoto/Cargo.toml similarity index 94% rename from gst-plugin-s3/Cargo.toml rename to gst-plugin-rusoto/Cargo.toml index 45c5c41b..6ef1c718 100644 --- a/gst-plugin-s3/Cargo.toml +++ b/gst-plugin-rusoto/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gst-plugin-s3" +name = "gst-plugin-rusoto" version = "0.6.0" authors = ["Arun Raghavan "] repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugin-rs" @@ -20,7 +20,7 @@ percent-encoding = "2" tokio = "0.1" [lib] -name = "gsts3" +name = "gstrusoto" crate-type = ["cdylib", "rlib"] path = "src/lib.rs" diff --git a/gst-plugin-s3/README.md b/gst-plugin-rusoto/README.md similarity index 100% rename from gst-plugin-s3/README.md rename to gst-plugin-rusoto/README.md diff --git a/gst-plugin-s3/build.rs b/gst-plugin-rusoto/build.rs similarity index 100% rename from gst-plugin-s3/build.rs rename to gst-plugin-rusoto/build.rs diff --git a/gst-plugin-s3/src/lib.rs b/gst-plugin-rusoto/src/lib.rs similarity index 98% rename from gst-plugin-s3/src/lib.rs rename to gst-plugin-rusoto/src/lib.rs index add85600..e5cb7f22 100644 --- a/gst-plugin-s3/src/lib.rs +++ b/gst-plugin-rusoto/src/lib.rs @@ -27,7 +27,7 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { } gst_plugin_define!( - s3, + rusoto, env!("CARGO_PKG_DESCRIPTION"), plugin_init, concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")), diff --git a/gst-plugin-s3/src/s3sink.rs b/gst-plugin-rusoto/src/s3sink.rs similarity index 98% rename from gst-plugin-s3/src/s3sink.rs rename to gst-plugin-rusoto/src/s3sink.rs index 77d3a2a6..7a7ce7f3 100644 --- a/gst-plugin-s3/src/s3sink.rs +++ b/gst-plugin-rusoto/src/s3sink.rs @@ -375,7 +375,7 @@ impl S3Sink { } impl ObjectSubclass for S3Sink { - const NAME: &'static str = "S3Sink"; + const NAME: &'static str = "RusotoS3Sink"; type ParentType = gst_base::BaseSink; type Instance = gst::subclass::ElementInstanceStruct; type Class = subclass::simple::ClassStruct; @@ -387,14 +387,14 @@ impl ObjectSubclass for S3Sink { settings: Mutex::new(Default::default()), state: Mutex::new(Default::default()), cat: gst::DebugCategory::new( - "s3sink", + "rusotos3sink", gst::DebugColorFlags::empty(), Some("Amazon S3 Sink"), ), canceller: Mutex::new(None), runtime: runtime::Builder::new() .core_threads(1) - .name_prefix("S3-sink-runtime") + .name_prefix("rusotos3sink-runtime") .build() .unwrap(), client: Mutex::new(S3Client::new(Region::default())), @@ -478,7 +478,7 @@ impl BaseSinkImpl for S3Sink { fn start(&self, _element: &gst_base::BaseSink) -> Result<(), gst::ErrorMessage> { let mut state = self.state.lock().unwrap(); if let State::Started(_) = *state { - unreachable!("S3Sink already started"); + unreachable!("RusotoS3Sink already started"); } *state = State::Started(self.start()?); @@ -560,7 +560,7 @@ impl BaseSinkImpl for S3Sink { pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { gst::Element::register( Some(plugin), - "s3sink", + "rusotos3sink", gst::Rank::Primary, S3Sink::get_type(), ) diff --git a/gst-plugin-s3/src/s3src.rs b/gst-plugin-rusoto/src/s3src.rs similarity index 97% rename from gst-plugin-s3/src/s3src.rs rename to gst-plugin-rusoto/src/s3src.rs index ed74b48b..8884c5be 100644 --- a/gst-plugin-s3/src/s3src.rs +++ b/gst-plugin-rusoto/src/s3src.rs @@ -222,7 +222,7 @@ impl S3Src { } impl ObjectSubclass for S3Src { - const NAME: &'static str = "S3Src"; + const NAME: &'static str = "RusotoS3Src"; type ParentType = gst_base::BaseSrc; type Instance = gst::subclass::ElementInstanceStruct; type Class = subclass::simple::ClassStruct; @@ -234,13 +234,13 @@ impl ObjectSubclass for S3Src { url: Mutex::new(None), state: Mutex::new(StreamingState::Stopped), cat: gst::DebugCategory::new( - "s3src", + "rusotos3src", gst::DebugColorFlags::empty(), Some("Amazon S3 Source"), ), runtime: runtime::Builder::new() .core_threads(1) - .name_prefix("gst-s3-tokio") + .name_prefix("rusotos3src-runtime") .build() .unwrap(), canceller: Mutex::new(None), @@ -353,7 +353,7 @@ impl BaseSrcImpl for S3Src { let state = self.state.lock().unwrap(); if let StreamingState::Started { .. } = *state { - unreachable!("S3Src is already started"); + unreachable!("RusotoS3Src is already started"); } /* Drop the lock as self.head() needs it */ @@ -448,5 +448,10 @@ impl BaseSrcImpl for S3Src { } pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { - gst::Element::register(Some(plugin), "s3src", gst::Rank::Primary, S3Src::get_type()) + gst::Element::register( + Some(plugin), + "rusotos3src", + gst::Rank::Primary, + S3Src::get_type(), + ) } diff --git a/gst-plugin-s3/src/s3url.rs b/gst-plugin-rusoto/src/s3url.rs similarity index 100% rename from gst-plugin-s3/src/s3url.rs rename to gst-plugin-rusoto/src/s3url.rs diff --git a/gst-plugin-s3/src/s3utils.rs b/gst-plugin-rusoto/src/s3utils.rs similarity index 100% rename from gst-plugin-s3/src/s3utils.rs rename to gst-plugin-rusoto/src/s3utils.rs