std::shared_ptr<const Film> _film;
+ time_t _start_time = 0;
+ time_t _finish_time = 0;
+
private:
void run_wrapper ();
/** a message that should be given to the user when the job finishes */
boost::optional<std::string> _message;
- /** time that this job was started */
- time_t _start_time;
/** time that this sub-job was started */
time_t _sub_start_time;
std::string _sub_name;
- time_t _finish_time = 0;
/** mutex for _progress and _last_progress_update */
mutable boost::mutex _progress_mutex;
}
}
- struct timeval start;
- gettimeofday (&start, 0);
LOG_GENERAL_NC (N_("Transcode job starting"));
DCPOMATIC_ASSERT (_encoder);
_encoder->go ();
- struct timeval finish;
- gettimeofday (&finish, 0);
-
float fps = 0;
- if (finish.tv_sec != start.tv_sec) {
- fps = _encoder->frames_done() / (finish.tv_sec - start.tv_sec);
+ if (_finish_time != _start_time) {
+ fps = _encoder->frames_done() / (_finish_time - _start_time);
}
LOG_GENERAL (N_("Transcode job completed successfully: %1 fps"), dcp::locale_convert<string>(fps, 2, true));