We need to specify the rustls dependency explicitly configured with the
required feature/provider which in this case is ring. Without this the
selection of TLS back end can fail for HTTPS as rustls crate mandates
that either of ring or aws-lc-rs be selected explicitly via feature
flags or code.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2500>
Commit b01829ac3 switched speechmatics use of async-tungstenite to
rustls. However, this resulted in an error like below.
```
Could not automatically determine the process-level CryptoProvider from Rustls crate features.
Call CryptoProvider::install_default() before this point to select a provider manually, or make sure exactly one of the 'aws-lc-rs' and 'ring' features is enabled.
See the documentation of the CryptoProvider type for more information.
```
rustls crate requires that a specific provider be selected explicitly
by installing the provider manually which would require a code change
or specifying as an explicit dependency with the ring feature enabled.
Fix this by opting for the latter approach.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2502>
The code was lifted from the accumulator in `awstranslate`, this element
can be used to accumulate words and punctuation into complete sentences
(or sentence fragments) for synthesis and / or translation by further
elements downstream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2350>
The test has been seen failing on CI a couple of times. I ran it 5000 times
locally without failure. This commit attempts to prevent CI from failing by
waiting for the latency event then start counting 10 buffers before checking
the resulting latency.
Also fix confusing naming for the latency field in `InterSrc`.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2497>
This new example is built upon the existing `ts-standalone`:
* `ts-standalone` allows focusing on the overhead of threadshare specific
constructs. It uses a very light source element because buffer content is not
the concern in this case.
* `ts-standalone-rtprecv` aims at simulating a closer to real world use case:
it uses `ts-audiotestsrc` and `rtprecv`. `rtprecv` can push buffers either
from the upstream thread or from a blocking thread. Note that this example
intentionally drops buffers so `rtprecv` can exhibit both behaviours.
Reminders:
* Use `GST_DEBUG=ts-standalone*:4` to display statistics.
* Compile with `--release`.
* Compile with `--feature tunning` to get stats about the duration the
Throttling Scheduler at the sink spent parked.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2496>
Some state transitions relied on `block_on`, which caused a panic due to an
attempt to block while runing on a `Context` in the following situation:
* Upstream runs on a `Context`.
* Current threadshare element state is sync on parent in a `pad-added`
callback.
This commit:
* Uses `block_on_or_add_subtask` in all call sites where `block_on` was used.
* Renames `task::TransitionStatus::await_maybe_on_context` as
`block_on_or_add_subtask()`. Previous name didn't make it explicit it could
block. The new name matches the similar function in `executor`.
* Implements a new `block_on_or_add_subtask_then()` on `task::TransitionStatus`.
Compared to `block_on_or_add_subtask()`, it will also execute the provided
function after the transition occured or failed, whathever the executor being
used.
* Remove `task::TransitionStatus::block_on` as private: it shouldn't be used in
user code (it's still used in unit tests though).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2494>
If an upstream elements uses dmabufs - and supports the videometa -
but negotiated sysmem caps, try to use the dmabuf texture builder
for direct GPU buffer imports.
This is notably the case if a udmabuf allocator is used, but also
if elements support dmabufs but do not yet support the DMA_DRM API.
An example for the later is Snapshot on phones. On one hand its
current implementation around camerabin makes using DMA_DRM caps hard
without breaking capturing with software encoders, while on the other
hand importing buffers with GL/VK not only avoids a buffer upload/copy,
but also `DMA_BUF_IOCTL_SYNC` calls, which are potentially expensive
on aarch64. Finally importing dmabufs potentially allows offloading to
display planes.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2490>
The depfile generation was only handling lib.rs files, missing main.rs
files used by binary crates. This caused incomplete dependency tracking
for binary targets.
Also added debug logging to help diagnose issues with Cargo.toml
detection and stripped whitespace from source paths to handle parsing
edge cases.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2471>
When switching between branches that have different plugins or dependencies,
stale .d files from the previous branch can cause cargo to be unnecessarily
invoked on every build, even when no actual changes have been made.
This fix checks the modification time of dependency files against the current
build start time and ignores any .d files that weren't generated during the
current cargo run. This prevents spurious rebuilds when switching between
branches with different plugin configurations.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2471>
Allow the use of a single file for media. Media playlist will use byte
range tags like below while referencing the same single media file.
```
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="main.mp4",BYTERANGE="768@0"
#EXT-X-BYTERANGE:198120@768
#EXTINF:10,
main.mp4
#EXT-X-BYTERANGE:197426@198888
#EXTINF:10,
main.mp4
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
When an incoming buffer is received, a deadlock can occur if:
1. 1st buffer is currently being handled by the src pad's task
=> holds semaphore.
2. 1st buffer reaches downstream AudioDecoder => Latency query.
3. src pad's task still holding semaphore while relaying Latency query.
4. `src_query()` calls `Pad::default()` which calls `iterate_internal_links()`.
5. `iterate_internal_links()` tries to acquire the `state` `Mutex` which is
already locked by `handle_push_jitterbuffer()`.
This commit temporarily releases the `state` `Mutex` until the semaphore is
acquired.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2466>
When a threadshare element streams buffers to an element which synchronizes on
the clock or which uses a limited blocking queue, the threadshare context is
perdiodically blocked, preventing other async tasks from progressing.
One workaround is to use a regular `queue` with enough buffering to cope with
early buffers. This is suboptimal though because this `queue` doesn't propagate
backpressure upstream.
The `ts-blocking-adapter` applies an async backpressure when downstream blocks,
allowing the threadshare context to process other tasks. This is achieved by
having the 'sink' Pad forward serialized items (buffers, ...) to the 'src' Pad
Task (thread) via a rendezvous channel.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2427>