From 81437bb1c962a8b7b423e846fe4fcc65d9aefa55 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 26 May 2022 15:22:42 +0530 Subject: [PATCH] net/rusoto: Rename to aws Rename all the elements to use aws prefix now but still register a backwards compat element factory. Part-of: --- net/rusoto/Cargo.toml | 4 ++-- net/rusoto/README.md | 6 +++--- net/rusoto/src/lib.rs | 2 +- net/rusoto/src/s3sink/imp.rs | 4 ++-- net/rusoto/src/s3sink/mod.rs | 6 ++++++ net/rusoto/src/s3src/imp.rs | 4 ++-- net/rusoto/src/s3src/mod.rs | 6 ++++++ net/rusoto/src/s3utils.rs | 2 +- 8 files changed, 23 insertions(+), 11 deletions(-) diff --git a/net/rusoto/Cargo.toml b/net/rusoto/Cargo.toml index 0a350543..9364c8fb 100644 --- a/net/rusoto/Cargo.toml +++ b/net/rusoto/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gst-plugin-rusoto" +name = "gst-plugin-aws" version = "0.9.0" authors = ["Arun Raghavan ", "Jordan Petridis ", @@ -40,7 +40,7 @@ base32 = "0.4" backoff = { version = "0.4", features = [ "futures", "tokio" ] } [lib] -name = "gstrusoto" +name = "gstaws" crate-type = ["cdylib", "rlib"] path = "src/lib.rs" diff --git a/net/rusoto/README.md b/net/rusoto/README.md index 18c49900..f84cdc40 100644 --- a/net/rusoto/README.md +++ b/net/rusoto/README.md @@ -7,9 +7,9 @@ to interact with [S3](https://aws.amazon.com/s3) and ## AWS Credentials -AWS credentials are picked up using the mechanism that -[rusoto's ChainProvider](https://rusoto.github.io/rusoto/rusoto_credential/struct.ChainProvider.html) -uses. At the moment, that is: +AWS credentials are picked up using the mechanism described by +[AWS SDK](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/credentials.html). +At the moment, that is: 1. Environment variables: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` 2. AWS credentials file. Usually located at ~/.aws/credentials. diff --git a/net/rusoto/src/lib.rs b/net/rusoto/src/lib.rs index 953af6fa..9abe8f72 100644 --- a/net/rusoto/src/lib.rs +++ b/net/rusoto/src/lib.rs @@ -28,7 +28,7 @@ fn plugin_init(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { } gst::plugin_define!( - rusoto, + aws, env!("CARGO_PKG_DESCRIPTION"), plugin_init, concat!(env!("CARGO_PKG_VERSION"), "-", env!("COMMIT_ID")), diff --git a/net/rusoto/src/s3sink/imp.rs b/net/rusoto/src/s3sink/imp.rs index 9bb34cf7..b6b0e501 100644 --- a/net/rusoto/src/s3sink/imp.rs +++ b/net/rusoto/src/s3sink/imp.rs @@ -172,7 +172,7 @@ pub struct S3Sink { static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( - "rusotos3sink", + "aws3sink", gst::DebugColorFlags::empty(), Some("Amazon S3 Sink"), ) @@ -468,7 +468,7 @@ impl S3Sink { secret_access_key.clone(), None, None, - "rusoto-s3-sink", + "aws-s3-sink", )), _ => None, }; diff --git a/net/rusoto/src/s3sink/mod.rs b/net/rusoto/src/s3sink/mod.rs index 9aa6be2d..16575e41 100644 --- a/net/rusoto/src/s3sink/mod.rs +++ b/net/rusoto/src/s3sink/mod.rs @@ -36,5 +36,11 @@ pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { "rusotos3sink", gst::Rank::Primary, S3Sink::static_type(), + )?; + gst::Element::register( + Some(plugin), + "awss3sink", + gst::Rank::Primary, + S3Sink::static_type(), ) } diff --git a/net/rusoto/src/s3src/imp.rs b/net/rusoto/src/s3src/imp.rs index 58d1db5b..c03efc3e 100644 --- a/net/rusoto/src/s3src/imp.rs +++ b/net/rusoto/src/s3src/imp.rs @@ -76,7 +76,7 @@ pub struct S3Src { static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( - "rusotos3src", + "awss3src", gst::DebugColorFlags::empty(), Some("Amazon S3 Source"), ) @@ -104,7 +104,7 @@ impl S3Src { secret_access_key.clone(), None, None, - "rusoto-s3-src", + "aws-s3-src", )), _ => None, }; diff --git a/net/rusoto/src/s3src/mod.rs b/net/rusoto/src/s3src/mod.rs index 33a4b3be..7cc9218c 100644 --- a/net/rusoto/src/s3src/mod.rs +++ b/net/rusoto/src/s3src/mod.rs @@ -21,5 +21,11 @@ pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> { "rusotos3src", gst::Rank::Primary, S3Src::static_type(), + )?; + gst::Element::register( + Some(plugin), + "awss3src", + gst::Rank::Primary, + S3Src::static_type(), ) } diff --git a/net/rusoto/src/s3utils.rs b/net/rusoto/src/s3utils.rs index 9e574b86..8790ec5e 100644 --- a/net/rusoto/src/s3utils.rs +++ b/net/rusoto/src/s3utils.rs @@ -27,7 +27,7 @@ static RUNTIME: Lazy = Lazy::new(|| { runtime::Builder::new_multi_thread() .enable_all() .worker_threads(2) - .thread_name("gst-rusoto-runtime") + .thread_name("gst-aws-runtime") .build() .unwrap() });