*/
+
+#include "audio_analysis.h"
+#include "audio_content.h"
+#include "audio_processor.h"
+#include "compose.hpp"
+#include "content.h"
+#include "cross.h"
#include "dcp_content_type.h"
-#include "hints.h"
-#include "types.h"
#include "film.h"
-#include "content.h"
-#include "video_content.h"
-#include "text_content.h"
-#include "audio_processor.h"
#include "font.h"
#include "font_data.h"
+#include "hints.h"
+#include "player.h"
#include "ratio.h"
-#include "audio_analysis.h"
-#include "compose.hpp"
+#include "text_content.h"
+#include "types.h"
#include "util.h"
-#include "cross.h"
-#include "player.h"
+#include "video_content.h"
#include "writer.h"
#include <dcp/cpl.h>
#include <dcp/raw_convert.h>
#include "i18n.h"
+
using std::cout;
using std::make_shared;
using std::max;
}
+
void
Hints::start ()
{
_thread = boost::thread (bind(&Hints::thread, this));
}
+
Hints::~Hints ()
{
boost::this_thread::disable_interruption dis;
{
auto const film_container = film()->container()->id();
if (film_container != "185" && film_container != "239") {
- hint (_("Your DCP uses an unusual container ratio. This may cause problems on some projectors. If possible, use Flat or Scope for the DCP container ratio"));
+ hint (_("Your DCP uses an unusual container ratio. This may cause problems on some projectors. If possible, use Flat or Scope for the DCP container ratio."));
}
}
for (auto i: film()->content()) {
for (auto j: i->text) {
for (auto k: j->fonts()) {
- optional<boost::filesystem::path> const p = k->file ();
+ auto const p = k->file ();
if (p && boost::filesystem::file_size(p.get()) >= (MAX_FONT_FILE_SIZE - SIZE_SLACK)) {
big_font_files = true;
}
{
int vob = 0;
for (auto i: film()->content()) {
- if (boost::algorithm::starts_with (i->path(0).filename().string(), "VTS_")) {
+ if (boost::algorithm::starts_with(i->path(0).filename().string(), "VTS_")) {
++vob;
}
}
ch = ch.substr (0, ch.length() - 2);
- if (!ch.empty ()) {
- hint (String::compose (
+ if (!ch.empty()) {
+ hint(String::compose(
_("Your audio level is very high (on %1). You should reduce the gain of your audio content."),
ch
)
bool ccap_mxf_too_big = false;
bool subs_mxf_too_big = false;
- boost::filesystem::path dcp_dir = film->dir("hints") / dcpomatic::get_process_id();
+ auto dcp_dir = film->dir("hints") / dcpomatic::get_process_id();
boost::filesystem::remove_all (dcp_dir);
_writer->finish (film->dir("hints") / dcpomatic::get_process_id());
store_current ();
}
+
void
Hints::hint (string h)
{