summaryrefslogtreecommitdiff
path: root/src/lib/film.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-06-19 13:30:02 +0200
committerCarl Hetherington <cth@carlh.net>2020-06-19 15:07:30 +0200
commitca981c8cfa23111e92be329f1c2dfbe3a07b4247 (patch)
tree2a0ceab2864691f910c9c7d70127542868f9f8e5 /src/lib/film.cc
parentcabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (diff)
Make Atmos content work more like other content. Now its MXFsv2.15.82
are re-written, meaning that they can be encrypted. This (along with the libdcp update) also fixes assorted Atmos bugs.
Diffstat (limited to 'src/lib/film.cc')
-rw-r--r--src/lib/film.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index c04f2996f..dafe158b0 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -23,6 +23,7 @@
* how they should be presented in a DCP.
*/
+#include "atmos_content.h"
#include "film.h"
#include "job.h"
#include "util.h"
@@ -1397,6 +1398,21 @@ Film::playlist_change (ChangeType type)
void
Film::check_settings_consistency ()
{
+ optional<int> atmos_rate;
+ BOOST_FOREACH (shared_ptr<Content> i, content()) {
+
+ if (i->atmos) {
+ int rate = lrintf (i->atmos->edit_rate().as_float());
+ if (atmos_rate && *atmos_rate != rate) {
+ Message (_("You have more than one piece of Atmos content, and they do not have the same frame rate. You must remove some Atmos content."));
+ } else if (!atmos_rate && rate != video_frame_rate()) {
+ atmos_rate = rate;
+ set_video_frame_rate (rate, false);
+ Message (_("DCP-o-matic had to change your settings so that the film's frame rate is the same as that of your Atmos content."));
+ }
+ }
+ }
+
bool change_made = false;
BOOST_FOREACH (shared_ptr<Content> i, content()) {
shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
@@ -1779,6 +1795,18 @@ Film::references_dcp_audio () const
return false;
}
+
+bool
+Film::contains_atmos_content () const
+{
+ BOOST_FOREACH (shared_ptr<Content> i, _playlist->content()) {
+ if (i->atmos) {
+ return true;
+ }
+ }
+}
+
+
list<DCPTextTrack>
Film::closed_caption_tracks () const
{