Commit graph

2890 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 3a7bf71483 livesync: Move num_in counting to the src task
This is in preparation for moving more accept/discard logic to the src
task, so we can only count `num_in` here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:49 +02:00
Jan Alexander Steffens (heftig) 9ad3c42e21 livesync: Move a notify closer to the interesting state change
Move the `notify_all` to where we pop the buffer. We're moving within a
single state lock so no change in behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:41 +02:00
Jan Alexander Steffens (heftig) 80ba5b980d livesync: Replace an if-let with match
No change in behavior, yet. Separate commit to ease reviewing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:37 +02:00
Jan Alexander Steffens (heftig) 391b244b9e livesync: Clean up state handling
- Separate resetting state more cleanly, introducing `set_flushing`,
  `sink_reset` and `src_reset`.
- Clear the queue early when we flush, in order to unblock waits on
  query responses.
- Return an error when we fail to start, pause or stop the task.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:32 +02:00
Jan Alexander Steffens (heftig) 04b7a1afd6 livesync: Log a category error when we are missing the segment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:27 +02:00
Jan Alexander Steffens (heftig) 79f58785d9 livesync: Improve audio duration fixups
- An entirely missing duration is now only logged at debug level instead
  of pretending the duration was zero and warning about it.
- Silently fix up a duration difference up to one sample.
- Error when we fail to calculate the duration; don't try to apply the
  `fallback_duration` to a non-video stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:22 +02:00
Jan Alexander Steffens (heftig) 913fb606fc livesync: Simplify start_src_task and src_loop
This should effect no change in behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:16 +02:00
Jan Alexander Steffens (heftig) 90a22950d2 livesync: Rename activatemode methods to *_activatemode
This matches the other plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:11 +02:00
Arun Raghavan 54bc4012d2 hlssink3: Close the playlist giostreamsink on stop if possible
This is a property that will be available from GStreamer 1.24, and will
ensure that we are able to flush the playlist during the READY->NULL
transition instead of when the element is freed.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/423
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:00:31 +02:00
Seungha Yang 4bb82748b9 hlssink3: Various cleanup
* Simplify state/playlist management
* Fix a bug that segment is not deleted if location contains directory
and playlist-root is unset
* Split playlist update routine into two steps, adding segment
to playlist and playlist write

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:59:17 +02:00
Seungha Yang 9b229eb456 hlssink3: Don't remove old files if max-files is zero
Follow hlssink2 element's behavior

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:59:13 +02:00
Seungha Yang c41e4c0304 hlssink3: Remove unused deps
gstreamer-base dep is unused. And use gst::glib

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:59:04 +02:00
Seungha Yang 1e5f499b3f hlssink3: Use Path API for getting file name
Current implementation does not support Windows path separator.
Use Path API instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:58:42 +02:00
Seungha Yang d5e6ca3e5a hlssink3: Use sprintf for segment name formatting
The zero-padded naming requirement is unnecessary. Use simple
sprintf instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:58:37 +02:00
Arun Raghavan cf4d7c5431 hlssink3: Minor PDT-related naming fixups
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:58:32 +02:00
rajneeshksoni 12e26cef8b hlssink3: Add property track-pipeline-clock-for-pdt.
This is required to take care of clock skew between
system time and pipeline time.
`track-pipeline-clock-for-pdt: true` mean utd time is
sampled for first segment and for subsequent segments
keep adding the time based on pipeline clock. difference
of segment duration and PDT time will match.
track-pipeline-clock-for-pdt: false` mean utd time is
sampled for each segment. system time may jump forward
or backward based on adjustments. If application needs
to synchronization of external events `false` is
recommended.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:58:27 +02:00
rajneeshksoni 4971084f63 hlssink3: Allow adding EXT-X-PROGRAM-DATE-TIME tag.
- connect to `format-location-full` it provide the first
sample of the fragment. preserve the running-time of the
first sample in fragment.
- on fragment-close message, find the mapping of running-time
to UTC time.
- on each subsequent fragment, calculate the offset of the
running-time with first fragment and add offset to base
utc time

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:58:22 +02:00
Arun Raghavan 12418a3f52 aws: s3: Properly percent-decode GstS3Url
We previously only percent-decoded the first fragment. This doesn't
necessarily harm anything, but for consistency we keep the structure
un-encoded, and encode when converting to a string representation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:56:11 +02:00
Arun Raghavan dd05c0d51a aws: s3sink: Fix handling of special characters in key
Properly URL-encode the string if needed, and add some tests for a
couple of cases.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/431
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:56:06 +02:00
Sebastian Dröge 5160b6c30f rtpav1depay: Don't push stale temporal delimiters downstream
Only push them downstream once a complete OBU was assembled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:58 +02:00
Sebastian Dröge 3d3dc19fc2 rtpav1depay: Skip unexpected leading fragments
If a packet is starting with a leading fragment but we do not expect to
receive one, then skip over it to the next OBU.

Not doing so would cause parsing of the middle of an OBU, which would
most likely fail and cause unnecessary warning messages about a
corrupted stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:51 +02:00
Sebastian Dröge d234c89e23 deny: Remove unnecessary ignore entry
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:46 +02:00
Sebastian Dröge af729699b8 Update to quick-xml 0.31
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:38 +02:00
Nirbheek Chauhan 095258aaf1 ci: Make meson warnings fatal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:13 +02:00
Nirbheek Chauhan 1c3166c0c6 meson: Bump requirement to 1.1
WARNING: Project specifies a minimum meson_version '>= 0.60' but uses features which were added in newer versions:
* 1.1.0: {'feature_option.enable_if()'}

Caused by https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1363

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:55:06 +02:00
Nirbheek Chauhan 4e7b3e35a3 meson: Enable the RTP option when WebRTC is enabled
And make the webrtc option yielding, see:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5505

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:54:39 +02:00
Nirbheek Chauhan cc174bd382 .gitignore: Ignore the meson subproject wrap hash
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:54:33 +02:00
Olivier Crête b245afbd2d Revert "deny: Temporarily allow a duplicated tungstenite dependency"
LiveKit has now been fixed.

This reverts commit 23e1bfa720.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:54:27 +02:00
Sebastian Dröge bf48e76b59 webrtc: Update to livekit 0.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:54:20 +02:00
Sebastian Dröge 4a53938b75 deny: Update for duplicated redox_syscall dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:54:15 +02:00
Sebastian Dröge 880f4229d0 Clean up usage of pad probes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:52:18 +02:00
François Laignel 9fd9f0eb83 net/webrtcsrc: define signaller property as CONSTRUCT_ONLY
The "signaller" property used to be defined as MUTABLE_READY which meant that
the property was always set after `constructed()` was called.

Since `connect_signaller()` was called from `constructed()`, only the default
signaller was used.

This commit sets the "signaller" property as CONSTRUCT_ONLY. Using a builder,
this property will now be set before the call to `constructed()`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:51:32 +02:00
François Laignel ff4b1cb757 net/webrtcsink: drop State lock before calling set-local-description
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:51:15 +02:00
François Laignel 6dc624ac2f net/webrtcsink: don't miss ice candidates
During `on_remote_description_set()` processing, current session is removed
from the sessions `HashMap`. If an ice candidate is submitted to `handle_ice()`
by that time, the session can't be found and the candidate is ignored.

This commit wraps the Session in the sessions `HashMap` so an entry is kept
while `on_remote_description_set()` is running. Incoming candidates received by
`handle_ice()` will be processed immediately or enqueued and handled when the
session is restored by `on_remote_description_set()`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:51:10 +02:00
Sebastian Dröge f5d6d703c5 aws: Update to test-with 0.11
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:51:03 +02:00
Lieven Paulissen 56095c5434 ndisrc: Assume input with more than 8 raw audio channels is unpositioned
gst_audio_channel_positions_from_mask() will otherwise print warnings
all the time.

Fixes #444

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:59 +02:00
Maksym Khomenko 2c923128dc webrtcsrc: use @watch instead of @to-owned
@to-owned increases refcount of the element, which prevents the object from proper destruction, as the initial refcount with ElementFactory::make is larger than 1.

Instead, use @watch to create a weak reference and unbind the closure automatically if the object gets destroyed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:53 +02:00
Sebastian Dröge 36273c0eae Update to AWS SDK 0.33
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:47 +02:00
Taruntej Kanakamalla 7bfb86c6cc net/webrtc/whip_signaller: Use the correct URL during redirect
Copy of 90e06dc3 for whipclientsink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:42 +02:00
Maksym Khomenko aabbe49dc3 webrtcsink: README: add documentation for custom signaller
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:36 +02:00
Maksym Khomenko 569dfadcab webrtcsink: add custom signaller example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:29 +02:00
Sebastian Dröge 107c610bb0 Update to AWS SDK 0.32
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 15:50:23 +02:00
Philippe Normand f853fa3bc7 audiornnoise: Attach audio level meta to output buffers
This is useful downstream for processing of audio voice payloads, for
instance feeding a speech recognition library such as Whisper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1353>
2023-10-09 12:07:45 +03:00
Sebastian Dröge b78269285b ci: Don't run cargo update
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1353>
2023-10-09 12:07:05 +03:00
Sebastian Dröge e5ccfdbd55 Update plugins versions in Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1353>
2023-10-09 12:06:23 +03:00
Sebastian Dröge a2e0853583 Update CHANGELOG.md for 0.11.1 2023-10-04 23:55:55 +03:00
Sebastian Dröge 2b8728103f Update versions to 0.11.1 2023-10-04 23:35:35 +03:00
Sebastian Dröge b9e8f4cbb3 ndi: Comment out empty Opus handling and add FIXME comment
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04 19:30:49 +03:00
Sebastian Dröge dce1e3b044 Update plugin documentation cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04 19:30:23 +03:00
Sebastian Dröge 4eeff19075 Fix indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1350>
2023-10-04 19:19:23 +03:00