diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:30:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:42:24 +0200 |
| commit | a0c931b6bfb05b56996a75bbfcf378cd44ef18e1 (patch) | |
| tree | d02d8cb5ef0fd0f8ce0751bf17fab9c98ffd1868 /src/lib/player.cc | |
| parent | cabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (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/player.cc')
| -rw-r--r-- | src/lib/player.cc | 19 |
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); +} + |
