Conversation
…ernally When the recording is stopped from the GNOME Shell top bar indicator (or any other control outside Kooha's own window), the portal session is torn down directly, bypassing Kooha's own stop flow. The video source's pipewiresrc then dies with a not-negotiated stream error before Kooha ever finds out, and the recording is reported as failed even though most of the footage was captured fine. Subscribe to the session's Closed D-Bus signal so Kooha notices this happening while still recording. Inject eos directly into the encoder queues (bypassing the now-dead source, whose task is stuck after the stream error and can no longer forward an ordinary eos on its own) so the encoder/muxer/filesink downstream of it still finalize the file normally, and treat the bus error that follows from the dead source as expected rather than a recording failure. Tested on Debian 13 (v2.3.0): stopping from the top bar indicator no longer shows an error and the recorded file plays back correctly. Fixes SeaDve#309
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.
Fixes #309
What
When recording is stopped via the GNOME Shell top bar screen-recording indicator (or any other control outside Kooha's own window) instead of Kooha's stop button, the portal session is closed directly, bypassing Kooha's normal stop flow. The video source's
pipewiresrcthen dies with anot-negotiatedstream error before Kooha ever finds out, and the recording is reported as failed even though most of the footage was actually captured.Fix
ClosedD-Bus signal so Kooha notices when the session is torn down externally while still recording.eosdirectly into the encoder queues (kooha-videoenc-queue/kooha-audioenc-queue), bypassing the now-dead source whose task is stuck after the stream error and can't forward an ordinary eos on its own, so the encoder/muxer/filesink downstream still finalize the file correctly.Testing
Built and tested this on Debian 13 (based on the 2.3.0 tag, since that's what's packaged there). Stopping from the top bar indicator no longer shows an error, and the recorded file plays back fine. I wasn't able to build current
mainlocally (Debian 13's libglib2.0/libadwaita are older than what main currently requires), so I'm relying on CI here to confirm it still builds/passes on the current toolchain — happy to fix up anything that comes up.