Update to AWS SDK 0.101 / 0.59 / 0.38

This commit is contained in:
Sebastian Dröge 2023-11-20 10:13:13 +02:00
parent 66c62d69b9
commit 1d9c89e3fe
5 changed files with 91 additions and 76 deletions

121
Cargo.lock generated
View file

@ -297,9 +297,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-config" name = "aws-config"
version = "0.100.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14044e9a7e7ae811d99e71d35e3698113ec27eb618445863b611c60811574cc6" checksum = "84f9625b71b3ee4adbfbca369c6680d156e316ed86d2c7199a2a134563917414"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -328,9 +328,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-credential-types" name = "aws-credential-types"
version = "0.58.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1eca93b9b017fab7c53a2d1518efc7f03de631e32f420298440acbfef146d21" checksum = "5924466398ac76ffd411d297b9d516dcebb0577f7344c0c15fd8e8e04d9c7895"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-runtime-api", "aws-smithy-runtime-api",
@ -340,9 +340,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-http" name = "aws-http"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31eca8162dedcccb0ff256a878689510763b9ffd5a2c0d51ee0199dc2ec593a" checksum = "bb9a3aa335a105a00975c971f1dad403c3175f2a210d98f39345c6af53923912"
dependencies = [ dependencies = [
"aws-smithy-runtime-api", "aws-smithy-runtime-api",
"aws-smithy-types", "aws-smithy-types",
@ -356,9 +356,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-runtime" name = "aws-runtime"
version = "0.58.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb1cd6bf27e01014e52b5b181d1e700841abd8adccee55055b1a86757f9afbb" checksum = "b75844ecbdf3dc5e0f5ac5fd1088fb1623849990ea9445d2826258ce63be4de5"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -378,9 +378,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-kinesisvideo" name = "aws-sdk-kinesisvideo"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "412dac1e2c024a82aa90ac00f10de926165a3d43f6a6ee303616d6688f774dc5" checksum = "f86c8a5742b93891c234d13a13374986f266078a151c5485e5eede75c8d1224e"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -400,9 +400,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-kinesisvideosignaling" name = "aws-sdk-kinesisvideosignaling"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b051f5c5d75fa9bdf0b67e3c4e155726369375a56a6e27f6ff18f2b1b8ffcf3b" checksum = "4cc7611bea9599edc02a6f6fb11bde01bce5cf4d296155db065af15c5cb94f7c"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -422,9 +422,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-s3" name = "aws-sdk-s3"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a199d3c811f6dbe2aabc0f0e1c60bf06b50a2e0106be896f2d1d223147940cc9" checksum = "39a2ccbd49e784c36d0f0596da681275496f679e249059cae3fa92dd3c2c72e1"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -452,9 +452,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-sso" name = "aws-sdk-sso"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73693581f8ad829c05e52738bdc44a650881e6bb2601d06a30bd67201228536b" checksum = "c870aa95e1e85f837f74af2cc937b3f8e72e2315a89e524265875843655b4d47"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -474,9 +474,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-ssooidc" name = "aws-sdk-ssooidc"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "607c4f6ca50ff57ead33b8b5f89e01aefcd82a408b5b5d2a7c14385b9f93c88f" checksum = "107ee812e46f9120e68d48bf985d2f2a538315bd8be8a3e54db619250cc4c95e"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -496,9 +496,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-sts" name = "aws-sdk-sts"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89064d7755ed95727f0ddb3e3aaab8191e37dd9c89fc38343a1604b9462fa583" checksum = "a4e3958c43a78f6c3822e62009a35802af5cc7c120fbe8e60b98565604569aae"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -519,9 +519,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-transcribestreaming" name = "aws-sdk-transcribestreaming"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89eaab3870ae1bda93d86da76a50747ca8f0597c49249a3c5c32983b10a1f527" checksum = "d67d99840c9cd45f6661aac61f0ea673fdb36466fea26fd07fd3e3bd56e49ad9"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -544,9 +544,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sdk-translate" name = "aws-sdk-translate"
version = "0.37.0" version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0ab811106b5921a72ea83c241542da140f9c486982aa3f58de6491847dd79cd" checksum = "a394d871c52e6479a080c48b1f8e1caf268a5e4780b928ebdee6305e217eb8fb"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-http", "aws-http",
@ -567,9 +567,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-sigv4" name = "aws-sigv4"
version = "0.58.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2b2ae7efc433aac9c367e6038484e604df711b9ae7ad1224a1db5e3caaab0f1" checksum = "06130e3686db3c5ae2fc44b3516fffe6b4d4eccebe09bd8ccc4067f3c9c183fb"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-smithy-eventstream", "aws-smithy-eventstream",
@ -577,17 +577,18 @@ dependencies = [
"aws-smithy-runtime-api", "aws-smithy-runtime-api",
"aws-smithy-types", "aws-smithy-types",
"bytes", "bytes",
"crypto-bigint 0.5.5",
"form_urlencoded", "form_urlencoded",
"hex", "hex",
"hmac 0.12.1", "hmac 0.12.1",
"http", "http",
"num-bigint",
"once_cell", "once_cell",
"p256", "p256",
"percent-encoding", "percent-encoding",
"regex", "regex",
"ring 0.17.5", "ring 0.17.5",
"sha2", "sha2",
"subtle",
"time", "time",
"tracing", "tracing",
"zeroize", "zeroize",
@ -595,9 +596,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-async" name = "aws-smithy-async"
version = "0.100.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "324538ebc89f2414c9c92d878fe7b0538d1dea8ebb72c45f8add0aa1002a3666" checksum = "d787b7e07925b450bed90d9d29ac8e57006c9c2ac907151d175ac0e376bfee0e"
dependencies = [ dependencies = [
"futures-util", "futures-util",
"pin-project-lite", "pin-project-lite",
@ -606,9 +607,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-checksums" name = "aws-smithy-checksums"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3e6859852e8dc253cd61cd9333f0eda852b2559b9e5b3816a3bc6389e030435" checksum = "d293ef76a982c573f7384e30c28f9a2472f8dd5f4ce5abcceb0e909a15098e8e"
dependencies = [ dependencies = [
"aws-smithy-http", "aws-smithy-http",
"aws-smithy-types", "aws-smithy-types",
@ -627,9 +628,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-eventstream" name = "aws-smithy-eventstream"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36b06bdbc42a78b92e81c1582ed5b4f149b7d98e05536126ff329462f4828100" checksum = "e1d2c1844aee465dc023924dbe19d730b116eaf3587d7c2a9b4a41f9c4e980ee"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
"bytes", "bytes",
@ -638,9 +639,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-http" name = "aws-smithy-http"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b03f240d3eafae9359943d0ccdabf96f507e2ce00d865578bb10fc21c6a08a72" checksum = "96daaad925331c72449423574fdc72b54af780d5a23ace3c0a6ad0ccbf378715"
dependencies = [ dependencies = [
"aws-smithy-eventstream", "aws-smithy-eventstream",
"aws-smithy-runtime-api", "aws-smithy-runtime-api",
@ -659,18 +660,18 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-json" name = "aws-smithy-json"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5593def1d50cab58bffa61483a66d369520ae8d95902562314bac9bad6aaa64d" checksum = "0ff985bee3fe21046dc501fadc1d04a1161977c55a0cbbccd9b111c18206aa64"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
] ]
[[package]] [[package]]
name = "aws-smithy-query" name = "aws-smithy-query"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71452a6f146914adf3c6b1d4e2fc8a9df6bf10a2d05bd5b982e152d62280e18c" checksum = "cb4006503693766d34717efc5f58325062845fce26a683a71b70f23156d72e67"
dependencies = [ dependencies = [
"aws-smithy-types", "aws-smithy-types",
"urlencoding", "urlencoding",
@ -678,9 +679,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-runtime" name = "aws-smithy-runtime"
version = "0.58.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1ad73bc100c48acc09794914f06ae717f8d07132c2512a667e516f0c0a5fd4d" checksum = "d28af854558601b4202a4273b9720aebe43d73e472143e6056f16e3bd90bc837"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-http", "aws-smithy-http",
@ -702,9 +703,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-runtime-api" name = "aws-smithy-runtime-api"
version = "0.100.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d354f37c2df3661338507bdb78d4ace08d3ff687c3ece9b0dca12f6fd5d09184" checksum = "e1c68e17e754b86da350b43add38294189121a880e9c3fb454f83ff7044f5257"
dependencies = [ dependencies = [
"aws-smithy-async", "aws-smithy-async",
"aws-smithy-types", "aws-smithy-types",
@ -718,9 +719,9 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-types" name = "aws-smithy-types"
version = "0.100.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1d66124208cd17da157b8603fee220187239caa3531a0c71260704a076281d8" checksum = "d97b978d8a351ea5744206ecc643a1d3806628680e9f151b4d6b7a76fec1596f"
dependencies = [ dependencies = [
"base64-simd", "base64-simd",
"bytes", "bytes",
@ -741,18 +742,18 @@ dependencies = [
[[package]] [[package]]
name = "aws-smithy-xml" name = "aws-smithy-xml"
version = "0.58.0" version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcfe149c4afea01e25105c712d16295c0b604631e97914968e3f77af27d646f2" checksum = "97500a0d0884b9576e65076075f81d899cfbb84f7db5ca1dd317f0582204e528"
dependencies = [ dependencies = [
"xmlparser", "xmlparser",
] ]
[[package]] [[package]]
name = "aws-types" name = "aws-types"
version = "0.100.0" version = "0.101.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bee3e0dfe1b104957a49f17b5a77b1e783deac4dfd829f2718ca0437ac7b814" checksum = "61065f0c6070cb0f9aaddfa614605fb1049908481da71ba5b39b2ffca12f57e4"
dependencies = [ dependencies = [
"aws-credential-types", "aws-credential-types",
"aws-smithy-async", "aws-smithy-async",
@ -1263,6 +1264,16 @@ dependencies = [
"zeroize", "zeroize",
] ]
[[package]]
name = "crypto-bigint"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
"rand_core",
"subtle",
]
[[package]] [[package]]
name = "crypto-common" name = "crypto-common"
version = "0.1.6" version = "0.1.6"
@ -1275,9 +1286,9 @@ dependencies = [
[[package]] [[package]]
name = "crypto-mac" name = "crypto-mac"
version = "0.11.1" version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e"
dependencies = [ dependencies = [
"generic-array", "generic-array",
"subtle", "subtle",
@ -1530,7 +1541,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3"
dependencies = [ dependencies = [
"base16ct", "base16ct",
"crypto-bigint", "crypto-bigint 0.4.9",
"der", "der",
"digest 0.10.7", "digest 0.10.7",
"ff", "ff",
@ -5273,7 +5284,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
dependencies = [ dependencies = [
"crypto-bigint", "crypto-bigint 0.4.9",
"hmac 0.12.1", "hmac 0.12.1",
"zeroize", "zeroize",
] ]
@ -5865,9 +5876,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]] [[package]]
name = "subtle" name = "subtle"
version = "2.4.1" version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]] [[package]]
name = "syn" name = "syn"

View file

@ -13,12 +13,12 @@ rust-version = "1.70"
[dependencies] [dependencies]
async-stream = "0.3.4" async-stream = "0.3.4"
base32 = "0.4" base32 = "0.4"
aws-config = "0.100.0" aws-config = "0.101.0"
aws-sdk-s3 = "0.37.0" aws-sdk-s3 = "0.38.0"
aws-sdk-transcribestreaming = "0.37.0" aws-sdk-transcribestreaming = "0.38.0"
aws-sdk-translate = "0.37.0" aws-sdk-translate = "0.38.0"
aws-types = "0.100.0" aws-types = "0.101.0"
aws-credential-types = "0.58.0" aws-credential-types = "0.101.0"
bytes = "1.0" bytes = "1.0"
futures = "0.3" futures = "0.3"
gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" } gio = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "gio" }

View file

@ -40,7 +40,7 @@ enum StreamingState {
Started { Started {
url: GstS3Url, url: GstS3Url,
client: Client, client: Client,
size: u64, size: Option<u64>,
}, },
} }
@ -168,7 +168,11 @@ impl S3Src {
} }
} }
fn head(self: &S3Src, client: &Client, url: &GstS3Url) -> Result<u64, gst::ErrorMessage> { fn head(
self: &S3Src,
client: &Client,
url: &GstS3Url,
) -> Result<Option<u64>, gst::ErrorMessage> {
let head_object = client let head_object = client
.head_object() .head_object()
.set_bucket(Some(url.bucket.clone())) .set_bucket(Some(url.bucket.clone()))
@ -193,11 +197,11 @@ impl S3Src {
gst::info!( gst::info!(
CAT, CAT,
imp: self, imp: self,
"HEAD success, content length = {}", "HEAD success, content length = {:?}",
output.content_length output.content_length
); );
Ok(output.content_length as u64) Ok(output.content_length.map(|size| size as u64))
} }
/* Returns the bytes, Some(error) if one occurred, or a None error if interrupted */ /* Returns the bytes, Some(error) if one occurred, or a None error if interrupted */
@ -244,7 +248,7 @@ impl S3Src {
WaitError::Cancelled => None, WaitError::Cancelled => None,
})?; })?;
gst::debug!(CAT, imp: self, "Read {} bytes", output.content_length); gst::debug!(CAT, imp: self, "Read {:?} bytes", output.content_length);
s3utils::wait_stream(&self.canceller, &mut output.body).map_err(|err| match err { s3utils::wait_stream(&self.canceller, &mut output.body).map_err(|err| match err {
WaitError::FutureError(err) => Some(gst::error_msg!( WaitError::FutureError(err) => Some(gst::error_msg!(
@ -461,7 +465,7 @@ impl BaseSrcImpl for S3Src {
let state = self.state.lock().unwrap(); let state = self.state.lock().unwrap();
match *state { match *state {
StreamingState::Stopped => None, StreamingState::Stopped => None,
StreamingState::Started { size, .. } => Some(size), StreamingState::Started { size, .. } => size,
} }
} }

View file

@ -33,14 +33,14 @@ gst_plugin_webrtc_protocol = { path="protocol", package = "gst-plugin-webrtc-sig
human_bytes = "0.4" human_bytes = "0.4"
url = "2" url = "2"
aws-config = "0.100.0" aws-config = "0.101.0"
aws-types = "0.100.0" aws-types = "0.101.0"
aws-credential-types = "0.58.0" aws-credential-types = "0.101.0"
aws-sigv4 = "0.58.0" aws-sigv4 = "0.101.0"
aws-smithy-http = { version = "0.58.0", features = [ "rt-tokio" ] } aws-smithy-http = { version = "0.59.0", features = [ "rt-tokio" ] }
aws-smithy-types = "0.100" aws-smithy-types = "0.101"
aws-sdk-kinesisvideo = "0.37.0" aws-sdk-kinesisvideo = "0.38.0"
aws-sdk-kinesisvideosignaling = "0.37.0" aws-sdk-kinesisvideosignaling = "0.38.0"
http = "0.2" http = "0.2"
chrono = "0.4" chrono = "0.4"
data-encoding = "2.3.3" data-encoding = "2.3.3"

View file

@ -403,7 +403,7 @@ impl Signaller {
.expect("Failed to build valid request"); .expect("Failed to build valid request");
let (signing_instructions, _signature) = let (signing_instructions, _signature) =
sign(signable_request, &signing_params)?.into_parts(); sign(signable_request, &signing_params)?.into_parts();
signing_instructions.apply_to_request(&mut request); signing_instructions.apply_to_request_http0x(&mut request);
let url = request.uri().to_string(); let url = request.uri().to_string();