Add persistent playback speed controls - #29
Merged
Merged
Conversation
Playback > Speed, a timeline combobox, and Ctrl+[ / Ctrl+] / Ctrl+\ select 0.25x through 4x. The two players keep time differently, so speed applies differently to each, and playback/speed.py holds the arithmetic so it can be tested on its own: - SequencePlayer is timer-driven: it fires every 1000/fps ms and steps one frame. Speed scales that interval, so every frame is still shown, just sooner or later. A running timer is re-armed immediately rather than waiting for the next tick. - MoviePlayer is clock-driven: it reads a monotonic elapsed time and presents whichever decoded frame is due. Speed scales the elapsed clock, so more (or fewer) frames fall due per tick. Presentation stays timestamp-driven, so frames still appear in order and none are decoded twice. Changing speed mid-playback re-anchors the movie clock first: it banks the position already reached at the old speed and restarts the elapsed timer, so the multiplier applies only from that point. Without this the whole elapsed span is rescaled retroactively and playback jumps. Audio is dropped at any speed other than 1x. The samples decode at their native rate, so submitting them against a scaled video clock drifts steadily out of sync, and playing them faster without resampling shifts the pitch. Off-speed playback is silent, which is what a reviewer expects when they shuttle, and it keeps A/V sync honest. The status bar says so. An unusable fps yields no interval rather than dividing by zero, and a junk speed falls back to 1x rather than stopping playback. 23 tests. Note SequencePlayer starts a decode QThread in its constructor and only reset() shuts it down; the test fixtures do that, or the process dies at exit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TexnzYbmCjjTDB8zzZuUPb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
main.fdplaylistrestoreReview fix
The original feature stored speed only on the concrete MoviePlayer/SequencePlayer. Loading a new shot replaced that object at 1x while the UI still displayed 2x, and a later B-side Compare player could run at a different speed. The wrapper now owns the transport setting and applies it to every replacement player.
Original feature authored by @emlcpfx in #23.
Validation
pytest -qpassedgit diff --checkReplaces #23.