#include <fstream>
#include <cerrno>
#include <iostream>
+#include <cfloat>
#include "i18n.h"
int reel_index = 0;
list<DCPTimePeriod> const reels = _film->reels ();
BOOST_FOREACH (DCPTimePeriod p, reels) {
- _reels.push_back (ReelWriter (film, p, job, reel_index++, reels.size()));
+ _reels.push_back (ReelWriter (film, p, job, reel_index++, reels.size(), _film->content_summary(p)));
}
/* We can keep track of the current audio and subtitle reels easily because audio
LOG_WARNING (N_("Finishing writer with a left-over queue of %1:"), _queue.size());
for (list<QueueItem>::const_iterator i = _queue.begin(); i != _queue.end(); ++i) {
if (i->type == QueueItem::FULL) {
- LOG_WARNING (N_("- type FULL, frame %1, eyes %2"), i->frame, i->eyes);
+ LOG_WARNING (N_("- type FULL, frame %1, eyes %2"), i->frame, (int) i->eyes);
} else {
- LOG_WARNING (N_("- type FAKE, size %1, frame %2, eyes %3"), i->size, i->frame, i->eyes);
+ LOG_WARNING (N_("- type FAKE, size %1, frame %2, eyes %3"), i->size, i->frame, (int) i->eyes);
}
}
}
switch (qi.type) {
case QueueItem::FULL:
- LOG_DEBUG_ENCODE (N_("Writer FULL-writes %1 (%2)"), qi.frame, qi.eyes);
+ LOG_DEBUG_ENCODE (N_("Writer FULL-writes %1 (%2)"), qi.frame, (int) qi.eyes);
if (!qi.encoded) {
qi.encoded = Data (_film->j2c_path (qi.reel, qi.frame, qi.eyes, false));
}
DCPOMATIC_ASSERT (i != _queue.rend());
++_pushed_to_disk;
+ /* For the log message below */
+ int const awaiting = _reels[_queue.front().reel].last_written_video_frame();
lock.unlock ();
/* i is valid here, even though we don't hold a lock on the mutex,
thread could erase the last item in the list.
*/
- LOG_GENERAL ("Writer full; pushes %1 to disk", i->frame);
+ LOG_GENERAL ("Writer full; pushes %1 to disk while awaiting %2", i->frame, awaiting);
i->encoded->write_via_temp (
_film->j2c_path (i->reel, i->frame, i->eyes, true),
}
}
- dcp.write_xml (_film->interop () ? dcp::INTEROP : dcp::SMPTE, meta, signer, Config::instance()->dcp_filename_format());
+ dcp.write_xml (_film->interop () ? dcp::INTEROP : dcp::SMPTE, meta, signer, Config::instance()->dcp_metadata_filename_format());
LOG_GENERAL (
N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT, %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk
_digest_progresses[boost::this_thread::get_id()] = progress;
boost::mutex::scoped_lock lm (_digest_progresses_mutex);
- float min_progress = 0;
+ float min_progress = FLT_MAX;
for (map<boost::thread::id, float>::const_iterator i = _digest_progresses.begin(); i != _digest_progresses.end(); ++i) {
min_progress = min (min_progress, i->second);
}