-
Notifications
You must be signed in to change notification settings - Fork 1k
synchronize audio pipeline stop with video completion #1316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a pipeline cancellation token, centralizes actor-spawn error handling with user-facing UI cleanup on failure, removes wall-clock-based silence injection from the audio mixer, and cancels non-video pipelines when screen recording finishes. Changes
Sequence Diagram(s)sequenceDiagram
participant VideoRecorder
participant Watcher
participant AudioPipeline
participant CameraPipeline
participant SystemAudioPipeline
Note over VideoRecorder: Recording in progress
VideoRecorder->>VideoRecorder: Record video
par Parallel pipelines
AudioPipeline->>AudioPipeline: Process audio frames
CameraPipeline->>CameraPipeline: Process camera frames
SystemAudioPipeline->>SystemAudioPipeline: Process system audio
end
rect rgb(220,235,255)
Note over VideoRecorder,Watcher: Video completes
VideoRecorder->>Watcher: screen_done future resolves
Watcher->>AudioPipeline: cancel() -- uses cancel_token
Watcher->>CameraPipeline: cancel() -- uses cancel_token
Watcher->>SystemAudioPipeline: cancel() -- uses cancel_token
end
AudioPipeline->>AudioPipeline: Shutdown
CameraPipeline->>CameraPipeline: Shutdown
SystemAudioPipeline->>SystemAudioPipeline: Shutdown
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Cancel audio pipelines (mic, system audio) when video pipeline completes to prevent tracks from outliving video and causing timeline stretching.
Previously, audio tracks continued recording for ~18-19s after video ended, causing the editor timeline to stretch to ~29s while videos were only ~9-9.4s.
Summary by CodeRabbit
Bug Fixes
Improvements