projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reel index/count to DCP filename format.
[dcpomatic.git]
/
src
/
lib
/
transcode_job.cc
diff --git
a/src/lib/transcode_job.cc
b/src/lib/transcode_job.cc
index 7144f70d5127242fd7dca122e94713f1b761d2ff..8e56603302e1200382197965d51b8c0cbf0f1ee1 100644
(file)
--- a/
src/lib/transcode_job.cc
+++ b/
src/lib/transcode_job.cc
@@
-28,7
+28,7
@@
#include "film.h"
#include "transcoder.h"
#include "log.h"
#include "film.h"
#include "transcoder.h"
#include "log.h"
-#include
"safe_stringstream.h"
+#include
<locked_sstream.h>
#include "compose.hpp"
#include <iostream>
#include <iomanip>
#include "compose.hpp"
#include <iostream>
#include <iomanip>
@@
-112,7
+112,7
@@
TranscodeJob::status () const
return Job::status ();
}
return Job::status ();
}
-
SafeStringS
tream s;
+
locked_strings
tream s;
s << Job::status ();
s << Job::status ();
@@
-133,10
+133,13
@@
TranscodeJob::remaining_time () const
/* _transcoder might be destroyed by the job-runner thread */
shared_ptr<Transcoder> t = _transcoder;
/* _transcoder might be destroyed by the job-runner thread */
shared_ptr<Transcoder> t = _transcoder;
- if (!t) {
- return 0;
+ if (!t || t->finishing()) {
+ /* We aren't doing any actual encoding so just use the job's guess */
+ return Job::remaining_time ();
}
}
+ /* We're encoding so guess based on the current encoding rate */
+
float fps = t->current_encoding_rate ();
if (fps == 0) {
float fps = t->current_encoding_rate ();
if (fps == 0) {