projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix progress message when analysing for hints.
[dcpomatic.git]
/
src
/
lib
/
hints.cc
diff --git
a/src/lib/hints.cc
b/src/lib/hints.cc
index c9f901c1829b1f9346c7dcf5b52d5558513d358f..cfd8a29ddfff2e42709f9c5490c09a5d27b77a2f 100644
(file)
--- a/
src/lib/hints.cc
+++ b/
src/lib/hints.cc
@@
-76,14
+76,6
@@
using namespace boost::placeholders;
Hints::Hints (weak_ptr<const Film> film)
: WeakConstFilm (film)
, _writer (new Writer(film, weak_ptr<Job>(), true))
Hints::Hints (weak_ptr<const Film> film)
: WeakConstFilm (film)
, _writer (new Writer(film, weak_ptr<Job>(), true))
- , _long_ccap (false)
- , _overlap_ccap (false)
- , _too_many_ccap_lines (false)
- , _early_subtitle (false)
- , _short_subtitle (false)
- , _subtitles_too_close (false)
- , _too_many_subtitle_lines (false)
- , _long_subtitle (false)
, _stop (false)
{
, _stop (false)
{
@@
-133,7
+125,7
@@
Hints::check_incorrect_container ()
int scope = 0;
for (auto i: film()->content()) {
if (i->video) {
int scope = 0;
for (auto i: film()->content()) {
if (i->video) {
-
Ratio const *
r = Ratio::nearest_from_ratio(i->video->scaled_size(film()->frame_size()).ratio());
+
auto const
r = Ratio::nearest_from_ratio(i->video->scaled_size(film()->frame_size()).ratio());
if (r && r->id() == "239") {
++scope;
} else if (r && r->id() != "239" && r->id() != "235" && r->id() != "190") {
if (r && r->id() == "239") {
++scope;
} else if (r && r->id() != "239" && r->id() != "235" && r->id() != "190") {
@@
-396,7
+388,7
@@
Hints::thread ()
check_out_of_range_markers ();
check_text_languages ();
check_out_of_range_markers ();
check_text_languages ();
- emit (bind(boost::ref(Progress), _("Examining closed captions")));
+ emit (bind(boost::ref(Progress), _("Examining
subtitles and
closed captions")));
auto player = make_shared<Player>(film);
player->set_ignore_video ();
auto player = make_shared<Player>(film);
player->set_ignore_video ();
@@
-425,6
+417,12
@@
Hints::thread ()
_writer->write (player->get_subtitle_fonts());
_writer->write (player->get_subtitle_fonts());
+ if (_long_subtitle && !_very_long_subtitle) {
+ hint (_("At least one of your subtitle lines has more than 52 characters. It is recommended to make each line 52 characters at most in length."));
+ } else if (_very_long_subtitle) {
+ hint (_("At least one of your subtitle lines has more than 79 characters. You should make each line 79 characters at most in length."));
+ }
+
bool ccap_xml_too_big = false;
bool ccap_mxf_too_big = false;
bool subs_mxf_too_big = false;
bool ccap_xml_too_big = false;
bool ccap_mxf_too_big = false;
bool subs_mxf_too_big = false;
@@
-562,9
+560,12
@@
Hints::open_subtitle (PlayerText text, DCPTimePeriod period)
longest_line = max (longest_line, i.text().length());
}
longest_line = max (longest_line, i.text().length());
}
- if (longest_line > 52
&& !_long_subtitle
) {
+ if (longest_line > 52) {
_long_subtitle = true;
_long_subtitle = true;
- hint (_("At least one of your subtitle lines has more than 52 characters. It is advisable to make each line 52 characters at most in length."));
+ }
+
+ if (longest_line > 79) {
+ _very_long_subtitle = true;
}
_last_subtitle = period;
}
_last_subtitle = period;
@@
-595,7
+596,8
@@
Hints::check_text_languages ()
for (auto j: i->text) {
if (j->use() && !j->language()) {
hint (_("At least one piece of subtitle or closed caption content has no specified language. "
for (auto j: i->text) {
if (j->use() && !j->language()) {
hint (_("At least one piece of subtitle or closed caption content has no specified language. "
- "It is advisable to set the language for each piece of subtitle or closed caption content in the \"Content→Timed Text\" tab"));
+ "It is advisable to set the language for each piece of subtitle or closed caption content "
+ "in the \"Content→Timed text\", \"Content→Open subtitles\" or \"Content→Closed captions\" tab."));
return;
}
}
return;
}
}