qt: do not take snapshots from the UI thread
Snapshots are performed via a call to:
var_TriggerCallback("video-snapshot")
causing its callback (SnapshotCallback) to be called synchronously, executing the following steps:
- wait for the vout thread to actually capture the (next) frame;
- encode the picture to PNG;
- write the result to disk (I/O).
Since var_TriggerCallback("video-snapshot")
is called from the UI
thread, all these blocking actions are also performed on the UI thread.
Move the call to a separate thread.
Merge request reports
Activity
changed milestone to %4.0
added Component::Interface: Qt label
Oh, but this is just for the Qt part, when a snapshot is created from a hotkey (Shift+s on Linux), it's still called from the main thread. Maybe the asynchronous call to request a snapshot should be implemented in the core player? (what do you think @tguillem?)
- Resolved by Romain Vimont
added MRStatus::InReview label
added 1 commit
- 7d80a102 - qt: do not take snapshots from the UI thread
added 1 commit
- 7923e092 - qt: do not take snapshots from the UI thread
- Resolved by Romain Vimont
added 1 commit
- f7a767a6 - hotkeys: do not take snapshots from the UI thread
added MRStatus::Acceptable label and removed MRStatus::InReview label
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, and score >= 0 -
MergeRequest should have no activity (threads/votes) for (24h/24h)
-
added 46 commits
-
f7a767a6...e2a10a5c - 44 commits from branch
videolan:master
- 1aa5ca65 - qt: do not take snapshots from the UI thread
- b3ccc7b0 - hotkeys: do not take snapshots from the UI thread
-
f7a767a6...e2a10a5c - 44 commits from branch
enabled an automatic merge when the pipeline for b3ccc7b0 succeeds