summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcpomatic_socket.h1
-rw-r--r--src/lib/film.cc25
-rw-r--r--src/lib/film.h3
3 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_socket.h b/src/lib/dcpomatic_socket.h
index 6f7c05e22..870e7315c 100644
--- a/src/lib/dcpomatic_socket.h
+++ b/src/lib/dcpomatic_socket.h
@@ -19,6 +19,7 @@
*/
#include <boost/asio.hpp>
+#include <boost/noncopyable.hpp>
/** @class Socket
* @brief A class to wrap a boost::asio::ip::tcp::socket with some things
diff --git a/src/lib/film.cc b/src/lib/film.cc
index f4745d099..e7861a032 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -1220,6 +1220,31 @@ Film::playlist_change (ChangeType type)
{
signal_change (type, CONTENT);
signal_change (type, NAME);
+
+ if (type == CHANGE_TYPE_DONE) {
+ /* Check that this change hasn't made our settings inconsistent */
+ bool change_made = false;
+ BOOST_FOREACH (shared_ptr<Content> i, content()) {
+ shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
+ if (!d) {
+ continue;
+ }
+
+ string why_not;
+ if (d->reference_video() && !d->can_reference_video(shared_from_this(), why_not)) {
+ d->set_reference_video(false);
+ change_made = true;
+ }
+ if (d->reference_audio() && !d->can_reference_audio(shared_from_this(), why_not)) {
+ d->set_reference_audio(false);
+ change_made = true;
+ }
+ }
+
+ if (change_made) {
+ Message (_("DCP-o-matic had to change your settings for referring to DCPs as OV. Please review those settings to make sure they are what you want."));
+ }
+ }
}
void
diff --git a/src/lib/film.h b/src/lib/film.h
index 7fdd4d269..b77ce7a76 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -334,6 +334,9 @@ public:
/** Emitted when some property of our content has changed */
mutable boost::signals2::signal<void (ChangeType, boost::weak_ptr<Content>, int, bool)> ContentChange;
+ /** Emitted when we have something important to tell the user */
+ boost::signals2::signal<void (std::string)> Message;
+
/** Current version number of the state file */
static int const current_state_version;