aboutsummaryrefslogtreecommitdiffstats
path: root/src/InputFileReader.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-20 14:42:22 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-20 14:42:22 +0100
commit4422ab97c43e13735d274219a2957aae7ec60d76 (patch)
treef85e6899bb832f93060921cb06f45cd7eefa2ada /src/InputFileReader.cpp
parent645b9e87fc5dab2cf87bfef1d5b2ba2ce2f85089 (diff)
downloaddabmod-4422ab97c43e13735d274219a2957aae7ec60d76.tar.gz
dabmod-4422ab97c43e13735d274219a2957aae7ec60d76.tar.bz2
dabmod-4422ab97c43e13735d274219a2957aae7ec60d76.zip
Stop using fprintf in input information
Diffstat (limited to 'src/InputFileReader.cpp')
-rw-r--r--src/InputFileReader.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/InputFileReader.cpp b/src/InputFileReader.cpp
index 5d4d113..5a9780b 100644
--- a/src/InputFileReader.cpp
+++ b/src/InputFileReader.cpp
@@ -190,31 +190,31 @@ int InputFileReader::IdentifyType()
return -1;
}
-void InputFileReader::PrintInfo() const
+std::string InputFileReader::GetPrintableInfo() const
{
- fprintf(stderr, "Input file format: ");
+ std::string info = "Input file format: ";
switch (streamtype_) {
case EtiStreamType::Raw:
- fprintf(stderr, "raw");
+ info += "raw";
break;
case EtiStreamType::Streamed:
- fprintf(stderr, "streamed");
+ info += "streamed";
break;
case EtiStreamType::Framed:
- fprintf(stderr, "framed");
+ info += "framed";
break;
default:
- fprintf(stderr, "unknown!");
+ info += "unknown!";
break;
}
- fprintf(stderr, "\n");
- fprintf(stderr, "Input file length: %zu\n", inputfilelength_);
+ info += ", length: " + std::to_string(inputfilelength_);
if (~nbframes_ != 0) {
- fprintf(stderr, "Input file nb frames: %lu\n", nbframes_);
+ info += ", nb frames: " + std::to_string(nbframes_);
}
else {
- fprintf(stderr, "Input file nb frames: endless\n");
+ info += ", nb frames: endless";
}
+ return info;
}
int InputFileReader::GetNextFrame(void* buffer)