Commit graph

4268 commits

Author SHA1 Message Date
Sebastian Dröge
817d923459 analyticscombiner: Use NULL caps instead of EMPTY caps in the array for streams with no caps
EMPTY/ANY caps are not considered fixed caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2444>
2025-08-28 14:30:12 +00:00
Sanchayan Maity
fe23979a9a Switch reqwest to use rustls
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>
2025-08-28 18:42:09 +05:30
Olivier Crête
020efadd1f meta: Updated for GstMetaTransformCopy::new
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2508>
2025-08-28 15:28:57 +03:00
Sebastian Dröge
f953914238 deny: Update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2508>
2025-08-28 15:22:09 +03:00
Sebastian Dröge
bc0c1960cf Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2508>
2025-08-28 15:22:09 +03:00
Sebastian Dröge
ec4f00fa05 threadshare: Update to getifaddrs 0.5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2503>
2025-08-28 09:53:34 +00:00
Robert Mader
6f40cb0430 gtk4: Add 10/12/16bit SW decoder formats
See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/8330

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2408>
2025-08-28 09:17:46 +00:00
Sebastian Dröge
2876943bde mp4: Skip tests using x264enc if it does not exist
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/723

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2499>
2025-08-28 08:07:14 +00:00
Sanchayan Maity
788781e915 speechmatics: Specify rustls as an explicit dependency
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>
2025-08-28 11:59:16 +05:30
Mathieu Duponchelle
2732b0e543 text: implement new textaccumulate element
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>
2025-08-27 19:28:41 +02:00
Mathieu Duponchelle
18703abc0d translationbin: use textaccumulate element before tee
awstranslate no longer performs text accumulation, we can now do it only
once instead of once per translation language.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2350>
2025-08-27 17:30:35 +02:00
Mathieu Duponchelle
cfe167d2e1 awstranslate: remove text accumulation feature
Users should now place a `textaccumulate` element in front of the
translator in order to achieve the previous behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2350>
2025-08-27 17:30:35 +02:00
Sanchayan Maity
b01829ac35 speechmatics: Use rustls for async-tungstenite
We need to use rustls as without this, using rustls with
async-tungstenite fails to build in net/webrtc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2487>
2025-08-27 18:17:21 +05:30
Sanchayan Maity
83ed0bed76 webrtcsink: Fix typo in doc comment for web-server-path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2487>
2025-08-27 18:17:21 +05:30
Sanchayan Maity
bbfe378e33 webrtc: Migrate to warp 0.4 and switch to tokio-rustls
warp 0.4 dropped support for TLS. tokio_native_tls seems unmaintained
along with which our use of PKCS#12 was problematic. See the below two
issues.

- https://github.com/sfackler/rust-native-tls/issues/27
- https://github.com/FiloSottile/mkcert/pull/58#issuecomment-451782395

PKCS#12 is also completely unusable on any modern system failing with
the error referenced in the below issue.
- https://github.com/tokio-rs/tls/issues/152

While this is a breaking change from the point of view of PKCS#12 not
being usable any more, use of PKCS#12 meant none of the TLS stuff has
been functional for the signalling server anyway.

We already depend on rustls one way or another and async-tungstenite
also supports rustls. Switch to tokio-rustls/rustls for TLS usage.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/715
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2487>
2025-08-27 18:17:20 +05:30
Sanchayan Maity
c3890ffa4e webrtcsink: Fix uri and cafile property setting for signaller
When run-signalling-server is true, if a certificate is provided,
signaller uri should use wss and the cafile property should also
be set to use this certificate.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/633
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2487>
2025-08-27 16:26:43 +05:30
Sanchayan Maity
69d4a2bbdc webrtc: Update the documentation for using embedded web services
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2487>
2025-08-27 16:26:43 +05:30
Mathieu Duponchelle
7f0ec3e87c elevenlabssynthesizer: improve gap handling in non-clip overflow modes
In these modes, we might output audio with a longer duration than the
input text. Take this into account when forwarding gaps, if at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2493>
2025-08-27 09:29:26 +00:00
François Laignel
c1e9d034bc threadshare: fix ts-inter test one_to_one_up_first
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>
2025-08-26 22:09:14 +02:00
François Laignel
3fec94a234 threadshare: examples: add a new benchmark program
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>
2025-08-26 20:19:20 +02:00
François Laignel
0f87d52d0d threadshare: always use block_on_or_add_subtask
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>
2025-08-26 18:48:55 +02:00
Robert Mader
5d976540b3 gtk4: Try importing dmabufs withouth DMA_DRM caps
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>
2025-08-24 16:45:23 +02:00
Robert Mader
b2ae5dfa54 gtk4: Add debug logs for frame type
Since commit 7b561354 it is easy - and helpful for development
and debugging.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2490>
2025-08-23 17:06:17 +02:00
r4v3n6101
de26c2d58b rtmp4gdepay2: fix condition while creating parser
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2441>
2025-08-22 08:05:33 +00:00
François Laignel
db8dabf195 threadshare: update examples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2484>
2025-08-20 18:05:08 +02:00
Thibault Saunier
9dcb2afaf7 cargo_wrapper: Fix depfile generation for binaries and add debug logging
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>
2025-08-20 06:51:33 +00:00
Thibault Saunier
738de23ef8 cargo_wrapper: Ignore stale dep files from previous branch builds
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>
2025-08-20 06:51:33 +00:00
Thibault Saunier
c1712113a9 cargo_wrapper: Fix log file name
We were using the same log files for bins and plugins

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2471>
2025-08-20 06:51:33 +00:00
Thibault Saunier
04e9660c26 cargo_wrapper: Reindent and cleanup
This commit should go into a new .git-blame-ignore-revs file when we have the
final hash

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2471>
2025-08-20 06:51:33 +00:00
Tim-Philipp Müller
01b8303b5c threadshare: blocking_adapter: fix Since marker in docs
Should be 0.14.2 since it has been backported to the 0.14 branch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2479>
2025-08-20 06:21:17 +00:00
François Laignel
829cc21696 threadshare: inter: update doc example
Use recent improvements:

* `ts-audiotestsrc` can now be used properly.
* `ts-blocking-adapter` must be used before a blocking element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2477>
2025-08-19 16:49:24 +02:00
François Laignel
243a8a93ea threadshare: have Task log its obj
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2476>
2025-08-19 13:38:51 +02:00
Sebastian Dröge
a005cf8e05 fallbacksrc: Don't keep CustomSource state locked while adding/removing pads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2474>
2025-08-18 13:08:07 +03:00
Sebastian Dröge
6fb729d771 fallbacksrc: Don't lock CustomSource state lock twice when exposing pads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2474>
2025-08-18 13:07:51 +03:00
Thibault Saunier
90cc117095 ci: Re enable skia as https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/692 was fixed
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2472>
2025-08-14 22:39:51 -04:00
Sanchayan Maity
3e291611b2 Update docs for hlssink3 plugin to include single media file property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 20:02:14 +05:30
Sanchayan Maity
bd30823dbb hlssink3: Add fmp4 plugin as a dependency for hlscmafsink tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 20:02:14 +05:30
Sanchayan Maity
1f68cf4f44 hlssink3/hlscmafsink: Make GioOutputStream a sub-class of OutputStream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 20:02:14 +05:30
Sanchayan Maity
917e1f5885 hlssink3/hlscmafsink: Add test for validating non-overlapping byte range
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 20:02:14 +05:30
Sanchayan Maity
a8684853d0 hlssink3/hlscmafsink: Add byte range tag information to hls-segment-added message
While at it, for tests, replace unreachable!() with panic!() and print
the error message contents.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 20:02:14 +05:30
Sanchayan Maity
efbfab76bc hlssink3/hlscmafsink: Add tests for single media file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2439>
2025-08-14 19:24:50 +05:30
Sanchayan Maity
2539a59b99 hlssink3/hlscmafsink: Support the use of a single media file
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>
2025-08-14 19:24:50 +05:30
François Laignel
8ec5d0995f rtprecv: fix race condition on first buffer
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>
2025-08-13 18:20:23 +00:00
François Laignel
e4e14cf5ca threadshare: intersink: return from blocking tasks when stopping
This commit cancels blocking tasks when the element is requested to stop.
This is to prevent deadlocks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2465>
2025-08-13 17:47:18 +00:00
François Laignel
458e59979f threadshare: inter: store upstream latency in InterContext
... instead of retrieving the element following the sink pad.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2465>
2025-08-13 17:47:18 +00:00
François Laignel
c9334b218f threadshare: add a blocking adapter element
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>
2025-08-13 17:04:54 +00:00
Sebastian Dröge
61578518d4 transcriberbin: Fix settings/state lock order violation in set_property()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2463>
2025-08-13 13:57:35 +03:00
Sebastian Dröge
9710476c96 transcriberbin: Don't keep state locked while querying upstream latency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2463>
2025-08-13 13:57:17 +03:00
François Laignel
357336cd56 threadshare: audiotestsrc: fix setting samples-per-buffer...
... by not locking `settings` twice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2461>
2025-08-12 12:49:31 +02:00
Mathieu Duponchelle
75e2582802 tttocea708/translate: improve logic for prepending spaces
No space needs to be prepended after inserting a carriage return or
clearing the screen.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2345>
2025-08-11 18:21:55 +00:00