net/aws: fix spurious dispatch failures

Since https://github.com/awslabs/aws-sdk-rust/discussions/956, the AWS
SDK errors out HTTP streams that do not transfer data for more than 5
seconds.

This probably should be an opt-in bhevior as it clearly not generically
useful, but as it is we need to opt out.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1760>
This commit is contained in:
Mathieu Duponchelle 2024-08-30 16:30:28 +02:00 committed by GStreamer Marge Bot
parent 65508cfe75
commit bfc32cc692

View file

@ -21,6 +21,7 @@
use gst::subclass::prelude::*;
use gst::{glib, prelude::*};
use aws_sdk_s3::config::StalledStreamProtectionConfig;
use aws_sdk_transcribestreaming as aws_transcribe;
use futures::channel::mpsc;
@ -578,6 +579,9 @@ impl Transcriber {
.or_else(DEFAULT_TRANSCRIBER_REGION),
);
let config_loader =
config_loader.stalled_stream_protection(StalledStreamProtectionConfig::disabled());
let config = futures::executor::block_on(config_loader.load());
gst::debug!(CAT, imp = self, "Using region {}", config.region().unwrap());