Skip to content

qt: do not take snapshots from the UI thread

Romain Vimont requested to merge rom1v/vlc:async-snapshot into master

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

Loading