mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-16 20:59:59 +01:00
New Session and Mixer mechanism for Failed sources
When a source in a session fails, it is not anymore deleted after update; the Mixer keeps it in the session but detaches it from the scene. This way the user can access the failed source in the navigator (listed in RED), and Replace the source. The Replacement of source is available for any source. The source visitor does not skip a visit if the source failed.
This commit is contained in:
@@ -153,9 +153,10 @@ void SessionSource::update(float dt)
|
||||
timer_ += guint64(dt * 1000.f) * GST_USECOND;
|
||||
}
|
||||
|
||||
// delete a source which failed
|
||||
if (session_->failedSource() != nullptr) {
|
||||
session_->deleteSource(session_->failedSource());
|
||||
// delete source which failed
|
||||
SourceListUnique::iterator failure = session_->failedSources().cbegin();
|
||||
if ( failure != session_->failedSources().cend() ) {
|
||||
session_->deleteSource( *failure );
|
||||
// fail session if all sources failed
|
||||
if ( session_->size() < 1)
|
||||
failed_ = true;
|
||||
@@ -349,8 +350,7 @@ void SessionFileSource::render()
|
||||
void SessionFileSource::accept(Visitor& v)
|
||||
{
|
||||
Source::accept(v);
|
||||
if (!failed())
|
||||
v.visit(*this);
|
||||
v.visit(*this);
|
||||
}
|
||||
|
||||
glm::ivec2 SessionFileSource::icon() const
|
||||
@@ -433,8 +433,7 @@ bool SessionGroupSource::import(Source *source)
|
||||
void SessionGroupSource::accept(Visitor& v)
|
||||
{
|
||||
Source::accept(v);
|
||||
if (!failed())
|
||||
v.visit(*this);
|
||||
v.visit(*this);
|
||||
}
|
||||
|
||||
glm::ivec2 SessionGroupSource::icon() const
|
||||
|
||||
Reference in New Issue
Block a user