Unified Logs for sources initialization

This commit is contained in:
Bruno Herbelin
2022-04-09 15:20:48 +02:00
parent 54a23f5ae7
commit 3e41655902
5 changed files with 10 additions and 15 deletions

View File

@@ -110,7 +110,7 @@ void CloneSource::init()
++View::need_deep_update_;
// done init
Log::Info("Source %s cloning source %s.", name().c_str(), origin_->name().c_str() );
Log::Info("Source '%s' cloning source '%s'.", name().c_str(), origin_->name().c_str() );
}
}

View File

@@ -783,9 +783,6 @@ void Mixer::groupAll()
// NB: sessiongroup will be updated and inserted to Mixing view on next frame
addSource(sessiongroup);
// inform of creation
Log::Info("%s '%s' created with %d sources", sessiongroup->info().c_str(),
sessiongroup->name().c_str(), sessiongroup->session()->size());
}
else {
delete sessiongroup;

View File

@@ -96,7 +96,7 @@ void RenderSource::init()
++View::need_deep_update_;
// done init
Log::Info("Source Render linked to session (%d x %d).", int(fb->resolution().x), int(fb->resolution().y) );
Log::Info("Source '%s' linked to output (%d x %d).", name().c_str(), int(fb->resolution().x), int(fb->resolution().y) );
}
}

View File

@@ -440,17 +440,12 @@ uint Session::size() const
uint Session::numSources() const
{
if (true) {
CountVisitor counter;
for( SourceList::const_iterator it = sources_.cbegin(); it != sources_.cend(); ++it) {
(*it)->accept(counter);
}
return counter.numSources();
}
else
return size();
}
SourceIdList Session::getIdList() const
{

View File

@@ -407,7 +407,10 @@ void SessionGroupSource::init()
renderbuffer_->end();
// done init
Log::Info("Session Group '%s' initialized (%d x %d).", name().c_str(), int(renderbuffer->resolution().x), int(renderbuffer->resolution().y) );
uint N = session_->size();
std::string numsource = std::to_string(N) + " source" + (N>1 ? "s" : "");
Log::Info("Source '%s' groupped %s (%d x %d).", name().c_str(), numsource.c_str(),
int(renderbuffer->resolution().x), int(renderbuffer->resolution().y) );
}
}