mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Bugfix Action Snapshot replace
This commit is contained in:
@@ -239,25 +239,13 @@ void Action::replace(uint64_t snapshotid)
|
|||||||
Session *se = Mixer::manager().session();
|
Session *se = Mixer::manager().session();
|
||||||
se->snapshots()->xmlDoc_->DeleteChild( snapshot_node_ );
|
se->snapshots()->xmlDoc_->DeleteChild( snapshot_node_ );
|
||||||
|
|
||||||
// create snapshot node
|
// threaded capture state of current session
|
||||||
snapshot_node_ = se->snapshots()->xmlDoc_->NewElement( SNAPSHOT_NODE(snapshot_id_).c_str() );
|
std::thread(captureMixerSession, se->snapshots()->xmlDoc_, SNAPSHOT_NODE(snapshot_id_), label).detach();
|
||||||
se->snapshots()->xmlDoc_->InsertEndChild(snapshot_node_);
|
|
||||||
|
|
||||||
// save all sources using source visitor
|
|
||||||
SessionVisitor sv(se->snapshots()->xmlDoc_, snapshot_node_);
|
|
||||||
for (auto iter = se->begin(); iter != se->end(); ++iter, sv.setRoot(snapshot_node_) )
|
|
||||||
(*iter)->accept(sv);
|
|
||||||
|
|
||||||
// restore label
|
|
||||||
snapshot_node_->SetAttribute("label", label.c_str());
|
|
||||||
|
|
||||||
// debug
|
|
||||||
#ifdef ACTION_DEBUG
|
#ifdef ACTION_DEBUG
|
||||||
Log::Info("Snapshot replaced %d '%s'", snapshot_id_, label.c_str());
|
Log::Info("Snapshot replaced %d '%s'", snapshot_id_, label.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
|
||||||
snapshot_id_ = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<uint64_t> Action::snapshots() const
|
std::list<uint64_t> Action::snapshots() const
|
||||||
|
|||||||
Reference in New Issue
Block a user