Skip to content
Snippets Groups Projects

qt: do not take snapshots from the UI thread

Merged Romain Vimont requested to merge rom1v/vlc:async-snapshot into master
All threads resolved!

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.

Edited by Romain Vimont

Merge request reports

Merge request pipeline #269351 passed

Merge request pipeline passed for b3ccc7b0

Approved by

Merged by Rémi Denis-CourmontRémi Denis-Courmont 2 years ago (Oct 4, 2022 5:15pm UTC)

Merge details

  • Changes merged into master with b3ccc7b0.
  • Deleted the source branch.
  • Auto-merge enabled

Pipeline #269376 passed

Pipeline passed for b3ccc7b0 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Romain Vimont added 1 commit

    added 1 commit

    • 7d80a102 - qt: do not take snapshots from the UI thread

    Compare with previous version

  • Romain Vimont resolved all threads

    resolved all threads

  • Romain Vimont marked this merge request as draft

    marked this merge request as draft

  • Pierre Lamot approved this merge request

    approved this merge request

  • Romain Vimont added 1 commit

    added 1 commit

    • 7923e092 - qt: do not take snapshots from the UI thread

    Compare with previous version

  • Jean-Baptiste Kempf approved this merge request

    approved this merge request

  • Alexandre Janniaux
  • Romain Vimont marked this merge request as ready

    marked this merge request as ready

  • Romain Vimont resolved all threads

    resolved all threads

  • Romain Vimont added 1 commit

    added 1 commit

    • f7a767a6 - hotkeys: do not take snapshots from the UI thread

    Compare with previous version

  • Author Developer

    I added a commit to also call the snapshot asynchronously from hotkeys (Shift+s).

  • MR Acceptance result

    :tada: This MergeRequest has been Accepted! Congratulations.

    MR acceptance checks details:

    • :white_check_mark: MR should be considered mergeable by Gitlab
    • :white_check_mark: Last pipeline should be successful
    • :white_check_mark: MergeRequest should have at least one external review and/or vote
    • :white_check_mark: All threads should be resolved, and score >= 0
    • :white_check_mark: MergeRequest should have no activity (threads/votes) for (24h/24h)

    This message was automatically generated by homer-bot.

  • 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

    Compare with previous version

  • Rémi Denis-Courmont enabled an automatic merge when the pipeline for b3ccc7b0 succeeds

    enabled an automatic merge when the pipeline for b3ccc7b0 succeeds

  • Please register or sign in to reply
    Loading