mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 10:49:59 +01:00
Unified use of SessionSource in Mixer (import) for SessionFile and
SessionGroup sources.
This commit is contained in:
@@ -511,7 +511,7 @@ void ImGuiVisitor::visit (SessionGroupSource& s)
|
|||||||
ImGui::Text("Group");
|
ImGui::Text("Group");
|
||||||
|
|
||||||
if ( ImGui::Button( ICON_FA_FILE_EXPORT " Ungroup", ImVec2(IMGUI_RIGHT_ALIGN, 0)) ){
|
if ( ImGui::Button( ICON_FA_FILE_EXPORT " Ungroup", ImVec2(IMGUI_RIGHT_ALIGN, 0)) ){
|
||||||
// Mixer::manager().import( &s );
|
Mixer::manager().import( &s );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ using namespace tinyxml2;
|
|||||||
#define THREADED_LOADING
|
#define THREADED_LOADING
|
||||||
static std::vector< std::future<Session *> > sessionLoaders_;
|
static std::vector< std::future<Session *> > sessionLoaders_;
|
||||||
static std::vector< std::future<Session *> > sessionImporters_;
|
static std::vector< std::future<Session *> > sessionImporters_;
|
||||||
static std::vector< SessionFileSource * > sessionSourceToImport_;
|
static std::vector< SessionSource * > sessionSourceToImport_;
|
||||||
const std::chrono::milliseconds timeout_ = std::chrono::milliseconds(4);
|
const std::chrono::milliseconds timeout_ = std::chrono::milliseconds(4);
|
||||||
|
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ void Mixer::update()
|
|||||||
// if there is a session source to import
|
// if there is a session source to import
|
||||||
if (!sessionSourceToImport_.empty()) {
|
if (!sessionSourceToImport_.empty()) {
|
||||||
// get the session source to be imported
|
// get the session source to be imported
|
||||||
SessionFileSource *source = sessionSourceToImport_.back();
|
SessionSource *source = sessionSourceToImport_.back();
|
||||||
// merge the session inside this session source
|
// merge the session inside this session source
|
||||||
merge( source );
|
merge( source );
|
||||||
// important: delete the sessionsource itself
|
// important: delete the sessionsource itself
|
||||||
@@ -992,7 +992,7 @@ void Mixer::import(const std::string& filename)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mixer::import(SessionFileSource *source)
|
void Mixer::import(SessionSource *source)
|
||||||
{
|
{
|
||||||
sessionSourceToImport_.push_back( source );
|
sessionSourceToImport_.push_back( source );
|
||||||
}
|
}
|
||||||
@@ -1027,7 +1027,7 @@ void Mixer::merge(Session *session)
|
|||||||
current_view_->update(0.f);
|
current_view_->update(0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mixer::merge(SessionFileSource *source)
|
void Mixer::merge(SessionSource *source)
|
||||||
{
|
{
|
||||||
if ( source == nullptr ) {
|
if ( source == nullptr ) {
|
||||||
Log::Warning("Failed to import Session Source.");
|
Log::Warning("Failed to import Session Source.");
|
||||||
|
|||||||
6
Mixer.h
6
Mixer.h
@@ -5,6 +5,8 @@
|
|||||||
#include "Session.h"
|
#include "Session.h"
|
||||||
#include "Selection.h"
|
#include "Selection.h"
|
||||||
|
|
||||||
|
class SessionSource;
|
||||||
|
|
||||||
class Mixer
|
class Mixer
|
||||||
{
|
{
|
||||||
// Private Constructor
|
// Private Constructor
|
||||||
@@ -88,9 +90,9 @@ public:
|
|||||||
void saveas (const std::string& filename);
|
void saveas (const std::string& filename);
|
||||||
void load (const std::string& filename);
|
void load (const std::string& filename);
|
||||||
void import (const std::string& filename);
|
void import (const std::string& filename);
|
||||||
void import (SessionFileSource *source);
|
void import (SessionSource *source);
|
||||||
void merge (Session *session);
|
void merge (Session *session);
|
||||||
void merge (SessionFileSource *source);
|
void merge (SessionSource *source);
|
||||||
void set (Session *session);
|
void set (Session *session);
|
||||||
|
|
||||||
// operations depending on transition mode
|
// operations depending on transition mode
|
||||||
|
|||||||
Reference in New Issue
Block a user