Commit graph

4179 commits

Author SHA1 Message Date
Piotr Brzeziński
91f3472bad gstwebrtc-api: Update ESLint, use JSDoc @import for types from docs
ESLint no longer supports the old type of config, it was automatically
migrated.

jsdoc/no-undefined-types has been raised to an error since it's been
found to hide other issues that only show up once that warning is
disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2049>
2025-03-14 07:42:40 +00:00
Piotr Brzeziński
d25c58ea6b gstwebrtc-api: Add ESM build artifact, fix compatibility with module-based environments
This lib was only being built for direct usage as a <script>, and so it
refused to work under any module-based approach, e.g. in a React
project.

Webpack will now build an ESM bundle alongside the old browser-only one.
This ensures broader compatibility, and has been tested in an Angular
project where this lib wasn't easily usable previously.

As a sidenote, the 'browser' field was broken because the string is
never interpolated. That was breaking build e.g. when trying to use our
lib with Angular. This has been replaced with a hardcoded string under
the 'module' field (because we don't ship separate browser/non-browser
bundles, the 'browser' field isn't necessary).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2049>
2025-03-14 07:42:40 +00:00
Piotr Brzeziński
f22e1f26ca gstwebrtc-api: Patch 'sdp' to ESM instead of CommonJS
Using non-ESM libs in some environments (e.g. Angular) can prevent some
optimizations from taking place. Doesn't hurt to change, considering ESM
seems like the current 'correct' way of building things.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2049>
2025-03-14 07:42:40 +00:00
Piotr Brzeziński
35a238b66f gstwebrtc-api: Improve JSDocs, add TypeScript type definitions
* Moves some parts of the docs around to make them better parseable by
JSDoc (e.g. @classdesc moved to the constructor gets rid of duplicated
doc page for the entire class)

* Gets rid of unnecessary manual assignment of methods/properties
example: @method GstWebRTCAPI#createConsumerSession
Due to a bug in JSDoc, it doesn't automatically pick up docs in classes
marked with 'export default class ...'. Just making the export separate
is enough to fix this. I suppose this bug was why every documented part
was manually assigned to each class, and this is no longer necessary.

* Removes forced GstWebRTCAPI namespace from docs
I'm not sure why things were left this way, but at least since
563eff1193 our classes aren't actually in
any namespace (well, maybe apart from SessionState?), you can import
them one by one and no such namespace is present anywhere. I removed
that, kind of as a byproduct of the point above.

* Removes external: from type references
This is problematic because JSDoc handles this fine, but any IDE I've
tried couldn't parse those references correctly from the JSDocs, and
neither could the TypeScript compiler when autogenerating type
definitions. After removing the external: prefix, all tooling is picking
those types up fine, but JSDoc's docs end up losing links when refering
to said types. I left the definitions in index.js, so that they still
show up in the sidebar and can be easily referred to.

* Adds TypeScript type definitions (d.ts)
Those are autogenerated by running `npx tsc` in the main dir and then
manually corrected by 1) removing all undocumented ('private') functions
and 2) writing definitions for the Listener interfaces which TS can't
automatically infer from JSDocs. This makes it much easier to use our
library in TypeScript-based projects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2049>
2025-03-14 07:42:40 +00:00
Sanchayan Maity
23c9b28ec7 hlsmultivariantsink: Allow specifying playlist/segment location for rendition & variants
Prior to this, the segment location was derived from the
multivariant playlist location and the template for the
segment was hard coded. Remove this restriction but note
that this also now requires users to specify the segment
and CMAF init track location per variant or rendition.

Do the same for media playlist location as well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2062>
2025-03-13 15:42:32 +00:00
Sebastian Dröge
7b73e8dc0e deny: Update with the latest dependency situation 2025-03-13 10:48:44 +02:00
Sebastian Dröge
962916c0c4 ci: Update cargo-outdated excludes 2025-03-13 10:48:44 +02:00
Thibault Saunier
1aee7b1670 doc: Update to latest way of generating hotdoc config files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2107>
2025-03-12 08:36:16 -03:00
Sebastian Dröge
826018a393 Update CHANGELOG.md for 0.13.5 2025-03-11 19:24:06 +02:00
Sebastian Dröge
5c912446a9 gtk4: Consider surface scale factor when proposing window dimensions
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/646

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2125>
2025-03-10 14:07:28 +02:00
Mathieu Duponchelle
780c724902 translationbin: expose read-only translator property on source pads
This lets users easily change the tokenization method on the translator
object for instance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2124>
2025-03-10 10:02:58 +02:00
Mathieu Duponchelle
ebcb8f220b transcriberbin: fix cea608mux start time selection
cea608mux is set to force-live=true, which means it will not wait for a
first buffer to select a start time.

There was however a problem when manually syncing the state of its
containing bin as we do: when doing so while the state of the containing
bin is still transitioning to Playing, the element first gets a 0 base
time distributed, before its containing bin finally gets the correct
base time and redistributes it.

In this interval cea608mux could pick a start time, then end up waiting
for ever to timeout.

This commit works around the issue by simply unlocking the state of the
inner bins but not syncing it when in Paused, as the subsequent state
change to Playing, if it happens, will trigger the state change of the
elements anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2115>
2025-03-07 16:24:21 +00:00
Mathieu Duponchelle
e31e5b2c6f transcriberbin: fix caption-source selection ..
with recent enough cccombiner.

Originally, dropping transcriptions was enough to support
caption-source=inband, as cccombiner did not implement output
scheduling.

However now that it does, even if no captions arrive on the caption pad
the combiner will still output padding.

Recent-enough combiners however expose an `input-meta-processing`
property which lets us achieve the desired behavior, we thus make use of
it when available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2115>
2025-03-07 16:24:21 +00:00
Mathieu Duponchelle
4397b1e8e1 awstranscriber2: fix PTS calculation with non-zero segment start
The time we get from AWS is a running time, and needs to be brought back
to the segment time domain before comparison with segment position and
usage as PTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2123>
2025-03-07 13:57:08 +01:00
Carlos Bentzen
1282593420 deny: update
- Add BSD-3-Clause-Clear to allowed licenses
- Add necessary `bans.skip` for duplicates.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/jobs/72366434

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2122>
2025-03-06 14:30:23 +01:00
Carlos Bentzen
6ba49c4dce vvdec: add VVdeC VVC/H.266 decoder element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1279>
2025-03-05 20:51:44 +01:00
Sebastian Dröge
e056d9244d Revert "quinn: Update to web-transport-quinn 0.5"
This reverts commit 50c2529904.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2120>
2025-03-04 15:28:06 +02:00
Sebastian Dröge
74c7cdb2d0 deny: Update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
62c213d8a1 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
2316a19544 rtsp: Update to lru 0.13
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
873ea52138 closedcaption: Update to itertools 0.14
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
2cd3d089aa Update to m3u8-rs 6
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
ceda820236 gtk4: Update to windows-sys 0.59
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
50c2529904 quinn: Update to web-transport-quinn 0.5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
8b59d76b52 tracers: Update to pcap-file 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-04 09:58:39 +02:00
Sebastian Dröge
370c162a06 net: Update to parse_link_header 0.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 16:51:23 +02:00
Sebastian Dröge
5de05bdd65 net: Update to xmltree 0.11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 16:49:46 +02:00
Sebastian Dröge
f3e8be80cb raptorq: Update to raptorq 2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 16:47:39 +02:00
Sebastian Dröge
18cdcaa2e0 net: Update to sprintf 0.4
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 16:45:21 +02:00
Sebastian Dröge
21947c28a6 videofx: Update image-hasher to 3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 16:42:09 +02:00
Sebastian Dröge
96cb31364e ci: Ignore libwebp-sys2 updates for now as it requires Rust 1.85
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 13:49:20 +02:00
Sebastian Dröge
e0fdbfa2c1 webp: Don't require default features of libwebp-sys2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2117>
2025-03-03 13:49:10 +02:00
Mathieu Duponchelle
5d83d27798 speechmatics: fix state cycling
The static source pad is added to the dynamic srcpads collection for
convenience, so when the state transitions back to NULL and state is
reset to its default, we need to make sure to re-add the static source
pad to the collection.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2072>
2025-02-26 17:00:13 +01:00
Mathieu Duponchelle
6b9e3fd772 awstranscriber2: fix initial position
Wait until we have received a first buffer before pushing gaps on
timeout, as we don't have a valid start time before that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2072>
2025-02-26 17:00:13 +01:00
Mathieu Duponchelle
d0db66d61e transcriberbin: implement dynamic language update
Previously, transcriberbin only supported updating translation languages
while playing by resetting the state of the transcriber to NULL
beforehand, as for instance the speechmatics transcriber needs to
reestablish a connection to request new languages.

Now that translationbin exists, we can request new languages without
restarting the transcriber (this commit also implements support for this
in translationbin).

There is some code duplication as the old method still needs to be
supported, and not all code was trivially factorizable, but after some
refactoring most of the code for updating languages is shared
nevertheless.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2072>
2025-02-26 17:00:13 +01:00
Brad Hards
2130c3bfbe mux/mp4: add image sequence mode
Image sequence is defined in ISO/IEC 23008-12 (HEIF), as a variant of
video. The key difference is that image sequence timing is advisory.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2101>
2025-02-26 13:56:09 +00:00
Sanchayan Maity
130e13a33e hlsmultivariantsink: Disable tests
Some of the test randomly fail in CI, disable the tests
till we can pin down the cause of CI failures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2112>
2025-02-26 13:26:08 +05:30
Thibault Saunier
e6f4b69aa2 cargo_wrapper: Force log file to be written in utf-8
We can hit https://gitlab.freedesktop.org/HuQian/gstreamer/-/jobs/71717584
otherwise, weirdly it never happened here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2111>
2025-02-25 07:39:46 +00:00
Thibault Saunier
50472dc22c pipeline-snapshot: Use user_cache_dir from the GLib
The 'dirs' crate doesn't behave the same leading to incompatibility

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1956>
2025-02-24 16:27:25 -03:00
Thibault Saunier
2a11f0b577 tracers: pipeline-snapshot: Add websocket support for dots-viewer
Allows connecting to a dots-viewer server instance to trigger pipeline
snapshots remotely through the web interface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1956>
2025-02-24 16:27:25 -03:00
Matthew Waters
ccf8adb6ae closedcaption: only increase dtvcc packet sequence if we have services
Otherwise, we can produce DTVCC packets that skip sequence numbers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2103>
2025-02-24 05:35:38 +00:00
Matthew Waters
3feb4fcf51 tttocea708: don't reset the service writer for every incoming caption
This will break when using pop-on captions

It's also not needed every single time and can be relegated to only when
changing services.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2103>
2025-02-24 05:35:38 +00:00
Sebastian Dröge
3d384bff62 mpegtslivesrc: Ignore NIT programs from the PAT
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2102>
2025-02-22 10:35:12 +00:00
Arun Raghavan
a34efda201 net/webrtc: Handle concurrent POSTs to whipserversrc
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/657
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2096>
2025-02-21 16:46:08 +00:00
Thibault Saunier
bd6be75107 tracer: Add memory tracer
Requires updating gstreamer-rs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2092>
2025-02-21 15:40:59 +00:00
Sebastian Dröge
93ee2ee70d Fix various new Rust 1.85 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2104>
2025-02-21 11:16:57 +02:00
Sebastian Dröge
4fdcba449e mpegtslivesrc: Take adaptation field discontinuity flag into account
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/653

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2084>
2025-02-20 10:46:30 +00:00
Sebastian Dröge
f77962937d mpegtslivesrc: Consider the initial calibration of the clock too
Previously we assumed that the calibration is always at the origin but
this is not necessarily true.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2084>
2025-02-20 10:46:30 +00:00
Sanchayan Maity
d2aceab54b hlsmultivariantsink: Serialise tests and increase channel timeout
Serialise the tests and increase the recv_timeout as it may
not be enough on the CI to do H264/H265 encoding for 1080p
streams which are we using for testing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2083>
2025-02-20 10:28:35 +05:30
eipachte
6165b3fe08 hlssink3: Write playlists atomically
We want to try to ensure that playlist files are written completely in a
single shot, to avoid the possibility of serving up a patially written
playlist.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2093>
2025-02-19 14:07:23 +00:00