Commit graph

858 commits

Author SHA1 Message Date
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
Mathieu Duponchelle
6eac72d78c net/aws: fix sanity check in transcribe loop
When we receive a new alternative we want to avoid iterating out of
bounds, but the comparison between the current index and the length of
the alternative should not log an error when partial_index == length, as
Vec::drain(length..) is valid, and it is completely valid for AWS to
send us a new alternative with as many items as we have already
dequeued.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1752>
2024-08-26 11:52:10 +01:00
Mathieu Duponchelle
88a6b6d428 net/webrtc: Add missing npm command to README
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/589

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1747>
2024-08-23 10:30:18 +00:00
Mathieu Duponchelle
4559b6a9f9 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/1738>
2024-08-23 09:30:03 +00:00
Sebastian Dröge
85151a6e4f Fix various 1.80 clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1740>
2024-08-23 08:59:20 +03:00
Jerome Colle
1abe0fd5fe webrtcsink: add nvv4l2av1enc support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1743>
2024-08-22 09:59:22 +00:00
Sebastian Dröge
b99aab06f8 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/1726>
2024-08-17 01:17:47 +01:00
Sebastian Dröge
71cd06e975 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/1722>
2024-08-14 18:30:06 +01:00
Sebastian Dröge
2e2af95e2d 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/1719>
2024-08-14 14:02:06 +01:00
Dave Lucia
a3d6308579 net/webrtc: Fix turn-servers nick: user -> use
Noticed this typo

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1713>
2024-08-14 09:34:59 +00:00
Sebastian Dröge
b673de4e07 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/1715>
2024-08-14 08:17:48 +00:00
Mathieu Duponchelle
c87ddd43e4 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/1714>
2024-08-13 18:07:13 +01:00
Sebastian Dröge
19cb695ce0 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/1705>
2024-08-10 11:46:04 +01:00
Sebastian Dröge
bc81e78873 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/1705>
2024-08-10 11:46:04 +01:00
Sebastian Dröge
489021ed55 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/1705>
2024-08-10 11:46:03 +01:00
Sebastian Dröge
76f21f3b50 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/1705>
2024-08-10 11:46:03 +01:00
Sebastian Dröge
2d2aab3f3c rtp: basepay: Initialize class fields
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1705>
2024-08-10 11:46:03 +01:00
Sebastian Dröge
3cce3f18c1 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/1705>
2024-08-10 11:46:03 +01:00
Sebastian Dröge
f020fdac93 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/1705>
2024-08-10 11:46:03 +01:00
Sebastian Dröge
c712b36082 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/1700>
2024-08-07 12:00:57 +00:00
Loïc Le Page
4bef63ba26 gstwebrtc-api: always include index file in dist for convenience
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1675>
2024-07-18 23:38:56 +00:00
Sebastian Dröge
fea2343968 rtp: Require bitstream-io < 2.4.0
Version 2.4.0 contains a breaking change that it shouldn't, and updating
to 2.4.0 requires a newer Rust version.

See https://github.com/tuffy/bitstream-io/issues/22
2024-07-16 19:06:54 +03:00
Sebastian Dröge
06fb47d197 webrtc: Add version to gst-plugin-webrtc-protocol dependency 2024-07-16 18:59:19 +03:00
François Laignel
b50f76223c webrtcsink: fix property types for rav1enc
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/572
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1667>
2024-07-16 12:47:33 +03:00
Sanchayan Maity
9d7285d227 net/quinn: Fix generation of self signed certificate
The certificate chain was incorrectly being passed the private key instead
of certificate. With rustls 0.23.11 version, this error was being caught
and reported. As stated in the 0.23.11 release, it has a new feature

"API for determining whether a CertifiedKey's certificate and private key
matches: keys_match(). This is called from existing fallible functions
that accept a private key and certificate (for example, with_single_cert())
so these functions now detect this misconfiguration."

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1666>
2024-07-16 12:47:33 +03:00
Sebastian Dröge
a8ccfe49d9 webrtc: Require livekit-protocol < 0.3.4 due to uncoordinated breaking changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1663>
2024-07-11 20:00:24 +03:00
Sebastian Dröge
98b28d69ce Update for new debug log macro syntax
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1658>
2024-07-08 11:25:23 +03:00
Sebastian Dröge
4123b5d1a1 mpegtslive: Update for gst::Clock::set_calibration() API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1658>
2024-07-08 09:59:06 +03:00
Sanchayan Maity
2fe852166e aws/s3hlssink: Do not call abort before finishing uploads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1653>
2024-07-06 14:44:08 +00:00
Sebastian Dröge
4ab8d92f28 mpegtslivesrc: Don't skip the first MPEG-TS packet
If every buffer contains only a single MPEG-TS packet we would otherwise
skip over everything and would never observe a PCR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1651>
2024-07-04 17:01:43 +03:00
Philippe Normand
eee93aea52 rtp2: Fix typo on auto-header-extension property name
The rtp (de)pay elements use auto-header-extension so the new elements should do
the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1646>
2024-07-02 09:35:39 +01:00
Edward Hervey
95ae67752f net: New mpegtslive element
This element allows wrapping an existing live "mpeg-ts source" (udpsrc,
srtsrc,...) and providing a clock based on the actual PCR of the stream.

Combined with `tsdemux ignore-pcr=True` downstream of it, this allows playing
back the content at the same rate as the (remote) provider **and** not modify
the original timestamps.

Co-authored-by: Sebastian Dröge <slomo@coaxion.net>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1640>
2024-07-01 15:29:22 +02:00