Commit graph

4227 commits

Author SHA1 Message Date
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
Mathieu Duponchelle
4ad8295ae3 tttocea708: implement the same behavior as tttocea608 on speaker change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2345>
2025-08-11 18:21:55 +00:00
Mathieu Duponchelle
db8d0e90c9 tttocea608: expose speaker-prefix property
When set, the value will be used to prefix the new line when outputting
a carriage return after a speaker change in roll-up mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2345>
2025-08-11 18:21:55 +00:00
Thibault Saunier
abc5cf7303 rtpgccbwe: avoid clamp() panic when min_bitrate > max_bitrate
Prevent calling clamp() with invalid bounds where min > max, which would
cause a panic with "assertion failed: min <= max". This panic would poison
the mutex lock, causing all subsequent lock().unwrap() calls to fail with
PoisonError.

This can happen when min-bitrate and max-bitrate properties are set
individually, creating a temporary inconsistent state between the values.

Fix by validating the bitrate range before calling clamp() and using
max_bitrate for both bounds when min > max to ensure safe operation.
Use LogContext to log the error only once per unique invalid pair.

Fixes #711

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2456>
2025-08-11 11:29:11 -04:00
Sebastian Dröge
2336688c8a fallbacksrc: Don't restart source if the element is just being shut down
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2455>
2025-08-11 16:40:37 +03:00
Seungha Yang
ef3c03074a aws: Ensure task stopping on paused-to-ready state change
Disconnect channel so that srcpad task can stop immediately

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2440>
2025-08-11 11:59:52 +00:00
Sebastian Dröge
a41a6954fc fallbacksrc: Don't panic during retries if the element was shut down in parallel
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2451>
2025-08-11 14:30:42 +03:00
Sebastian Dröge
9861f682e6 s302mparse: Add new S302M audio parser
This extracts metadata from an S302M audio stream and interpolates PTS
as needed, but still requires a properly packetized stream from
upstream.

Parsing S302M without packetization is not easily possible because of
the lack of synchronization markers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2435>
2025-08-11 08:33:18 +00:00
Sebastian Dröge
8270a44192 Update CHANGELOG.md for 0.14.1 2025-08-10 22:06:30 +03:00
Sebastian Dröge
512f655b1d Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2448>
2025-08-10 11:39:40 +00:00
Sebastian Dröge
d1b2c3a2e9 Update to async-tungstenite 0.31
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2448>
2025-08-10 11:39:40 +00:00
Tim-Philipp Müller
ece7013e71 README: add missing plugins
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2443>
2025-08-10 09:26:31 +00:00
Tim-Philipp Müller
9ac981b731 ci: add script to check README against plugins list
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2443>
2025-08-10 09:26:31 +00:00
Sebastian Dröge
e52dedcf38 analytics: Ignore some tests that fail due to core changes until fixed
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2444
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9522

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2442>
2025-08-10 09:31:29 +03:00
Sebastian Dröge
97ed00c8cd docs: Update plugins cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2442>
2025-08-08 17:12:56 +03:00
Sebastian Dröge
860b8fc241 Don't suggest running cargo cinstall after cargo cbuild
That will build everything twice as `cargo cbuild` builds with the dev
profile by default and `cargo cinstall` uses the release profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2442>
2025-08-08 16:48:51 +03:00
Sebastian Dröge
a8be57a742 Fix various new clippy 1.89 warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2436>
2025-08-07 12:26:54 +00:00
Thibault Saunier
4e7d42c16e tracers: pipeline-snapshot: reduce WebSocket connection log level
Change WebSocket connection failure log from warning to debug level as
these retries are expected behavior and don't indicate an error condition.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2433>
2025-08-06 10:41:51 -04:00
Sebastian Dröge
aa4d9333b9 threadshare: Also enable windows Win32_Networking_WinSock feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2431>
2025-08-06 11:09:59 +00:00
François Laignel
fe4e355b9e webrtc: android example: remove videoconvert
The `glimagesink` can handle video conversion just fine, we don't need to use
a `videoconvert` in that branch.

This commit also moves the `handle_media_stream()` branches within
`on_incoming_stream()` as the factorization is no longer justified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2216>
2025-08-06 10:42:36 +00:00
François Laignel
6ef4a8de4c webrtc: android example: fix media handling initialization sequence
The way media handling was implemented was suboptimal:

* The media elements were linked after being synchronized with their parent.
  Any initial queries would fail.
* The window handle was initialized after the video elements were linked and
  synchronized with their parent. It was not available at GL context creation,
  but assigned afterwards.

This commit fixes the above. The behaviour is unchanged, but it makes more sense
in my opinion.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2216>
2025-08-06 10:42:36 +00:00
François Laignel
dccdda96b6 threadshare: queue & proxy: fix race condition stopping
When stopping `ts-queue` & `ts-proxysink`, the pending queue is removed. There
is a short period of time when a buffer can be handled after the pending queue
is removed but before the element is actually stopped. Since the dataqueue no
longer accepts buffers and the pending queue is removed, a new pending queue was
created and the element was set to wait for queue space.

The stopping procedure is handled with `last_res` `Mutex` locked and set to
`Flushing`.

This commit adds a check to `last_res` before creating a new pending queue and
aborts if the element is `Flushing`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2428>
2025-08-06 08:26:04 +00:00
Sebastian Dröge
b61d790081 threadshare: Enable windows Win32_Networking feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2420>
2025-08-06 07:30:08 +00:00
Mathieu Duponchelle
0578eb49cf awstranslate: expose property for turning brevity on
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2406>
2025-08-05 15:08:10 +00:00
Seungha Yang
e314b2e591 awstranslate: Handle multiple stream-start event
Do not spawn new task loop with channel if we have one already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2404>
2025-08-05 14:26:38 +00:00
Seungha Yang
00b7ebab48 awstranscriber2: Handle multiple stream-start event
Do not spawn new task loop with channel if we have one already.
The same change as 731ceb58bd
for awstranscriber2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2404>
2025-08-05 14:26:38 +00:00
Mathieu Duponchelle
47a3d4a37f speechmatics: expose mask-profanities property
When enabled, words tagged as profanities are replaced with an
equal-sized amount of "*"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2344>
2025-08-05 11:46:22 +00:00
Taruntej Kanakamalla
4e2c16a2af Revert "threadshare: udp: avoid getifaddrs in android"
This reverts commit 75a0baa6fa.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1918>
2025-08-05 11:20:06 +00:00
Xavier Claessens
78c8d4df55 webrtcsink: Move videorate before videoconvert and videoscale
Since videorate has drop-only=true, this could reduce the number of
frames to convert and scale.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2402>
2025-08-05 10:56:54 +00:00
Sanchayan Maity
44a632811e hlsmultivariantsink: Update version tag in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2415>
2025-08-05 13:07:11 +05:30
Sanchayan Maity
750fd2c589 hlsmultivariantsink: Fix master playlist version
hlscmafsink already uses version 6 as use of tags like EXT-X-MAP
require version 5 and above.

As per RFC 8216, the value of EXT-X-VERSION tag (Section 4.3.1.2)
SHOULD NOT be greater than what is required for the tags & attributes
in the Playlist (see Section 7).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2415>
2025-08-05 13:07:11 +05:30
Sebastian Dröge
45c30065a7 tracers: Update to etherparse 0.19
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2414>
2025-08-05 09:59:48 +03:00
Sebastian Dröge
9ccf887553 mpegtslivesrc: Remove leftover debug message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2412>
2025-08-04 16:30:55 +03:00
François Laignel
907fca2aa2 threadshare: fix regression in ts-proxysrc
This [MR] introduced a race condition when the `ts-proxysink` started pushing
items before `ts-prosysrc` had started.

This commit reverts the changes to `ProxySrcTask::start`: wake up the pending
queue when starting the task. Also applies this to `ts-queue` even though the
race condition is less likely to happen.

[MR]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2400

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2405>
2025-07-30 16:24:48 +02:00
François Laignel
21578ccb83 threadshare: fix flush for ts-intersrc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2400>
2025-07-29 20:40:48 +02:00
François Laignel
ecc198e5c2 threadshare: fix flush for ts-queue ts-proxy
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2400>
2025-07-29 20:40:48 +02:00
François Laignel
9f4a8d3eeb tracers: queue-levels: add support for threadshare DataQueue related elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2399>
2025-07-29 15:55:00 +02:00
François Laignel
2f10e6e23f threadshare: add cur-level properties to DataQueue related elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2399>
2025-07-29 15:55:00 +02:00
Seungha Yang
42a72d034e transcriberbin: Release lock before forwarding caps event
Don't hold lock while sending caps events

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2398>
2025-07-28 14:56:03 +00:00
Seungha Yang
37a5acc788 transcriberbin: Fix handling of upstream latency query
Forward latency query upstream instead of downstream.
Fix regression introduced by 4074f4c275

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2398>
2025-07-28 14:56:03 +00:00
Matthew Waters
f55641f5ca ceaX08overlay: support ANY caps features
Allows e.g. memory:GLMemory as long as meta::GstVideoOverlayCompositionMeta is
supported downstream.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/710
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2390>
2025-07-25 01:33:57 +00:00
Mathieu Duponchelle
9451c821ae cea708mux: expose "discarded-services" property on sink pads
This can be useful when muxing in an original caption stream with
a newly-created one (eg transcription / translation), in which case one
might wish to discard select services from the original stream in order
to avoid garbled captions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2389>
2025-07-24 14:41:01 +00:00