Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2024-01-16livesync: properly format jitter in debug logsGuillaume Desmottes
Easier to read that way. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1430>
2023-12-22Fix a few new clippy 1.75 warningsSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1415>
2023-12-04use new debug and parse APIGuillaume Desmottes
Changes from https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1355 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1403>
2023-11-15fallbacksrc: Fix timeout schedulingSeungha Yang
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/1384>
2023-11-13uriplaylistbin: Fix new clippy warningSebastian Dröge
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/1391>
2023-11-02Update for `gst::Rank` API changesSebastian Dröge
2023-10-30Use let-else instead of match for weak reference upgradesSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1375>
2023-10-25livesync: Remove the stop from outgoing segmentsJan Alexander Steffens (heftig)
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/1372>
2023-10-25livesync: Keep existing buffer duration in some casesJan Alexander Steffens (heftig)
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 6633cc4046aa1f5a. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1372>
2023-10-25livesync: Split fallback_duration into in_ and out_durationJan Alexander Steffens (heftig)
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/1372>
2023-10-25livesync: display jitter when waiting on clockGuillaume Desmottes
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/1370>
2023-10-25livesync: log new pending segmentsGuillaume Desmottes
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/1370>
2023-10-25livesync: example: Add identities single-segment=1Jan Alexander Steffens (heftig)
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/1369>
2023-10-25livesync: Use fallback_duration for audio repeat buffers as wellJan Alexander Steffens (heftig)
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/1369>
2023-10-25livesync: Separate out_buffer duplicate status from GAP flagJan Alexander Steffens (heftig)
Otherwise we might get confused by upstream GAP buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-25livesync: Handle flags and late buffer patching after queueingJan Alexander Steffens (heftig)
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/1369>
2023-10-25livesync: Simplify num_duplicate countingJan Alexander Steffens (heftig)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-25livesync: Move num_in counting to the src taskJan Alexander Steffens (heftig)
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/1369>
2023-10-25livesync: Move a notify closer to the interesting state changeJan Alexander Steffens (heftig)
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/1369>
2023-10-25livesync: Replace an if-let with matchJan Alexander Steffens (heftig)
No change in behavior, yet. Separate commit to ease reviewing. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-25livesync: Clean up state handlingJan Alexander Steffens (heftig)
- 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/1369>
2023-10-25livesync: Log a category error when we are missing the segmentJan Alexander Steffens (heftig)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-25livesync: Improve audio duration fixupsJan Alexander Steffens (heftig)
- 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/1369>
2023-10-25livesync: Simplify start_src_task and src_loopJan Alexander Steffens (heftig)
This should effect no change in behavior. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-25livesync: Rename activatemode methods to *_activatemodeJan Alexander Steffens (heftig)
This matches the other plugins. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1369>
2023-10-17Clean up usage of pad probesSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1361>
2023-08-14fallbackswitch: protect src pad stream lock using CondGuillaume Desmottes
Should prevent stream and State deadlocks, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/202 Fix #202 Hopefully fix #192 as well. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1300>
2023-08-14fallbackswitch: prevent deadlocks in chain functionGuillaume Desmottes
Calling schedule_timeout() may result in handle_timeout() being called right away, which will need pad state locks which was still hold in chain(). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1300>
2023-08-14fallbackswitch: ensure strict ordering when taking mutexesGuillaume Desmottes
Should prevent deadlocks. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1300>
2023-08-10Update versions to 0.12.0-alpha.1Sebastian Dröge
2023-08-09Don't generate .def files for pluginsSebastian Dröge
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/389 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1299>
2023-08-02utils: fix further to glib change ControlFlow -> PropagationFrançois Laignel
See: https://github.com/gtk-rs/gtk-rs-core/pull/1144 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1292>
2023-07-19Update minimum supported Rust version to 1.70Sebastian Dröge
gtk-rs will update soonish too. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1280>
2023-07-11Remove unnecessary `mut` everywhereSebastian Dröge
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1273>
2023-07-06Adapt to removal of glib::InhibitBilal Elmoussaoui
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1270>
2023-07-06fallbackswitch: Change the threshold for trailing buffersJan Schmidt
Only discard buffers on inactive pads if they are later than the current output running time, rather than the later timeout running time. That can mean switching to a higher priority pad can happen quicker. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1198>
2023-07-06fallbackswitch: Fix pad health calculation and notifiesJan Schmidt
Change the pad health calculation to consider a pad 'healthy' if it has received data within the last 'timeout' window. Previously, inactive pads were constantly flip-flopping between healthy and not healthy depending on whether they were slightly ahead of or behind the active pad running_time. When the health status of a pad changes, make sure to always notify the property, so that applications that are manually controlling the active pad can make their switching decisions. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1198>
2023-07-06Use re-exported once_cellBilal Elmoussaoui
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-06Adapt to glib::Continue renameBilal Elmoussaoui
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-04togglerecord: Clip segment before calculating timestamp/durationVivia Nikolaidou
Clipping happens in buffer time space and data.clip can modify the buffer timestamp and duration. Move it before we calculate them in order to make it actually have some effect. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1265>
2023-06-30togglerecord: Error out if main stream buffer has no valid running timeVivia Nikolaidou
We cannot continue with this buffer, because we cannot calculate the time when the recording stopped or started. We also cannot safely drop it, because that might break the stream, especially if it's encoded. Therefore, we return an element error. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1264>
2023-06-26togglerecord: Change test_two_stream_close_open_nonlivein_liveout timeout to ↵Vivia Nikolaidou
60ms 20ms was not enough for the CI. Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/379 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1258>
2023-06-21togglerecord: Fix nonlive inputs when element is started not recordingVivia Nikolaidou
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1252>
2023-06-20livesync: Wait for the end timestamp of the previous buffer before looking ↵Sebastian Dröge
at queue Previously livesync was waiting for the start timestamp of the current buffer after looking at the queue and right before pushing it downstream. This meant that it generally looked too early at the queue and especially that upstream had to provide the next buffer already at the start timestamp of the previous one. Instead, now wait before looking at the queue and wait for the end timestamp of the previous buffer. Once the previous buffer has expired, a new buffer really needs to be available or otherwise a filler buffer has to be pushed downstream. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1250>
2023-06-20livesync: Improve EOS handlingJan Alexander Steffens (heftig)
I've looked at the GstQueue code again and tried making livesync behave better with EOS. This isn't very well tested, though. My goal was to make this look saner but I think this should be reviewed by someone who knows the queue code. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1251>
2023-06-14togglerecord: Add support for non-live inputsVivia Nikolaidou
Live input + is-live=false: While not recording, drop input When recording is started, offset to collapse the gap Live input + is-live=true: While not recording, drop input Don't modify the offset Non-live input + is-live=false: While not recording, block input Don't modify the offset Non-live input + is-live=true: While not recording, block input When recording is started, offset to current running time Co-authored-by: Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1206>
2023-06-13fallbackswitch: add 'stop-on-eos' propertyGuillaume Desmottes
Fix the following use case: - main input of fallbackswitch is finite (a media file) - fallback input is infinite (videotestsrc) - main input is done and send eos, which is propagated downstream - fallbackswitch switches to fallback, sending STREAM_START which reset EOS downstream (aggregator does that) - fallback input keeps pushing buffers forever. Solve it by adding a 'stop-on-eos' property so fallbackswitch stops pushing property once the main input is eos. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1242>
2023-06-13fallbackswitch: remove unused SinkState::eosGuillaume Desmottes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1242>
2023-06-13fallbackswitch: log when handling eventsGuillaume Desmottes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1242>
2023-06-07Use MPL as license specifier for plugins only requiring GStreamer < 1.20Sebastian Dröge
And use MPL-2.0 for all that require GStreamer 1.20 or newer. The new string is only allowed in 1.20 or newer and using it in older versions causes failure to load the plugin. All affected plugins are of course still MPL-2.0 licensed. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/374 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1235>