Commit graph

3424 commits

Author SHA1 Message Date
Jordan Petridis
b9fcb99cd4 ci: Update the .cargo/config file
```
warning: `/builds/alatiera/gst-plugins-rs/.cargo/config` is deprecated in favor of `config.toml`
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1736>
2024-08-22 01:17:18 +00:00
Jordan Petridis
b4f22a52ff ci: Add a default retry policy for jobs
Automatically retry if it's a system failure or similar

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1736>
2024-08-22 01:17:18 +00:00
Mathieu Duponchelle
5dc2d56c0e webrtcsink: store mids per-session instead of globally
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1730>
2024-08-21 21:20:40 +00:00
Mathieu Duponchelle
16ee51621e webrtcsink: fix segment format mismatch with remote offer
webrtcsink was starting the negotiation process on Ready and concurrently
moving the consumer pipeline to Playing, but when answering the remote
description was set so fast that input streams were connected (and the time
format set on appsrc) before the state change to Paused had completed.

This meant gst_base_src_start was happening after that and setting the format
back to bytes, the time segment that was next coming in then caused:

basesrc gstbasesrc.c:4255:gst_base_src_push_segment:<video_0> segment format mismatched, ignore

And the consumer pipeline errored out.

The same issue existed in theory when webrtcsink was creating the offer,
but was much harder to trigger as it required that the remote answer
came in before the state change to Paused had completed.

This commit fixes the issue by simply waiting for the state to have
changed to Paused before negotiating.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1730>
2024-08-21 21:20:40 +00:00
Piotr Brzeziński
b6406013c5 hlssink3: Fix racy test by separating events (signals) from bus messages
Was regularly failing on the CI. Bus messages are handled async here, so they need to be tracked separately.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1737>
2024-08-21 19:49:09 +00:00
Mathieu Duponchelle
170e769812 audio: add speechmatics transcriber
Element implemented around the Speechmatics API:

<https://docs.speechmatics.com/rt-api-ref>

The element also comes with translation support, and offers a similar
interface to the one exposed by `awstranscriber`.

The Speechmatics service has good accuracy, and can be deployed on
premises, offering an advantage over AWS transcribe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1665>
2024-08-21 17:43:02 +00:00
Jordan Petridis
4f69dcd210 ci: Remove leftover scripts
Both of these have been moved in the main image for a while now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1733>
2024-08-21 06:44:52 +00:00
Piotr Brzeziński
982a9a9aea hlssink3: Post hls-segment-added message
Posts a simple 'hls-segment-added' message with the segment location, start running time and duration.
With hlssink2, it was possible to catch 'splitmuxsink-fragment-closed', but since hlssink3 doesn't forward that message
(and hlscmafsink doesn't even use that mux), the new one was added to allow for listening for new fragments being added.

I extended the existing tests to check whether this message is posted correctly.
They theoretically only cover hlssink3, but hlscmafsink uses the same base class so it should be alright for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1677>
2024-08-20 18:32:59 +00:00
Jordan Petridis
5172e8e520 ci: Use the windows specific image tags
Followup to c5dfc87953

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1731>
2024-08-20 17:21:20 +03:00
Sebastian Dröge
eb0a44fe67 ndisrc: Move timestamp handling from demuxer to source
This allows putting correct timestamps on buffers coming out of the
source already instead of leaving them unset until the demuxer.

And also calculate timestamps for metadata buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1718>
2024-08-16 06:07:35 +00:00
Mathieu Duponchelle
1c48d7065d gstwebrtc-api example: add support for requesting mix matrix
This is one example of how a consumer might send over custom upstream
event requests to the producer.

As webrtcsink will deserialize numbers in priority as integers, we need
a custom stringifying function to ensure members of the matrix array are
indeed serialized with the floating point.

An optional stringifier parameter is thus added to the
sendControlRequest API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1711>
2024-08-15 15:42:04 +00:00
Mathieu Duponchelle
01e28ddfe2 webrtcsink: implement generic data channel control mechanism ..
.. and deprecate data channel navigation in favor of it.

A new property, "enable-data-channel-control" is exposed, when set to
TRUE a control data channel is offered, over which can be sent typed
upstream events.

This means further upstream events will be usable, for now only
navigation and custom upstream events are handled.

In addition, send response messages to notify the consumer of whether
its requests have been handled.

In the future this can also be extended to allow the consumer to send
queries, or seek events ..

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1711>
2024-08-15 15:42:04 +00:00
Tim-Philipp Müller
0a4dc29efe ci: tag cerbero trigger job as placeholder job 2024-08-14 17:23:59 +01:00
Jordan Petridis
086281b03d ci: Update ci-template sha
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1721>
2024-08-14 18:23:48 +03:00
Mathieu Duponchelle
0a6963f7ce gstwebrtc-api: example: use http by default
That way the webpage connects with ws:/ to the signaller.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/589
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1704>
2024-08-14 14:10:04 +00:00
Sebastian Dröge
102185d09d mpegtslivesrc: Handle PCR discontinuities as errors for now
More work is needed to make this work seemlessly and right now it would
simply cause invalid timestamps to be created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1717>
2024-08-14 12:34:18 +00:00
Sebastian Dröge
ede82ca5b4 hlssink3: Don't use is-live=true
This sometimes produces imperfect timestamps that cause the fragment
duration to be slightly different than expected.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1716>
2024-08-14 13:05:40 +03:00
Tim-Philipp Müller
e21f341a03 ci: set cerbero trigger job timeout to 4h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1716>
2024-08-13 20:34:17 +01:00
Guillaume Desmottes
72e53b9f16 videofx: update image and image_hasher deps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1707>
2024-08-13 07:21:59 +00:00
Guillaume Desmottes
ea29052c39 cdg: update to image 0.25
I just published a new cdg_renderer release depending of image 0.25.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1707>
2024-08-13 07:21:59 +00:00
Jordan Petridis
3e97fef6ce ci: Generate html and cobertura coverage with a single command
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1709>
2024-08-13 06:41:17 +00:00
Sebastian Dröge
bc930122ba webrtcsrc: Make sure to always call end_session() without the state lock
This was already done in another place for the same reason: preventing a
deadlock. It's probably not correct as hinted by the FIXME comment but
better than deadlocking at least.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1701>
2024-08-13 06:04:09 +00:00
Mathieu Duponchelle
0da1c8e9c9 webrtcsink: fix assertions when finalizing
Dumping the pipeline on state changes from an async bus handler was
triggering criticals.

Instead, dump from the sync handler.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1706>
2024-08-12 09:13:06 +02:00
Sebastian Dröge
30a5987c9e rtp: mp4gpay: Don't set seqnum-base on the caps
This is supposed to be set by another layer, e.g. rtspsrc.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
de42ae432c rtp: basepay: Fix off-by-one with seqnum-offset
Setting a seqnum-offset of 1 would've caused the first packet to have a
seqnum of 2 instead of 1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
c5163a73ee rtp: basepay: Don't negotiate twice in the beginning
If srcpad caps are already set as part of sinkpad caps handling, unset
the reconfigure flag so negotiation does not happen yet another time on
the first buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
31e836f4d6 rtp: basepay: Negotiate SSRC and PT with downstream if not set via property
This makes the new payloaders closer to the old ones, and makes usage in
webrtcbin easier.

Also properly configure default PT of subclasses. Previously any PT that
was set for these subclasses via g_object_new() would be overridden by
the default one during construction.

Additionally, do SSRC collision handling while queueing output packets.
This is the more natural place as that's where the SSRC is actually
used, it happens potentially earlier and also allows to drain any
pending packets before the SSRC change in the caps.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/557

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
914ffc8be9 rtp: basepay: Initialize class fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
c554a5dc76 rtp: basepay: Don't unset stats on FlushStop
They are still valid and unsetting them here would cause no stats to
ever be updated again until the next state change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Sebastian Dröge
035a199109 rtp: basepay: Don't use suggested SSRC on collissions if it's the current one
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1693>
2024-08-10 08:06:40 +00:00
Mathieu Duponchelle
9080c90120 net/webrtc: add support for answering to webrtcsink
Support was added to the base class when the AWS KVS signaller was
implemented, but the default signaller still only supported the case
where the producer was creating the offer.

Also extend the javascript API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1702>
2024-08-09 14:02:48 +02:00
Mathieu Duponchelle
a9ff9615ff net/webrtc: correct signaller debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1702>
2024-08-08 18:28:43 +02:00
Mathieu Duponchelle
64f0b76f71 webrtc: update README with section on embedded signalling / web services
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1671>
2024-08-08 16:40:46 +02:00
Mathieu Duponchelle
9455e09d9f webrtcsink: expose properties for running web server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1671>
2024-08-08 16:40:46 +02:00
Mathieu Duponchelle
b709c56478 webrtcsink: expose properties for running signalling server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1671>
2024-08-07 19:55:00 +02:00
Sebastian Dröge
6c04b59454 webrtcsrc: Don't hold the state lock while removing sessions
Removing a session can drop its bin and during release of the bin its
pads are removed, but the pad-removed handler is also taking the state
lock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1695>
2024-08-07 09:35:15 +00:00
Sebastian Dröge
ec38d416aa fmp4mux: Remove _ prefix of actually used parameter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1694>
2024-08-07 11:16:51 +03:00
Sebastian Dröge
9006a47e9b mp4mux: added image orientation tag support
Based on a patch by sergey radionov <rsatom@gmail.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1694>
2024-08-07 11:16:25 +03:00
Guillaume Desmottes
cfe9968a77 gtk4: add custom widget automatically updating the window size
Use it in the example and debug window but let's not make it public yet.
Plan is to have a proper bin on top of gtk4paintablesink at some point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1680>
2024-08-06 10:29:41 +00:00
Guillaume Desmottes
17910dd532 gtk4: add window-{width,height} property
Allow the application to pass the actual rendering size so overlays can
be rendered accordingly.

Fix #562

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1680>
2024-08-06 10:29:41 +00:00
Sebastian Dröge
ba0265970e deny: Update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1691>
2024-08-06 09:10:08 +03:00
Sebastian Dröge
df330093d5 deny: Update to new configuration format
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1691>
2024-08-06 09:05:44 +03:00
Sebastian Dröge
b83b6031e5 Update etherparse and async-tungstenite dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1691>
2024-08-06 09:00:32 +03:00
Sebastian Dröge
184778d087 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1691>
2024-08-06 08:57:31 +03:00
Dave Lucia
3a949db720 net/webrtc: Fix turn-servers nick: user -> use
Noticed this typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1690>
2024-08-05 12:38:51 -04:00
Guillaume Desmottes
2333b241f0 gtk4: log paintable size in snapshot
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1689>
2024-08-05 15:53:19 +02:00
Sebastian Dröge
fa060b9fa0 Fix various 1.80 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1688>
2024-08-05 14:14:17 +03:00
Jordan Petridis
1316b821c4 video/gtk4: Move the dmabuf cfg to the correct bracket level
This was defined one bracket above, which was causing the
gst-gl codepath below to also be disabled when there was
no dmabuf feature enabled.

This was also resulting in the following warning as
we were never creating the MappedFrame::GL vartiant due to this

```
warning: unused variable: `wrapped_context`
   --> video/gtk4/src/sink/frame.rs:541:85
    |
541 | ...", feature = "gst-gl"))] wrapped_context: Option<
    |                             ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_wrapped_context`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: variant `GL` is never constructed
  --> video/gtk4/src/sink/frame.rs:80:5
   |
74 | enum MappedFrame {
   |      ----------- variant in this enum
...
```

Move the cfg to the appropriate place where it encaplsulates only
the dmabuf related code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1682>
2024-08-01 15:44:58 +03:00
Thibault Saunier
a05ab37b49 tracers: Add a tracer that dumps data flow into .pcap files
See documentation for more details

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/879>
2024-07-31 20:27:27 +00:00
Mathieu Duponchelle
86039dd5c1 webrtc-api example: do not rely on webpack / npm proxying websocket
Instead simply use the desired address directly from the reference
example, this makes it work out of the box without placing expectations
on the web server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1674>
2024-07-30 16:29:54 +00:00