livesync improvements
Compare changes
Files
1- Jan Alexander Steffens authored
Otherwise we might get confused by upstream GAP buffers.
Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
livesync: Rename activatemode
methods to *_activatemode
This matches the other plugins.
livesync: Simplify start_src_task
and src_loop
This should effect no change in behavior.
livesync: Improve audio duration fixups
fallback_duration
to a non-video stream.livesync: Log a category error when we are missing the segment
livesync: Clean up state handling
set_flushing
,
sink_reset
and src_reset
.livesync: Replace an if
-let
with match
No change in behavior, yet. Separate commit to ease reviewing.
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.
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.
livesync: Simplify num_duplicate
counting
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: #450 (closed)
livesync: Separate out_buffer
duplicate status from GAP
flag
Otherwise we might get confused by upstream GAP buffers.
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.
livesync: example: Add identity
s 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.
Otherwise we might get confused by upstream GAP buffers.