X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fencoded_log_entry.cc;h=2da84dacdd0a1946c9e2709ef6e288444787d1c8;hb=7c730205e50014347bd96ab9735346d0b5922798;hp=84c7a6ca6ba61e252bc731173988ae20b885573b;hpb=422be0eece2bf6ee80db1d3c21553cd82efff789;p=dcpomatic.git diff --git a/src/lib/encoded_log_entry.cc b/src/lib/encoded_log_entry.cc index 84c7a6ca6..2da84dacd 100644 --- a/src/lib/encoded_log_entry.cc +++ b/src/lib/encoded_log_entry.cc @@ -19,10 +19,9 @@ */ #include "encoded_log_entry.h" -#include +#include using std::string; -using std::fixed; EncodedLogEntry::EncodedLogEntry (int frame, string ip, double receive, double encode, double send) : LogEntry (LogEntry::TYPE_GENERAL) @@ -38,13 +37,7 @@ EncodedLogEntry::EncodedLogEntry (int frame, string ip, double receive, double e string EncodedLogEntry::message () const { - locked_stringstream m; - m.precision (2); - m << fixed - << "Encoded frame " << _frame << " from " << _ip << ": " - << "receive " << _receive << "s " - << "encode " << _encode << "s " - << "send " << _send << "s."; - - return m.str (); + char buffer[256]; + snprintf (buffer, sizeof(buffer), "Encoded frame %d from %s: receive %.2fs encode %.2fs send %.2fs.", _frame, _ip.c_str(), _receive, _encode, _send); + return buffer; }