Commit graph

889 commits

Author SHA1 Message Date
Thibault Saunier
4764058efa webrtcsrc: Add a 'connect-to-first-producer' property
This is an helper property which allows to avoid requiring to know
peer IDs, which is very useful during development.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/386
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2000>
2024-12-20 10:51:25 +02:00
Mathieu Duponchelle
c2c8423e7f 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/1992>
2024-12-16 15:14:41 +00:00
Mathieu Duponchelle
0ab583c3aa 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/1991>
2024-12-16 13:59:51 +00:00
Mathieu Duponchelle
9e848d3b75 webrtcsink: add nvh265enc support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1981>
2024-12-11 13:13:42 +00:00
Taruntej Kanakamalla
6cf39d4a00 webrtc: use the nick to set enum type properties on openh264enc
The properties `rate-control` and `complexity` are of enum types and passing
a gint value is resulting in a panic. So pass the corresponding nick of the enum
value instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1971>
2024-12-05 17:17:51 +00:00
Guillaume Desmottes
625eeccf25 webrtc: janus: handle slowlink event
Fix this warning:

webrtc-janusvr-signaller imp.rs:426:gstrswebrtc::janusvr_signaller:👿:Signaller::handle_msg:<GstJanusVRWebRTCSignallerU64@0x7f317009b4d0> Unknown message from server: {
   "janus": "slowlink",
   "session_id": 980554280060589,
   "sender": 5867141593320621,
   "mid": "video0",
   "media": "video",
   "uplink": false,
   "lost": 15
}

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1967>
2024-12-04 13:05:26 +00:00
Guillaume Desmottes
8434126a58 webrtc: janus: handle slow_link videoroom event
Fix this warning:

webrtc-janusvr-signaller imp.rs:426:gstrswebrtc::janusvr_signaller:👿:Signaller::handle_msg:<GstJanusVRWebRTCSignallerU64@0x7f317009b4d0> Unknown message from server: {
   "janus": "event",
   "session_id": 980554280060589,
   "sender": 5867141593320621,
   "plugindata": {
      "plugin": "janus.plugin.videoroom",
      "data": {
         "videoroom": "slow_link",
         "current-bitrate": 0
      }
   }
}

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1967>
2024-12-04 13:05:26 +00:00
Mathieu Duponchelle
f8178fbd21 webrtscink: fix deadlock when answering
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/637
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1959>
2024-12-02 16:49:18 +00:00
Ruben Gonzalez
0821c39640 webrtcsink: add openh264enc support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1957>
2024-11-29 23:08:45 +00:00
Sebastian Dröge
3cccede612 webrtcsink: Set caps-change-mode=delayed on encoder capsfilter
Otherwise when changing the target caps (e.g. for reducing quality)
there is a race condition between buffers between the converter elements
and renegotiation.

For example, videoconvertscale might've output a 1920x1080 buffer, then
the capsfilter is configured to 1280x720, the buffer arrives in
videorate, videorate notices that renegotiation is pending, tries to
renegotiate and ends up with EMPTY caps because it can only change the
framerate but not the resolution.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1951>
2024-11-29 12:39:20 +00:00
Matthew Waters
0537734aee webrtcsink: don't block the tokio runtime while holding state lock in unprepare()
It is possible that in unprepare(), waiting for a task to complete while
holding the state lock, that task may be waiting to acquire the state lock and
result in a deadlock.

This is quick to reproduce when starting and stopping webrtcsink in very quick
succession.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1932>
2024-11-28 16:44:05 +11:00
Xavier Claessens
52f48d7279 webrtcsink: Ignore more fields in caps change
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1940>
2024-11-27 12:18:33 +00:00
Sebastian Dröge
d032c52ff5 mpegtslivesrc: Fix mismatch between internal / external time usage
Previously the internal time was stored as base offset for calculating
the external time from the PCR, which resulted in disconts being
detected wrongly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1934>
2024-11-21 12:55:36 +00:00
Sebastian Dröge
5fe4d948bf mpegtslivesrc: Rename variables to make it clear which time domain they refer to
We have the internal time domain (monotonic clock) and the external time
domain (scaled monotonic clock in the rate of the PCR).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1934>
2024-11-21 12:55:36 +00:00
Sebastian Dröge
be2b4952d2 Update to async-tungstenite 0.28
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1905>
2024-11-02 12:34:43 +02:00
Sebastian Dröge
1afe165fce Update async-tungstenite dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1905>
2024-11-02 12:34:11 +02:00
Xavier Claessens
634ec19e24 janusvr_signaller: Do not block in end_session()
Only stop() is allowed to block, wait there.

Fixes #603

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1903>
2024-11-01 15:11:17 +00:00
Mathieu Duponchelle
4d75091e91 awstranscriber: post warning message with details when item is late
When the latency is configured to a value that is too low, items will be
pushed out with an adjusted timestamp, thus affecting synchronization.

It can be useful for the application to receive details about those
adjustments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1897>
2024-10-29 11:36:07 +00:00
Sebastian Dröge
da634989d9 Update to quick-xml 0.37
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1893>
2024-10-29 06:51:38 +00:00
Sebastian Dröge
d9664d77b0 mpegtslivesrc: Parse PAT/PMT and only handle PCRs from the first program
This matches default behaviour of tsdemux and makes sure we're not
jumping between different PCRs if there are multiple.

At a later time, program selection could be implemented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1894>
2024-10-28 13:25:43 +00:00
Jerome Colle
05e3c4a5a3 rtpbasedepay2: fix reference timestamp meta duplicates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1892>
2024-10-28 12:05:54 +00:00
Sanchayan Maity
199995201c net/quinn: Specify crypto provider explicitly
rustls allows the choice of ring or aws-lc-rs as the cryptographic
library implementation. This is enabled/selected via Cargo feature
flags. We have plugins directly or indirectly depending on rustls
like quinn, aws and spotify. In the presence of multiple plugins,
selecting different implementations as the default, rustls can
panic.

The safest way to avoid this is by using builder_with_provider
and selecting a provider explicitly.

See below issues for further discussion and clarifications.
https://github.com/rustls/rustls/issues/1877
https://github.com/seanmonstar/reqwest/pull/2225

While at it, also specify features explicitly for quinn and rustls.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1884>
2024-10-28 11:10:03 +00:00
Sebastian Dröge
d10a7224e1 Update to quick-xml 0.36
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1885>
2024-10-28 09:33:11 +02:00
Sebastian Dröge
07f7730632 aws: Allow a deprecated BehaviourVersion for now
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1873>
2024-10-22 20:21:55 +00:00
Sebastian Dröge
347b5987bd Fix a couple of type hierarchy bugs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1873>
2024-10-22 20:21:55 +00:00
Sebastian Dröge
6c0bfd3ffc webrtc: Silence two new Rust 1.82 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1874>
2024-10-22 19:29:28 +00:00
Sanchayan Maity
9c640c8bc3 net/quinn: Fix panic due to unset default crypto provider
Fix CI failure that we see after the upgrade of rustls from
0.23.13 to 0.23.15.

Related docs/PR
https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html#using-the-per-process-default-cryptoprovider
https://github.com/quinn-rs/quinn/pull/1882

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1866>
2024-10-21 10:31:36 +00:00
Sebastian Dröge
e824ac31f4 reqwesthttpsrc: Allow a server error after a seek
There might be a server error because a seek would immediately close the
old connection without allowing for clean shutdown.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1863>
2024-10-18 17:48:42 +00:00
Mathieu Duponchelle
2790fb41b2 webrtcsink: fix session not in place errors
The InPlace/Taken logic was introduced to avoid using an extra lock
around the session, but it places expectations that are not always
obvious to meet around when a session is expected to be taken or not.

Any code that expects to have access to the sessions at all times thus
needs either extra logic in the session wrapper, or to maintain the
state of the session outside of the session (eg mids).

This commit removes the logic, and wraps sessions in Arc<Mutex>>.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1859>
2024-10-18 10:53:16 +00:00
Chris Bainbridge
f5b90ba261 custom-signaller: add missing manual-sdp-munging property
All signallers must now implement this property

Fixes #611

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1858>
2024-10-18 09:33:42 +00:00
Guillaume Desmottes
57234522ec webrtc: janus: add 'janus-state' property to the sink
This property can be used by applications to track the state of the
signaller, especially to know when the stream is up.

Fix #510

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1849>
2024-10-10 16:56:25 -04:00
Guillaume Desmottes
6cc9945d4e webrtc: janus: fix typo in doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1849>
2024-10-10 16:43:23 -04:00
Mathieu Duponchelle
5958e342c7 webrtcsink: fix naming of error dot files for discovery pipelines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1844>
2024-10-03 16:45:42 +01:00
Guillaume Desmottes
87697609a2 webrtc: allow PAR change in webrtcsink input caps
We are already allowing resolution changes which can lead to change in
pixel-aspect-ratio.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1833>
2024-10-01 17:42:21 +01:00
Sebastian Dröge
cfdea1dc68 Fix new Rust 1.81 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1827>
2024-09-28 19:57:11 +03:00
Sebastian Dröge
7b4a2daed0 rtpav1depay: Add wait-for-keyframe and request-keyframe properties
These behave the same as the properties in other depayloaders. Keyframe
detection is based on the N flag in the aggregation header.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1825>
2024-09-28 10:51:05 +01:00
Mathieu Duponchelle
8eedd0ac6d webrtcsrc: ensure source pad has msid when added
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1812>
2024-09-26 06:33:44 +00:00
Mathieu Duponchelle
41f75378df webrtcsrc: fix default msid property value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1812>
2024-09-26 06:33:44 +00:00
François Laignel
8f542f084c webrtcsink: fix RFC7273 attributes
RFC7273 related attributes are set in the SDP offer by passing them via the
transceiver `codec-preferences` signal. These attributes are intended to be set
at the media level so they must be prefixed by `a-` in the `Caps` argument to
the signal. Otherwise they end up under `a=fmtp`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1811>
2024-09-25 11:25:51 +01:00
Mathieu Duponchelle
9331824479 webrtcsrc: expose MSID property on source pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1796>
2024-09-21 00:27:57 +02:00
Jan Schmidt
41cc7ee30b onvifmetadatapay: Set output caps earlier
As soon as input caps arrive, we can set output
caps. This means upstream can send gap events earlier,
before there is any actual metadata to send

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1788>
2024-09-19 14:25:37 +02:00
Sebastian Dröge
034742e4af mpegtslivesrc: Make sure to use the object as context for all debug logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1770>
2024-09-09 15:49:08 +01:00
Sebastian Dröge
1a7cf29b04 mpegtslivesrc: Check if old compared to new PCR clock estimation is too far off
It the difference between the two estimations is more than 1s then
consider this a discontinuity too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1770>
2024-09-09 15:49:08 +01:00
Sebastian Dröge
0758470e68 mpegtslivesrc: Fix order of parameters passed to add_observation()
The first one should be the internal time, i.e. the monotonic clock time
in our case, and the second one the external time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1770>
2024-09-09 15:49:08 +01:00
Sebastian Dröge
34f85f8d9f mpegtslivesrc: Scale monotonic time on PCR disconts to allow for continuous clock times
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1770>
2024-09-09 15:49:08 +01:00
Sebastian Dröge
59324a3da5 mpegtslivesrc: Set DISCONT flag on buffers at PCR discontinuities
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1770>
2024-09-09 15:49:08 +01:00
Arun Raghavan
b1ea6d2e65 webrtc: Fix whipclientsink name in README
The element name was changed, but the documentation wasn't updated to
match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1765>
2024-09-04 13:48:06 +01:00
Sebastian Dröge
553f36cfdb hlssink3: Update to sprintf 0.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1757>
2024-08-27 21:48:52 +03:00
Sanchayan Maity
988c58de43 whepsrc: Fix incorrect default caps
add-transceiver needs application/x-rtp caps and not raw caps. We were
providing raw caps which is incorrect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1756>
2024-08-27 09:51:05 +01:00
Sanchayan Maity
11e5262adb hlssink3: Use fragment duration from splitmuxsink if available
splitmuxsink now reports fragment offset and duration in the
splitmuxsink-fragment-closed message. Use this duration value
for the MediaSegment when available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1750>
2024-08-26 12:38:09 +00:00