summaryrefslogtreecommitdiff
path: root/src/lib/writer.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 13:42:24 +0200
commita0c931b6bfb05b56996a75bbfcf378cd44ef18e1 (patch)
treed02d8cb5ef0fd0f8ce0751bf17fab9c98ffd1868 /src/lib/writer.cc
parentcabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (diff)
Make Atmos content work more like other content. Now its MXFsencrypt-atmos
are re-written, meaning that they can be encrypted. This commit is mostly just for the backend. We also need a fair few checks/restrictions in the UI: - any present atmos content dictates the project frame rate - no mixed edit rates of atmos content - probably some other things I haven't thought of
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 8682437b3..7d1088276 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -97,6 +97,7 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
BOOST_FOREACH (DCPTextTrack i, _film->closed_caption_tracks()) {
_caption_reels[i] = _reels.begin ();
}
+ _atmos_reel = _reels.begin ();
/* Check that the signer is OK */
string reason;
@@ -303,6 +304,19 @@ Writer::write (shared_ptr<const AudioBuffers> audio, DCPTime const time)
}
+void
+Writer::write (shared_ptr<const dcp::AtmosFrame> atmos, DCPTime time, AtmosMetadata metadata)
+{
+ if (_atmos_reel->period().to == time) {
+ ++_atmos_reel;
+ DCPOMATIC_ASSERT (_atmos_reel != _reels.end());
+ }
+
+ /* We assume that we get a video frame's worth of data here */
+ _atmos_reel->write (atmos, metadata);
+}
+
+
/** Caller must hold a lock on _state_mutex */
bool
Writer::have_sequenced_image_at_queue_head ()