Use SafeStringStream instead of std::stringstream to try to fix random crashes on...
[dcpomatic.git] / src / lib / transcode_job.cc
index fb9a5917956109a8bbe1dcfd57df7d93fa322890..831c74b3b244d9a78b4369eb3d089852c74c9174 100644 (file)
 #include "film.h"
 #include "transcoder.h"
 #include "log.h"
+#include "safe_stringstream.h"
 
 #include "i18n.h"
 
-#define LOG_GENERAL_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::GENERAL);
-#define LOG_ERROR_NC(...) _film->log()->microsecond_log (__VA_ARGS__, Log::ERROR);
+#define LOG_GENERAL_NC(...) _film->log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
+#define LOG_ERROR_NC(...)   _film->log()->log (__VA_ARGS__, Log::TYPE_ERROR);
 
 using std::string;
-using std::stringstream;
 using std::fixed;
 using std::setprecision;
 using boost::shared_ptr;
@@ -53,12 +53,6 @@ TranscodeJob::name () const
        return String::compose (_("Transcode %1"), _film->name());
 }
 
-string
-TranscodeJob::json_name () const
-{
-       return N_("transcode");
-}
-
 void
 TranscodeJob::run ()
 {
@@ -95,7 +89,7 @@ TranscodeJob::status () const
                return Job::status ();
        }
 
-       stringstream s;
+       SafeStringStream s;
 
        s << Job::status ();