No-op: remove all trailing whitespace.
[dcpomatic.git] / src / lib / transcode_job.cc
index 23a46d06dddcb7875a9247911d387028a0da802e..4a2d768f479c7c67fa600ef46c56954d5a60bae2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -42,10 +42,10 @@ using boost::shared_ptr;
 
 /** @param s Film to use.
  */
-TranscodeJob::TranscodeJob (shared_ptr<const Film> f)
-       : Job (f)
+TranscodeJob::TranscodeJob (shared_ptr<const Film> film)
+       : Job (film)
 {
-       
+
 }
 
 string
@@ -54,6 +54,12 @@ TranscodeJob::name () const
        return String::compose (_("Transcode %1"), _film->name());
 }
 
+string
+TranscodeJob::json_name () const
+{
+       return N_("transcode");
+}
+
 void
 TranscodeJob::run ()
 {
@@ -70,9 +76,6 @@ TranscodeJob::run ()
                _transcoder.reset ();
 
        } catch (...) {
-               set_progress (1);
-               set_state (FINISHED_ERROR);
-               LOG_ERROR_NC (N_("Transcode job failed or cancelled"));
                _transcoder.reset ();
                throw;
        }
@@ -95,9 +98,10 @@ TranscodeJob::status () const
        s << Job::status ();
 
        if (!finished () && !_transcoder->finishing ()) {
-               s << "; " << fixed << setprecision (1) << fps << " " << _("frames per second");
+               /// TRANSLATORS: fps here is an abbreviation for frames per second
+               s << "; " << fixed << setprecision (1) << fps << " " << _("fps");
        }
-       
+
        return s.str ();
 }
 
@@ -107,11 +111,11 @@ TranscodeJob::remaining_time () const
 {
        /* _transcoder might be destroyed by the job-runner thread */
        shared_ptr<Transcoder> t = _transcoder;
-       
+
        if (!t) {
                return 0;
        }
-       
+
        float fps = t->current_encoding_rate ();
 
        if (fps == 0) {