+ /* We stop here if we have been asked to finish, and if either the queue
+ is empty or we do not have a sequenced image at its head (if this is the
+ case we will never terminate as no new frames will be sent once
+ _finish is true).
+ */
+ if (_finish && (!have_sequenced_image_at_queue_head() || _queue.empty())) {
+ done_something = true;
+ /* (Hopefully temporarily) log anything that was not written */
+ if (!_queue.empty() && !have_sequenced_image_at_queue_head()) {
+ 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) {
+ LOG_WARNING (N_("- type %1, size %2, frame %3, eyes %4"), i->type, i->size, i->frame, i->eyes);
+ }
+ LOG_WARNING (N_("Last written frame %1, last written eyes %2"), _last_written_frame, _last_written_eyes);
+ }
+ return;
+ }