Commit graph

2922 commits

Author SHA1 Message Date
Sebastian Dröge eb7dd5b14b deny: Add duplicated windows crates version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:04:18 +02:00
Sebastian Dröge d02211988d Update to latest AWS SDK
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:04:11 +02:00
Sebastian Dröge 2a4e2abf56 gtk4: Update to windows-sys 0.52
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:01:15 +02:00
Sebastian Dröge efda10bd8f deny: Remove unnecessary tracing-log duplicate and add itertools
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:00:28 +02:00
Sebastian Dröge 4643853ca5 Update to AWS SDK 0.36
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:00:21 +02:00
Seungha Yang 4fd3b287e8 fallbacksrc: Fix timeout scheduling
Other thread can schedule the timeout (e.g., unblock signal
or active pad change) while state lock is released

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 10:00:15 +02:00
Sebastian Dröge 2274c62db7 uriplaylistbin: Fix new clippy warning
warning: the borrowed expression implements the required traits
    --> utils/uriplaylistbin/src/uriplaylistbin/imp.rs:1691:32
     |
1691 |         self.obj().remove_many(&children_ref).unwrap();
     |                                ^^^^^^^^^^^^^ help: change this to: `children_ref`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 09:52:20 +02:00
Sebastian Dröge 022e9ce651 ndi: Don't mark private type as public
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 09:52:10 +02:00
Sebastian Dröge 9db4c45e47 ndi: Remove wrong Clone impl on RecvInstance
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1410>
2023-12-18 09:52:03 +02:00
Sebastian Dröge ab093e4218 Update Cargo.lock 2023-11-11 20:52:45 +02:00
Sebastian Dröge 151702d264 Update versions to 0.11.2 2023-11-11 20:52:45 +02:00
Sebastian Dröge 4cc95c4327 Update CHANGELOG.md for 0.11.2 2023-11-11 20:52:45 +02:00
Sebastian Dröge 07934b0f87 Update Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:59 +02:00
Sebastian Dröge 4cfa48b4ef deny: Add override for duplicated toml_edit dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:26 +02:00
Maksym Khomenko 7fcf6d6faf webrtcsrc: add turn-servers property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:18 +02:00
Mathieu Duponchelle 6747b11cb9 Port to AWS SDK 0.57/0.35
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:12 +02:00
Sebastian Dröge aa491e0d54 aws: Update to test-with 0.12
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:06 +02:00
Sebastian Dröge ca11b32fab sccparse: Fix leading spaces between the tab and caption data
CCExtractor is creating files like this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:05:01 +02:00
Sebastian Dröge 2bec8a8eaa Set sync=false in rsfilesink / s3sink
BaseSink defaults to sync=true and that doesn't make much sense for
these elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:04:46 +02:00
Sebastian Dröge 1ceaf8b179 Use let-else instead of match for weak reference upgrades
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:04:38 +02:00
Sebastian Dröge b6b7511591 deny: Update duplicated dependencies
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:52 +02:00
Sebastian Dröge e501ee0340 Update to AWS SDK 0.34 and tracing-log 0.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:46 +02:00
Jan Alexander Steffens (heftig) b4855f1ba8 livesync: Remove the stop from outgoing segments
Our buffer duplication can extend a segment indefinitely.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/452
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:42 +02:00
Jan Alexander Steffens (heftig) d65504aeb8 livesync: Keep existing buffer duration in some cases
Resize a repeat buffer only if caps gave us a duration to use, or we
consider its current duration unreasonable.

In particular, for audio streams we should prefer reusing the buffer
size upstream gave us, as we did before 6633cc4046.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:36 +02:00
Jan Alexander Steffens (heftig) 48020dfbf5 livesync: Split fallback_duration into in_ and out_duration
Make it independent of the `latency`; this was inconsistent anyway,
where the default latency of zero got you a fallback duration of 100 ms
and something else got you half the latency.

Maintain a separate duration for the `in` and the `out` side so we
change the duration of repeat buffers after a caps change, not just
before.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:31 +02:00
Guillaume Desmottes 352d947655 livesync: display jitter when waiting on clock
We already log the result of the clock wait call so may as well log the
returned jitter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:27 +02:00
Guillaume Desmottes 559825a551 livesync: log new pending segments
The debug print of the event does not display details about the segment:
  Unqueueing Some(Event(Event { ptr: 0x7fa3e0002580, type: "segment", seqnum: Seqnum(479), structure: Some(GstEventSegment { segment: (GstSegment) ((GstSegment*) 0x7fa3e8001d00) }) }))

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:22 +02:00
Jan Alexander Steffens (heftig) 34ce94932f livesync: example: Add identities single-segment=1
These let us change the runtime offset of the test buffers via pad
offsets without pushing new segments into livesync, which is necessary
to demo the late-threshold behavior.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:17 +02:00
Jan Alexander Steffens (heftig) 7c2f05c271 livesync: Use fallback_duration for audio repeat buffers as well
Don't depend on upstream giving us sanely-sized buffers if we want to
repeat.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:12 +02:00
Jan Alexander Steffens (heftig) 0b80e3aa47 livesync: Separate out_buffer duplicate status from GAP flag
Otherwise we might get confused by upstream GAP buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:07 +02:00
Jan Alexander Steffens (heftig) ccf1171776 livesync: Handle flags and late buffer patching after queueing
This makes the chain function almost independent of the output state. We
still do the early discard check with `buffer_is_backwards` so we don't
try to queue buffers we can't use, allowing us to fast-forward upstream
without blocking on the src task.

Don't accept `LateOverThreshold` buffers when we have `pending_caps` or
a `pending_segment`. We need to apply these first before we can sensibly
patch buffers from the new stream.

Deduplicate most of the output buffer patching code into a new
`patch_output_buffer` method.

For: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/450
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:02:00 +02:00
Jan Alexander Steffens (heftig) 8deb2d26a8 livesync: Simplify num_duplicate counting
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1388>
2023-11-10 16:01:55 +02:00
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