summaryrefslogtreecommitdiff
path: root/src/lib/player.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/player.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/player.cc')
-rw-r--r--src/lib/player.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index fc821d6c7..b45401fa9 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -18,6 +18,7 @@
*/
+#include "atmos_decoder.h"
#include "player.h"
#include "film.h"
#include "audio_buffers.h"
@@ -193,12 +194,9 @@ Player::setup_pieces_unlocked ()
}
shared_ptr<Decoder> decoder = decoder_factory (_film, i, _fast, _tolerant, old_decoder);
- FrameRateChange frc (_film, i);
+ DCPOMATIC_ASSERT (decoder);
- if (!decoder) {
- /* Not something that we can decode; e.g. Atmos content */
- continue;
- }
+ FrameRateChange frc (_film, i);
if (decoder->video && _ignore_video) {
decoder->video->set_ignore (true);
@@ -253,6 +251,10 @@ Player::setup_pieces_unlocked ()
++j;
}
+
+ if (decoder->atmos) {
+ decoder->atmos->Data.connect (bind(&Player::atmos, this, weak_ptr<Piece>(piece), _1));
+ }
}
_stream_states.clear ();
@@ -1270,3 +1272,10 @@ Player::playlist () const
return _playlist ? _playlist : _film->playlist();
}
+
+void
+Player::atmos (weak_ptr<Piece>, ContentAtmos data)
+{
+ Atmos (data.data, DCPTime::from_frames(data.frame, _film->video_frame_rate()), data.metadata);
+}
+