diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:30:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-19 15:07:30 +0200 |
| commit | ca981c8cfa23111e92be329f1c2dfbe3a07b4247 (patch) | |
| tree | 2a0ceab2864691f910c9c7d70127542868f9f8e5 /src/lib/writer.cc | |
| parent | cabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (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/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 14 |
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 () |
