diff options
author | Robin Gareus <robin@gareus.org> | 2017-10-04 05:06:47 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-10-04 05:06:47 +0200 |
commit | 9c3983a7a5a4a6e50db94bfc80d0cdee3753e998 (patch) | |
tree | 485e68db7c2cd9c5f3cad2e0db1639c22dc8d804 /libs/ardour/ardour/session.h | |
parent | e31f5d999837b0d0d63dc824c50e9da4acca7244 (diff) |
Fix various edge-cases with session-archives
* prevent duplicate names when pulling-in external sources
* drop "origin" after including external sources
* don't include unused playlists
(they may reference sources that are not included)
* likewise exclude unused regions
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r-- | libs/ardour/ardour/session.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d7c621d51f..db3f345db6 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -509,6 +509,7 @@ public: }; int save_as (SaveAs&); + /** save session * @param snapshot_name name of the session (use an empty string for the current name) * @param pending save a 'recovery', not full state (default: false) @@ -516,7 +517,12 @@ public: * @param template_only save a session template (default: false) * @return zero on success */ - int save_state (std::string snapshot_name, bool pending = false, bool switch_to_snapshot = false, bool template_only = false); + int save_state (std::string snapshot_name, + bool pending = false, + bool switch_to_snapshot = false, + bool template_only = false, + bool for_archive = false, + bool only_used_assets = false); enum ArchiveEncode { NO_ENCODE, @@ -1413,6 +1419,7 @@ private: gint _suspend_save; /* atomic */ volatile bool _save_queued; Glib::Threads::Mutex save_state_lock; + Glib::Threads::Mutex save_source_lock; Glib::Threads::Mutex peak_cleanup_lock; int load_options (const XMLNode&); @@ -1900,7 +1907,9 @@ private: SwitchToSnapshot }; - XMLNode& state (bool save_template, snapshot_t snapshot_type = NormalSave); + XMLNode& state (bool save_template, + snapshot_t snapshot_type = NormalSave, + bool only_used_assets = false); XMLNode& get_state (); int set_state (const XMLNode& node, int version); // not idempotent |