r = system (String::compose("nautilus \"%1\"", dir.string()).c_str());
return static_cast<bool>(WEXITSTATUS(r));
} else {
- int r = system ("which konqueror");
+ r = system ("which konqueror");
if (WEXITSTATUS(r) == 0) {
r = system (String::compose("konqueror \"%1\"", dir.string()).c_str());
return static_cast<bool>(WEXITSTATUS(r));
LOG_DISK("Having a look through %1 locked volumes", locked_volumes.size());
bool locked = false;
- for (auto const& i: locked_volumes) {
- if (i.second == physical_drive) {
+ for (auto const& j: locked_volumes) {
+ if (j.second == physical_drive) {
locked = true;
}
}
auto ref = dynamic_pointer_cast<FFmpegContent> (c[0]);
DCPOMATIC_ASSERT (ref);
- for (size_t i = 0; i < c.size(); ++i) {
- auto fc = dynamic_pointer_cast<FFmpegContent>(c[i]);
+ for (size_t j = 0; j < c.size(); ++j) {
+ auto fc = dynamic_pointer_cast<FFmpegContent>(c[j]);
if (fc->only_text() && fc->only_text()->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) {
throw JoinError (_("Content to be joined must use the same subtitle stream."));
}
auto images = graph->process (_frame);
- for (auto const& i: images) {
+ for (auto const& j: images) {
- auto image = i.first;
+ auto image = j.first;
- if (i.second != AV_NOPTS_VALUE) {
- double const pts = i.second * av_q2d(_format_context->streams[_video_stream.get()]->time_base) + _pts_offset.seconds();
+ if (j.second != AV_NOPTS_VALUE) {
+ double const pts = j.second * av_q2d(_format_context->streams[_video_stream.get()]->time_base) + _pts_offset.seconds();
video->emit (
film(),
/* Invalid region subtag; just ignore it */
}
}
- if (auto audio_language = isdcf->optional_string_child("AudioLanguage")) {
+ if (auto isdcf_audio_language = isdcf->optional_string_child("AudioLanguage")) {
try {
- _audio_language = dcp::LanguageTag(*audio_language);
+ _audio_language = dcp::LanguageTag(*isdcf_audio_language);
} catch (...) {
/* Invalid language tag; just ignore it */
}
}
bool any_text = false;
- for (int i = 0; i < static_cast<int>(TextType::COUNT); ++i) {
- if (dc->reference_text(static_cast<TextType>(i))) {
+ for (int j = 0; j < static_cast<int>(TextType::COUNT); ++j) {
+ if (dc->reference_text(static_cast<TextType>(j))) {
any_text = true;
}
}
if (Config::instance()->automatic_audio_analysis() && content->audio && !disable_audio_analysis) {
auto playlist = make_shared<Playlist>();
playlist->add (shared_from_this(), content);
- boost::signals2::connection c;
+ boost::signals2::connection connection;
JobManager::instance()->analyse_audio (
- shared_from_this(), playlist, false, c, bind (&Film::audio_analysis_finished, this)
+ shared_from_this(), playlist, false, connection, bind (&Film::audio_analysis_finished, this)
);
- _audio_analysis_connections.push_back (c);
+ _audio_analysis_connections.push_back (connection);
}
}
}
boost::algorithm::replace_all (body, "$SCREENS", screens.substr (0, screens.length() - 2));
- Emailer email (config->kdm_from(), i.front()->emails(), subject, body);
+ Emailer emailer (config->kdm_from(), i.front()->emails(), subject, body);
- for (auto i: config->kdm_cc()) {
- email.add_cc (i);
+ for (auto cc: config->kdm_cc()) {
+ emailer.add_cc (cc);
}
if (!config->kdm_bcc().empty()) {
- email.add_bcc (config->kdm_bcc());
+ emailer.add_bcc (config->kdm_bcc());
}
- email.add_attachment (zip_file, container_name_format.get(i.front()->name_values(), ".zip"), "application/zip");
+ emailer.add_attachment (zip_file, container_name_format.get(i.front()->name_values(), ".zip"), "application/zip");
try {
- email.send (config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
+ emailer.send (config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
} catch (...) {
boost::filesystem::remove (zip_file);
dcpomatic_log->log ("Email content follows", LogEntry::TYPE_DEBUG_EMAIL);
- dcpomatic_log->log (email.email(), LogEntry::TYPE_DEBUG_EMAIL);
+ dcpomatic_log->log (emailer.email(), LogEntry::TYPE_DEBUG_EMAIL);
dcpomatic_log->log ("Email session follows", LogEntry::TYPE_DEBUG_EMAIL);
- dcpomatic_log->log (email.notes(), LogEntry::TYPE_DEBUG_EMAIL);
+ dcpomatic_log->log (emailer.notes(), LogEntry::TYPE_DEBUG_EMAIL);
throw;
}
boost::filesystem::remove (zip_file);
dcpomatic_log->log ("Email content follows", LogEntry::TYPE_DEBUG_EMAIL);
- dcpomatic_log->log (email.email(), LogEntry::TYPE_DEBUG_EMAIL);
+ dcpomatic_log->log (emailer.email(), LogEntry::TYPE_DEBUG_EMAIL);
dcpomatic_log->log ("Email session follows", LogEntry::TYPE_DEBUG_EMAIL);
- dcpomatic_log->log (email.notes(), LogEntry::TYPE_DEBUG_EMAIL);
+ dcpomatic_log->log (emailer.notes(), LogEntry::TYPE_DEBUG_EMAIL);
}
}
}
if (_ignore_text) {
- for (auto i: decoder->text) {
- i->set_ignore (true);
+ for (auto text: decoder->text) {
+ text->set_ignore (true);
}
}
mapped = film->mapped_audio_channels ();
}
- for (auto i: mapped) {
- if (_channel_checkbox[i]) {
- _channel_checkbox[i]->SetValue (true);
- _plot->set_channel_visible (i, true);
+ for (auto channel: mapped) {
+ if (_channel_checkbox[channel]) {
+ _channel_checkbox[channel]->SetValue (true);
+ _plot->set_channel_visible (channel, true);
}
}
}
}
if (i == AudioPoint::COUNT) {
- for (int i = 0; i < AudioPoint::COUNT; ++i) {
- _type_checkbox[i]->SetValue (true);
- _plot->set_type_visible (i, true);
+ for (int j = 0; j < AudioPoint::COUNT; ++j) {
+ _type_checkbox[j]->SetValue (true);
+ _plot->set_type_visible (j, true);
}
}
}
if (_analysis->overall_true_peak()) {
- float const peak = _analysis->overall_true_peak().get();
- float const peak_dB = linear_to_db(peak) + _analysis->gain_correction(_playlist);
+ float const true_peak = _analysis->overall_true_peak().get();
+ float const true_peak_dB = linear_to_db(true_peak) + _analysis->gain_correction(_playlist);
- _true_peak->SetLabel (wxString::Format (_("True peak is %.2fdB"), peak_dB));
+ _true_peak->SetLabel (wxString::Format (_("True peak is %.2fdB"), true_peak_dB));
- if (peak_dB > -3) {
+ if (true_peak_dB > -3) {
_true_peak->SetForegroundColour (wxColour (255, 0, 0));
} else {
_true_peak->SetForegroundColour (wxColour (0, 0, 0));