Refactoring Session saving

use Session::save static method to save a session from a thread (same mechanism as Session::load). It calls Action::takeSnapshot if saving version is required. Mixer is busy during saving, pops up info when done.
This commit is contained in:
Bruno Herbelin
2022-01-17 00:38:48 +01:00
parent e96444671e
commit 81e8d6d99c
7 changed files with 161 additions and 130 deletions

View File

@@ -7,6 +7,7 @@
#include <tinyxml2.h>
class Session;
class Interpolator;
class FrameBufferImage;
@@ -39,7 +40,8 @@ public:
FrameBufferImage *thumbnail (uint s) const;
// Snapshots
void snapshot (const std::string &label = "", bool threaded = false);
static void takeSnapshot (Session *se, const std::string &label, bool create_thread);
void snapshot (const std::string &label = "");
void clearSnapshots ();
std::list<uint64_t> snapshots () const;
uint64_t currentSnapshot () const { return snapshot_id_; }