Add replay library and built-in clip editor - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac7c4b3d83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "-ss", start.TotalSeconds.ToString("0.###", CultureInfo.InvariantCulture), | ||
| "-i", sourcePath, | ||
| "-t", (end - start).TotalSeconds.ToString("0.###", CultureInfo.InvariantCulture), | ||
| "-map", "0:v:0", | ||
| "-c", "copy", |
There was a problem hiding this comment.
Re-encode cuts that start between keyframes
For nearly every trim whose start is not a keyframe, placing -ss before the input while using -c copy does not produce the selected start time. FFmpeg's -ss documentation explains that input seeking with stream copy preserves the segment between the preceding seek point and the requested position; with this project's two-second keyframe interval, a saved or overwritten clip can therefore contain up to roughly two seconds that the user excluded in the editor. Use an accurately decoded/re-encoded boundary or another exact-cut strategy.
Useful? React with 👍 / 👎.
| if (Interlocked.Exchange(ref _libraryRefreshInProgress, 1) != 0) | ||
| return; |
There was a problem hiding this comment.
Queue overlapping library refresh requests
When a replay finishes saving while a library refresh is already processing metadata or thumbnails, NotifyReplaySaved calls this method but the new request returns immediately. If the running scan enumerated files before that save completed, its eventual result omits the new replay and no later automatic refresh is scheduled, leaving the newly saved clip absent until the user manually refreshes or reopens the window. Record a pending refresh and run it after the active one completes.
Useful? React with 👍 / 👎.
| <ScrollViewer x:Name="RecentReplaysScrollViewer" Grid.Row="1" | ||
| VerticalScrollBarVisibility="Auto" | ||
| HorizontalScrollBarVisibility="Disabled" | ||
| PanningMode="VerticalOnly" Padding="0,0,6,0"> | ||
| <ItemsControl x:Name="RecentReplaysList" |
There was a problem hiding this comment.
Let the virtualizing panel own scrolling
With many saved replays, placing the ItemsControl inside this external ScrollViewer gives its VirtualizingStackPanel unbounded vertical space, so every replay container is measured and realized despite the virtualization flags. The new “every replay” library will therefore become progressively slower and more memory-heavy as collections grow. Use a scrolling items control whose internal ScrollViewer delegates scrolling to the virtualizing panel, or otherwise constrain the panel's viewport.
Useful? React with 👍 / 👎.
Summary
Validation