summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-10-14 23:10:32 +0200
committerCarl Hetherington <cth@carlh.net>2024-10-14 23:10:32 +0200
commitfd192ff95e34630158a4ceb08e65099120629a3b (patch)
tree0ff728c3548440d9d63365e1c7d3edc739f25187 /src/lib
parentf395c664aedb5bf022ddcde91c6e0c6531209a5d (diff)
parent2c26dd2573977a940d003a58f2ccd408a5657aab (diff)
Merge remote-tracking branch 'origin/main' into v2.17.x
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/change_signaller.h8
-rw-r--r--src/lib/cross.h1
-rw-r--r--src/lib/email.cc2
-rw-r--r--src/lib/hints.cc19
4 files changed, 14 insertions, 16 deletions
diff --git a/src/lib/change_signaller.h b/src/lib/change_signaller.h
index 1d7d482df..0b2c1539d 100644
--- a/src/lib/change_signaller.h
+++ b/src/lib/change_signaller.h
@@ -87,21 +87,19 @@ public:
{
boost::mutex::scoped_lock lm(_mutex);
auto pending = _pending;
+ _pending.clear();
+ _suspended = false;
lm.unlock();
for (auto signal: pending) {
signal.thing->signal_change(signal.type, signal.property);
}
-
- lm.lock();
- _pending.clear();
- _suspended = false;
}
static ChangeSignalDespatcher* instance()
{
static boost::mutex _instance_mutex;
- static boost::mutex::scoped_lock lm(_instance_mutex);
+ boost::mutex::scoped_lock lm(_instance_mutex);
static ChangeSignalDespatcher<T, P>* _instance;
if (!_instance) {
_instance = new ChangeSignalDespatcher<T, P>();
diff --git a/src/lib/cross.h b/src/lib/cross.h
index 150199561..78a73b13e 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -25,6 +25,7 @@
#ifndef DCPOMATIC_CROSS_H
#define DCPOMATIC_CROSS_H
+#include <list>
#ifdef DCPOMATIC_OSX
#include <IOKit/pwr_mgt/IOPMLib.h>
#endif
diff --git a/src/lib/email.cc b/src/lib/email.cc
index 6b4012c22..7a6e58d91 100644
--- a/src/lib/email.cc
+++ b/src/lib/email.cc
@@ -237,7 +237,7 @@ Email::send(string server, int port, EmailProtocol protocol, string user, string
auto const r = curl_easy_perform (curl);
if (r != CURLE_OK) {
- throw NetworkError (_("Failed to send email"), string(curl_easy_strerror(r)));
+ throw NetworkError(_("Failed to send email"), String::compose("%1 sending to %2:%3", curl_easy_strerror(r), server, port));
}
curl_slist_free_all (recipients);
diff --git a/src/lib/hints.cc b/src/lib/hints.cc
index 9a947f98d..4a13f77a0 100644
--- a/src/lib/hints.cc
+++ b/src/lib/hints.cc
@@ -56,7 +56,6 @@ using std::shared_ptr;
using std::string;
using std::weak_ptr;
using boost::optional;
-using boost::bind;
using namespace dcpomatic;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
@@ -87,7 +86,7 @@ Hints::Hints (weak_ptr<const Film> weak_film)
void
Hints::start ()
{
- _thread = boost::thread (bind(&Hints::thread, this));
+ _thread = boost::thread(boost::bind(&Hints::thread, this));
}
@@ -412,11 +411,11 @@ Hints::scan_content(shared_ptr<const Film> film)
}
if (check_loudness_done && have_text) {
- emit (bind(boost::ref(Progress), _("Examining subtitles and closed captions")));
+ emit(boost::bind(boost::ref(Progress), _("Examining subtitles and closed captions")));
} else if (!check_loudness_done && !have_text) {
- emit (bind(boost::ref(Progress), _("Examining audio")));
+ emit(boost::bind(boost::ref(Progress), _("Examining audio")));
} else {
- emit (bind(boost::ref(Progress), _("Examining audio, subtitles and closed captions")));
+ emit(boost::bind(boost::ref(Progress), _("Examining audio, subtitles and closed captions")));
}
auto player = make_shared<Player>(film, Image::Alignment::COMPACT);
@@ -426,9 +425,9 @@ Hints::scan_content(shared_ptr<const Film> film)
player->set_ignore_audio();
} else {
/* Send auto to the analyser to check loudness */
- player->Audio.connect(bind(&Hints::audio, this, _1, _2));
+ player->Audio.connect(boost::bind(&Hints::audio, this, _1, _2));
}
- player->Text.connect(bind(&Hints::text, this, _1, _2, _3, _4));
+ player->Text.connect(boost::bind(&Hints::text, this, _1, _2, _3, _4));
struct timeval last_pulse;
gettimeofday(&last_pulse, 0);
@@ -443,7 +442,7 @@ Hints::scan_content(shared_ptr<const Film> film)
if (_stop) {
return;
}
- emit(bind(boost::ref(Pulse)));
+ emit(boost::bind(boost::ref(Pulse)));
last_pulse = now;
}
}
@@ -536,7 +535,7 @@ try
}
dcp::filesystem::remove_all(dcp_dir);
- emit (bind(boost::ref(Finished)));
+ emit(boost::bind(boost::ref(Finished)));
}
catch (boost::thread_interrupted)
{
@@ -551,7 +550,7 @@ catch (...)
void
Hints::hint (string h)
{
- emit(bind(boost::ref(Hint), h));
+ emit(boost::bind(boost::ref(Hint), h));
}