From d76d2082ca96306825607d1569657d28408a22cf Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Mon, 6 May 2019 14:06:53 +0100 Subject: [PATCH] Add prefix string before dumping stream information --- tools/CalypTools.cpp | 12 ++++++------ tools/CalypTools.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/CalypTools.cpp b/tools/CalypTools.cpp index f637716..bd0b5b7 100644 --- a/tools/CalypTools.cpp +++ b/tools/CalypTools.cpp @@ -59,11 +59,11 @@ CalypTools::~CalypTools() #define GET_PARAM( X, i ) X[X.size() > i ? i : X.size() - 1] -void CalypTools::reportStreamInfo( const CalypStream* stream ) +void CalypTools::reportStreamInfo( const CalypStream* stream, ClpString strPrefix ) { - log( CLP_LOG_INFO, "Stream name: %s \n", stream->getFileName().c_str() ); - log( CLP_LOG_INFO, "Resolution: %dx%d@%d \n", stream->getWidth(), stream->getHeight(), stream->getFrameRate() ); - log( CLP_LOG_INFO, "Bits/pel: %d (%s)\n", stream->getBitsPerPixel(), stream->getEndianess() == CLP_BIG_ENDIAN ? "BE" : "LE" ); + log( CLP_LOG_INFO, "%sStream name: %s \n", strPrefix.c_str(), stream->getFileName().c_str() ); + log( CLP_LOG_INFO, "%sResolution: %dx%d@%d \n", strPrefix.c_str(), stream->getWidth(), stream->getHeight(), stream->getFrameRate() ); + log( CLP_LOG_INFO, "%sBits/pel: %d (%s)\n", strPrefix.c_str(), stream->getBitsPerPixel(), stream->getEndianess() == CLP_BIG_ENDIAN ? "BE" : "LE" ); } int CalypTools::openInputs() @@ -249,7 +249,7 @@ int CalypTools::Open( int argc, char* argv[] ) pcInputFrame->getPelFormat(), pcInputFrame->getBitsPel(), m_uiOutEndianness, 1, false ); log( CLP_LOG_INFO, "Output stream from rate-reduction!\n" ); - reportStreamInfo( pcOutputStream ); + reportStreamInfo( pcOutputStream, "Output " ); } catch( const char* msg ) { @@ -383,7 +383,7 @@ int CalypTools::Open( int argc, char* argv[] ) pcModStream->open( outputFileNames[0], pcModFrame->getWidth(), pcModFrame->getHeight(), pcModFrame->getPelFormat(), pcModFrame->getBitsPel(), m_uiOutEndianness, 1, false ); log( CLP_LOG_INFO, "Output stream from module!\n" ); - reportStreamInfo( pcModStream ); + reportStreamInfo( pcModStream, "Module Output " ); } catch( const char* msg ) { diff --git a/tools/CalypTools.h b/tools/CalypTools.h index 857ab9f..c826270 100644 --- a/tools/CalypTools.h +++ b/tools/CalypTools.h @@ -83,7 +83,7 @@ private: std::vector m_apcInputStreams; std::vector m_apcOutputStreams; - void reportStreamInfo( const CalypStream* stream ); + void reportStreamInfo( const CalypStream* stream, ClpString strPrefix = "" ); int openInputs(); std::vector readInput();