From 9012d33c05781ebaa5e6bdaeaca997b540ed4e59 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Tue, 31 Jan 2023 21:23:26 +0100 Subject: [PATCH] Logging improvement on delete / create source --- src/MediaPlayer.cpp | 5 +++-- src/MediaSource.cpp | 2 +- src/SessionSource.cpp | 4 +++- src/UserInterfaceManager.cpp | 5 ----- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/MediaPlayer.cpp b/src/MediaPlayer.cpp index 820ab3e..9aa5ed7 100644 --- a/src/MediaPlayer.cpp +++ b/src/MediaPlayer.cpp @@ -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; diff --git a/src/MediaSource.cpp b/src/MediaSource.cpp index 789c0d5..10c4988 100644 --- a/src/MediaSource.cpp +++ b/src/MediaSource.cpp @@ -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()); } } diff --git a/src/SessionSource.cpp b/src/SessionSource.cpp index 2425164..be55717 100644 --- a/src/SessionSource.cpp +++ b/src/SessionSource.cpp @@ -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()); } } diff --git a/src/UserInterfaceManager.cpp b/src/UserInterfaceManager.cpp index 88a4eab..6ee3a2e 100644 --- a/src/UserInterfaceManager.cpp +++ b/src/UserInterfaceManager.cpp @@ -1152,11 +1152,6 @@ void UserInterface::showSourceEditor(Source *s) if (s) { Mixer::manager().setCurrentSource( s ); - RenderSource *rs = dynamic_cast(s); - if (rs != nullptr) { - outputcontrol.setVisible(true); - return; - } if (s->playable()) { sourcecontrol.setVisible(true); sourcecontrol.resetActiveSelection();