Commit graph

1461 commits

Author SHA1 Message Date
Sebastian Dröge
6744497cf6 cea608tott: Don't zero-pad SRT indices but zero-pad hours to at least two digits
Zero-padding is not specified for the indices but all time components
need to be zero-padded (3 digits for fractional seconds, 2 digits for
everything else).
2022-03-28 12:50:57 +03:00
François Laignel
e50686d5db ts: log max throttling when creating Context 2022-03-28 12:50:57 +03:00
François Laignel
e7c62cb1f4 ts/jitterbuffer: don't wake up immediately...
... when next wakeup delay is shorter than the max throttling duration.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/169
2022-03-28 12:50:57 +03:00
François Laignel
0b615409ac ts/rt/Task: use light weight executor blocking on ack or join handle
Previous version used the Context::block_on_or_add_sub_task which
spawns a full-fledged executor with timer and io Reactor for no
reason when we just need to wait for a Receiver or JoinHandle.
2022-03-28 12:50:57 +03:00
François Laignel
a17cdf9903 ts/rt/Task: awake the iteration loop when it needs to be aborted
When the iteration loop is throttling, the call to `abort` on the
`loop_abort_handle` returns immediately, but the actual `Future`
for the iteration loop is aborted only when the scheduler throttling
completes. State transitions which requires the loop to be aborted &
which are serialized at the pipeline level can incur long delays.

This commit makes sure the Task Context's scheduler is awaken as soon
as the task loop is aborted.
2022-03-28 12:50:57 +03:00
François Laignel
35ec0fc41c ts/examples: add rtp mode with jitter-buffer & trace stop duration 2022-03-28 12:50:57 +03:00
Sebastian Dröge
7a02bf026d Update Cargo.lock 2022-03-28 12:50:57 +03:00
Guillaume Desmottes
e53515cc14 uriplaylistbin: fix deadlock when shutting down
The probes on srcpad was not removed which was preventing the element to
reach the NULL state.
2022-03-28 10:55:24 +02:00
Guillaume Desmottes
2f116591f0 uriplaylistbin: fix race when handling topology change
Keep the state mutex during the whole decodebin pad-added callback.
Fix a race when we were checking if state.waiting_for_ss_eos was set and
it was removed before we actually processed the item.

Fix #184
2022-03-28 10:53:56 +02:00
Sebastian Dröge
111257b81c Correctly check for the DISCONT buffer flag to be set 2022-03-21 13:50:07 +05:30
Arun Raghavan
026b0f9260 rusoto: s3sink: Expose property to control all timeout/retry durations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-21 13:50:07 +05:30
Arun Raghavan
724c6d6e32 rusoto: s3sink: Make remaining requests bounded in time
This implements a default timeout and retry duration for the remaining
S3 requests that were still able to be blocked indefinitely. There are 3
classes of operations: multipart upload creation/abort (should not take
too long), uploads (duration depends on part size), multipart upload
completion (can take several minutes according to documentation).

We currently only expose the part upload times as configurable, and hard
code the rest. If it seems sensible, we can expose the other two sets of
parameters as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-21 13:50:07 +05:30
Arun Raghavan
7b8d3acf10 s3src: Consolidate stream reading into get object retries
Previously, the actual reading from the streaming body of a GetObject
request was not within the same timeout/retry path as the dispatch of
the HTTP request itself. We consolidate these two into a single async
block and create a sum type to encapsulate the rusoto and std library
error paths within that future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-21 13:50:07 +05:30
Arun Raghavan
1ad277a410 rusoto: s3src: Implement timeout and retries
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/690>
2022-03-21 13:50:07 +05:30
Sebastian Dröge
191b1644d6 fallbacksrc: Flush source before restarting on errors
It might still be blocked downstream for a while, e.g. in the clocksync.

Flushing does not cause any problems as fallbackswitch is not going to
forward it and will only unblock everything up to there.
2022-03-21 13:50:07 +05:30
Arun Raghavan
930f51edbc rusoto: s3sink, s3src: Retry on server errors
We can retry in the case of 500/503/other errors that might occur that
might be recoverable, instead of bailing.
2022-03-21 13:50:07 +05:30
Ray Tiley
cab33768e2 awstranscribe - increase presisigned url duration to 5 mins from 60s
Have seen a few times where machines that are in perfect time sync with a good source the requests fail with `RequestExpired` errors.

https://docs.aws.amazon.com/transcribe/latest/dg/CommonErrors.html

While not perfect, bumping to five minutes gives more a chance that the signed requests to start streaming won't be expired.
2022-03-21 13:50:07 +05:30
Ray Tiley
602dbc7a02 [transcriberbin] - make audioqueue leaky
If transcription runs slow or has issues the queue can fill up and block
all audio processing. This gives the queue a sufficent buffer and allows
it to drop audio if it eventually fills up. This was most noticable with
bad internet connections using the `awstrnascriber` where it would take
quite a while for the websocket to eventually timeout and the bin to
enter `passthrough=true`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/688>
2022-03-21 13:50:07 +05:30
Sebastian Dröge
45c8f3d49d deny: Ignore duplicated wasi dependency 2022-03-21 13:50:07 +05:30
Sebastian Dröge
b01b9711dc Use SPDX license format in Cargo.toml 2022-03-21 13:50:07 +05:30
Seungha Yang
801d928aac transcriberbin: Don't notify signal inside lock
That can potentially cause deadlock
2022-03-21 13:50:07 +05:30
Seungha Yang
76f09860b1 transcriberbin: Add caption-source property
By using this new property, application can select exclusive caption
source. There are three source types
- Both: Inband and transcription captions are combined if exist.
  This is default behavior.
- Inband: Transcription buffers will be dropped
- Transcription: Caption meta of each video buffer will be dropped

In this version, transcriberbin doesn't provide any hint
for application to help caption source decision. That can be done
by application's strategy, passthrough status or probing inband
caption meta for example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/684>
2022-03-21 13:50:07 +05:30
Sebastian Dröge
210f2ccb38 Update Cargo.lock 2022-03-08 19:50:16 +02:00
Sebastian Dröge
b9887e1057 Update versions to 0.8.3 2022-03-08 19:49:16 +02:00
Sebastian Dröge
3da3c2591c Update Cargo.lock 2022-03-08 19:23:26 +02:00
Seungha Yang
ce24ca965e transcriberbin: Fix deadlock
Fix race between latency query handler and setup_transcription()
method.

Locking order of setup_transcription() is
state lock -> setup_transcription() -> settings lock
So taking state lock inside of setting lock in src_query()
can cause deadlock.
2022-03-08 19:23:26 +02:00
Sebastian Dröge
1c2d4d4350 rusoto: Update async-tungstenite dependency to 0.17 2022-03-08 19:23:26 +02:00
Sebastian Dröge
8747b569b7 audiofx: Update nnoiseless dependency to 0.4 2022-03-08 19:23:26 +02:00
Sebastian Dröge
cb0a67fc31 textwrap: Update for textwrap 0.15 API changes 2022-03-08 19:23:26 +02:00
Seungha Yang
88262e596d fallbacksrc: Disconnect signals on ReadyToNull
Otherwise multiple signal handlers will be connected to the source
2022-03-08 19:23:26 +02:00
Sebastian Dröge
29006999a4 fallbacksrc: Changing the URI of the video fallback is supported in NULL state
And not just during construction.

This fixes switching from a failing video fallback to a dummy fallback,
which was added in c7fe08bf6.
2022-03-08 19:23:26 +02:00
Arun Raghavan
249b0ac4c1 rusoto: s3sink: Implement timeout/retry for part uploads
Rusoto does not implement timeouts or retries for any of its HTTP
requests. This is particularly problematic for the part upload stage of
multipart uploads, as a blip in the network could cause part uploads to
freeze for a long duration and eventually bail.

To avoid this, for part uploads, we add (a) (configurable) timeouts for
each request, and (b) retries with exponential backoff, upto a
configurable duration.

It is not clear if/how we want to do this for other types of requests.
The creation of a multipart upload should be relatively quick, but the
completion of an upload might take several minutes, so there is no
one-size-fits-all configuration, necessarily.

It would likely make more sense to implement some sensible hard-coded
defaults for these other sorts of requests.
2022-03-08 19:23:26 +02:00
Guillaume Desmottes
930bfce629 ci: run tests with RUST_BACKTRACE
Handy to debug failing tests.
2022-03-08 18:58:34 +02:00
Guillaume Desmottes
94fce11b25 uriplaylistbin: display invalid state when panicing
Will help debugging failing tests such as #184
2022-03-08 18:58:25 +02:00
François Laignel
92ca54f0ba generic/threadshare: fix for nightly build 2022-03-08 18:58:09 +02:00
François Laignel
91ead3da7a ci: cargo test --all-features too...
... and replace the deprecated --all argument with --workspace.

Also use --all-targets so that code, unit tests, integration tests
and examples can all be compiled or tested in one go.
2022-03-08 18:57:56 +02:00
Guillaume Desmottes
54ebb1c254 fallbackswitch: properly handle GAP events
Handle GAP events from the active pad as activity and forward
downstream.
2022-03-03 15:10:20 +01:00
Guillaume Desmottes
4e7141f0e3 fallbackswitch: factor out handle_main_timed_item()
No semantic change, I'll re-use this to handle GAP events.
2022-03-03 15:09:18 +01:00
Guillaume Desmottes
e097feea1f fallbackswitch: add support for buffers without pts
Re-use the previously seen PTS.

Fix #186
2022-03-03 15:07:08 +01:00
Guillaume Desmottes
ac1c6e513e fallbackswitch: export GEnum used in properties
Rust applications will be able to use those directly.
2022-03-02 11:08:30 +01:00
Guillaume Desmottes
8c738b7a2e uriplaylistbin: disable test deadlocking 2022-03-02 11:08:30 +01:00
Sebastian Dröge
7d093ffcc6 Update Cargo.lock 2022-02-21 12:51:52 +02:00
Sebastian Dröge
4ef0fcd22e Update versions to 0.8.2 2022-02-21 12:51:40 +02:00
Sebastian Dröge
0a8f2164a3 ci: Use correct gstreamer-rs images template 2022-02-21 09:29:58 +02:00
Sebastian Dröge
b80ed2cc19 Update Cargo.lock 2022-02-20 23:02:48 +02:00
Sebastian Dröge
488b1fc5f5 deny: Remove num-rational override 2022-02-20 20:50:44 +02:00
Sebastian Dröge
171e6409c6 deny: Update 2022-02-20 20:50:34 +02:00
Sebastian Dröge
df16fdf1bc deny: Update 2022-02-20 20:50:34 +02:00
Sebastian Dröge
51ba558b21 dav1ddec: Use AtomicRefCell instead of Mutex for the state
It's only accessed from the streaming thread.
2022-02-20 20:50:02 +02:00
Sebastian Dröge
c25966ef6e dav1ddec: Fix compilation after some API changes 2022-02-20 20:49:42 +02:00