Commit graph

3976 commits

Author SHA1 Message Date
Sebastian Dröge
03e9a9f0fe fmp4mux: Add support for AC-3 / EAC-3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2208>
2025-04-28 08:13:36 +00:00
Mathieu Duponchelle
8256601d1d webrtcsink: fix deadlock on encoder-setup
Switching to a lockable session re-introduced a similar deadlock to the
one fixed by f82a731b3a: we would call
encoder-setup with the session lock, the default handler would try to
lock the settings, thus not respecting the locking order (settings,
state, session).

We fix this by setting up the whole encoding chain outside of any locks,
then calling a reduxed version of Session.connect_input_stream() (sans
encoder-setup / payloader-setup signal calls).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
Mathieu Duponchelle
12e6922ac2 webrtcsink: fix deadlock on fast session removal
When a session was removed while its input streams were still getting
connected, a race condition was possible where:

* connect_input_stream was getting called from webrtcbin's pc thread
* the state of the pipeline was getting set to NULL in another thread
* connect_input_stream tried to sync state to NULL, and deadlocked
  because webrtcbin tried to stop its pc thread synchronously

This commit fixes this by making sure we hold the session lock when
setting the state of the pipeline to NULL, thus ensuring
`connect_input_stream` isn't getting called at the same time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
Mathieu Duponchelle
30a0b155fc webrtcsink: fix locking order
settings is always to be locked before state

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
Mathieu Duponchelle
7cf2736a15 webrtcsink: call webrtcbin:add-ice-candidate without session lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
Mathieu Duponchelle
5b01fdff8c webrtcsink: don't send messages on not-yet-opened data channels
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
Mathieu Duponchelle
783b75fef8 webrtc/signalling: don't error out on messages for unknown sessions
An error message is to be considered fatal by its receiver, but sending
it to webrtcsink when it sends a message for an unknown session leaves
it vulnerable to a race condition where the server has received an
endSession message from a consumer, but hasn't notified webrtcsink yet.

This commit simply removes the sending of an error message for unknown
sessions, it could instead send a new UnknownSession message, or revamp
the error message to include a code, but that isn't critically needed as
webrtcsink will anyway receive the endSession message eventually.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2215>
2025-04-25 13:52:23 +02:00
L. E. Segovia
655566e9e3 ci: Further deny AWS-related updates and fix related checks, part 2
- Add constraint on aws-smithy-runtime on aws and webrtc
- Downgrade aws-sdk-s3
- Drop aws-smithy-http 0.62
- Update cargo-outdated ignores
- Update Cargo.lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2214>
2025-04-23 12:00:53 -03:00
Sebastian Dröge
013f8dbd4f Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2213>
2025-04-23 13:12:55 +03:00
Sebastian Dröge
34875da4d1 rtsp: Update lru to 0.14
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2213>
2025-04-23 13:09:08 +03:00
Sebastian Dröge
e1080a0caf tracers: Update to etherparse 0.17
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2213>
2025-04-23 13:07:35 +03:00
L. E. Segovia
f376d3c1cd ci: Further deny AWS-related updates and fix related checks
- Downgrade aws-sigv4 to drop aws-smithy-http 0.62
- Update deny to ignore bitstream v2
- Update cargo-outdated ignores
- Update Cargo.lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2212>
2025-04-23 06:27:29 +00:00
Doug Nazar
52cf612ead gtk4: Avoid deprecated function with newer gtk
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2166>
2025-04-22 18:17:22 +00:00
Doug Nazar
a12b4e200c meson: Update to waylandegl feature
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2166>
2025-04-22 18:17:22 +00:00
Doug Nazar
ade1369db0 meson: Only add glib/gio/gtk features if required by enabled packages
If those features are requested, however no package has those as a
dependency, the compile will fail with error unable to find feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2166>
2025-04-22 18:17:22 +00:00
Sebastian Dröge
1ea767ac2a Update to bitstream-io 3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2211>
2025-04-22 07:21:56 +00:00
Philippe Normand
6f7a1e21d5 pcap_writer: Mark target-factory and pad-path props as construct-only
Otherwise the tracer's constructed() vfunc will emit a warning and will not
configure the tracer hooks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2209>
2025-04-20 10:24:13 +00:00
Sebastian Dröge
f5052e719f quinn: Update to web-transport-quinn 0.5 and disable aws-lc-rs
This reverts commit e056d9244d.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2199>
2025-04-19 05:50:39 +00:00
L. E. Segovia
397300a1ce Downgrade AWS SDK and aws-lc-rs
This locks the AWS SDK ecosystem to the version prior to making
aws-lc-rs the default TLS provider crate. This was done in the
March 11, 2025 release of the AWS SDK:

https://github.com/awslabs/aws-sdk-rust/releases/tag/release-2025-03-11

For future notes:

- once AWS sorts out their ballooning crate size, revert this commit and
  regen the lockfile
- if other crates need to be added/downgraded, check for the immediate
  version before adding the default-https-client feature, in https://lib.rs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2199>
2025-04-19 05:50:39 +00:00
L. E. Segovia
b8b703c519 Update Cargo.lock
This commit removes windows-targets 0.48.5 which does not build for
Windows 7 by updating the AWS Rust SDK; post March 11, 2025,
they've switched to using rustls for TLS, and bindgen is compulsory
for non-standard platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2199>
2025-04-19 05:50:39 +00:00
Sebastian Dröge
af33b050aa livesync: Only notify drop/duplicate properties
in/out can be observed more cheaply via pad probes and this mirrors the
behaviour of audiorate / videorate better, which also don't notify the
in/out properties.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2207>
2025-04-18 12:22:27 +03:00
Seungha Yang
731ceb58bd speechmatics: 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/2205>
2025-04-15 06:50:40 +09:00
Sebastian Dröge
2519b9e51d mp4mux: Handle the case of multiple tags per taglist correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2204>
2025-04-14 18:18:20 +03:00
Sebastian Dröge
16d03ed362 fmp4mux: Handle the case of multiple tags per taglist correctly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2204>
2025-04-14 18:18:06 +03:00
Sebastian Dröge
7dff55521e fmp4mux: Some debug output improvements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:21 +00:00
Sebastian Dröge
06f1a7e818 mp4mux: Write btrt box from the bitrate tags if existing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:21 +00:00
Sebastian Dröge
8b92f8c5c0 mp4mux: Handle orientation / language code tags received in the very beginning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:21 +00:00
Sebastian Dröge
8a65fd3b8b mp4mux: Handle stream/global orientation tags and handle flip orientations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
50022b76c0 mp4mux: Parse language code tags correctly as ISO 639-2T
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
7a9cb9d5da mp4mux: Handle tags in sink_event() instead of sink_event_prequeue()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
3224cf6f06 mp4mux: Store language tags per stream and not globally
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
269e469a7b fmp4mux: Correctly get ISO 639-2T language codes from the tags
The tags gives ISO 639-1 language codes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
800e4a579f fmp4mux: Only require header updates for caps/language/orientation if they actually changed
Also reject caps updates if they can't be handled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
c5e4181613 fmp4mux: Only allow caps-related header updates if header-update-mode=caps
In none mode nothing is expecting updated headers, in the other existing
modes the goal is to get an updated header at the end with the duration.

So add a new mode specifically for caps changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
f86e7e6c33 fmp4mux: Write btrt box from the bitrate tags if existing
Only take the tags into account that arrive before the muxer created its
streams, otherwise we would have to re-create the header every time the
bitrate changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
51987b6f1f fmp4mux: Write prft box into each fragment with the NTP / media time mapping if possible
The NTP time is based on the reference timestamp meta of the buffer that
has the start media time of the fragment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
a7f7b93ca0 fmp4mux: Add new start-fragment-sequence-number property
This allows configuring the sequence number used in the first mfhd and
defaults to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
dd6cf65a18 fmp4mux: Add new decode-time-offset property
This allows shifting the decoding timeline by changing the decode time
of all streams in the tfdt box.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
6ff5b8d019 fmp4mux: Add documentation for new send-force-keyunit property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2193>
2025-04-14 13:38:20 +00:00
Sebastian Dröge
594fbfd649 Fix various new clippy warnings because of the MSRV bump
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2203>
2025-04-14 13:35:43 +03:00
L. E. Segovia
13ea188b74 Bump MSRV to 1.83
To follow gtk-rs and gstreamer-rs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2203>
2025-04-14 13:35:14 +03:00
Sebastian Dröge
b4540e465b gtk4: Allow any windows-sys version >= 0.52 and <= 0.59
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2201>
2025-04-11 18:03:23 +03:00
Sebastian Dröge
be16479f95 threadshare: Clean up dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2201>
2025-04-11 18:03:23 +03:00
Sebastian Dröge
c37e0b2fa9 livesync: Notify in/out/drop/duplicate properties on change
And add a new silent property that defaults to false for disabling the
notifications, just like in audiorate and videorate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2200>
2025-04-11 11:31:51 +00:00
Mathieu Duponchelle
dd0b86bf11 ts-jitterbuffer: improve scheduling of lost events
When we have detected that packets are equidistant and have
determined a packet spacing, we can schedule lost events "on time"
instead of pushing them at the same time as the next received
packet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/756>
2025-04-10 10:31:27 +00:00
Mathieu Duponchelle
8dd8d67974 awstranslate: improve message posted on bus
* Include speaker if available

* Instead of directly using the raw string received from awstranslate,
  post-process it to remove spans and include per-item timestamps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2073>
2025-04-10 09:04:13 +00:00
Matthew Waters
4e64b63bfe tttocea708: fix origin-row handling for roll-up in CEA-708
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2191>
2025-04-10 04:21:07 +00:00
Mathieu Duponchelle
23afeb3258 transcriberbin: make auto passthrough work when transcriber is a bin
For instance, when using translation bin the source of an error message
might be the transcriber it contains, we should still go to passthrough
in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2165>
2025-04-09 18:42:38 +00:00
Jordan Petridis
15ef826bcf ci: Force git-fetch-with-cli on windows as well
We already do this on linux, do this on windows as well

We need this as git has better handling of redirects, and
we are running into issues after gitlab.freedesktop.org
switched to using a cdn proxy.

Similar to the original issue [1]

[1]: https://gitlab.freedesktop.org/gstreamer/gst-ci/-/issues/71

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2194>
2025-04-09 10:14:11 +03:00
Sebastian Dröge
916e946bf1 fmp4mux: Add manual-split mode that is triggered by serialized downstream events
The chunk / fragment duration properties are only used for configuring
the latency in this mode, and split-at-running-time splits have no
effect. Similarly, no force-keyunit events are sent in this mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2182>
2025-04-08 17:30:08 +03:00