Logging improvement on delete / create source

This commit is contained in:
Bruno Herbelin
2023-01-31 21:23:26 +01:00
parent 268751815f
commit 9012d33c05
4 changed files with 7 additions and 9 deletions

View File

@@ -424,8 +424,9 @@ void MediaPlayer::execute_open()
Log::Info("MediaPlayer %s Opened '%s' (%s %d x %d)", std::to_string(id_).c_str(),
SystemToolkit::filename(uri_).c_str(), media_.codec_name.c_str(), media_.width, media_.height);
Log::Info("MediaPlayer %s Timeline [%ld %ld] %ld frames, %d gaps", std::to_string(id_).c_str(),
timeline_.begin(), timeline_.end(), timeline_.numFrames(), timeline_.numGaps());
if (!isImage())
Log::Info("MediaPlayer %s Timeline [%ld %ld] %ld frames, %d gaps", std::to_string(id_).c_str(),
timeline_.begin(), timeline_.end(), timeline_.numFrames(), timeline_.numGaps());
opened_ = true;

View File

@@ -125,7 +125,7 @@ void MediaSource::init()
View::need_deep_update_ += 2;
// done init
Log::Info("Source '%s' linked to Media %s.", name().c_str(), std::to_string(mediaplayer_->id()).c_str());
Log::Info("Source '%s' linked to MediaPlayer %s.", name().c_str(), std::to_string(mediaplayer_->id()).c_str());
}
}

View File

@@ -157,6 +157,7 @@ void SessionSource::update(float dt)
SourceListUnique::iterator failure = session_->failedSources().cbegin();
if ( failure != session_->failedSources().cend() ) {
session_->deleteSource( *failure );
Log::Info("Source '%s' deleted from Session group %s.", (*failure)->name().c_str(), std::to_string(session_->id()).c_str());
// fail session if all sources failed
if ( session_->size() < 1)
failed_ = true;
@@ -401,8 +402,9 @@ void SessionGroupSource::init()
// done init
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(),
Log::Info("Session group %s reading %s (%d x %d).", std::to_string(session_->id()).c_str(), numsource.c_str(),
int(renderbuffer->resolution().x), int(renderbuffer->resolution().y) );
Log::Info("Source '%s' linked to Session group %s.", name().c_str(), std::to_string(session_->id()).c_str());
}
}

View File

@@ -1152,11 +1152,6 @@ void UserInterface::showSourceEditor(Source *s)
if (s) {
Mixer::manager().setCurrentSource( s );
RenderSource *rs = dynamic_cast<RenderSource *>(s);
if (rs != nullptr) {
outputcontrol.setVisible(true);
return;
}
if (s->playable()) {
sourcecontrol.setVisible(true);
sourcecontrol.resetActiveSelection();