+ if (!export_format && hints) {
+ string const prefix = "Checking project for hints";
+ bool pulse_phase = false;
+ vector<string> hints;
+ bool finished = false;
+
+ Hints hint_finder(film);
+ hint_finder.Progress.connect([prefix](string progress) {
+ std::cout << UP_ONE_LINE_AND_ERASE << prefix << ": " << progress << "\n";
+ std::cout.flush();
+ });
+ hint_finder.Pulse.connect([prefix, &pulse_phase]() {
+ std::cout << UP_ONE_LINE_AND_ERASE << prefix << ": " << (pulse_phase ? "X" : "x") << "\n";
+ std::cout.flush();
+ pulse_phase = !pulse_phase;
+ });
+ hint_finder.Hint.connect([&hints](string hint) {
+ hints.push_back(hint);
+ });
+ hint_finder.Finished.connect([&finished]() {
+ finished = true;
+ });
+
+ std::cout << prefix << ":\n";
+ std::cout.flush();
+
+ hint_finder.start();
+ while (!finished) {
+ signal_manager->ui_idle();
+ dcpomatic_sleep_milliseconds(200);
+ }
+
+ std::cout << UP_ONE_LINE_AND_ERASE;
+
+ if (!hints.empty()) {
+ std::cout << "Hints:\n\n";
+ for (auto hint: hints) {
+ std::cout << word_wrap("* " + hint, 70) << "\n";
+ }
+ std::cout << "*** Encoding aborted because hints were found ***\n\n";
+ std::cout << "Modify your settings and run the command again, or run without\n";
+ std::cout << "the `--hints' option to ignore these hints and encode anyway.\n";
+ exit(EXIT_FAILURE);
+ }
+ }
+