diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-13 23:22:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-13 23:23:02 +0100 |
| commit | 231c985d402024295f3dbf89be42d31e1c7ff04e (patch) | |
| tree | e35ff086784614173c88f8c5bd9edd0766c81a44 | |
| parent | 6cb2308b3cb68b7950dcb6a216e5ddf1abe961ac (diff) | |
Cleanup: extract pass_atmos().
| -rw-r--r-- | src/lib/dcp_decoder.cc | 13 | ||||
| -rw-r--r-- | src/lib/dcp_decoder.h | 1 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 1dc37d384..9f1a80160 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -205,6 +205,15 @@ DCPDecoder::pass_audio(Frame frame, double video_frame_rate) } +void +DCPDecoder::pass_atmos(Frame frame) +{ + DCPOMATIC_ASSERT (_atmos_metadata); + auto const entry_point = (*_reel)->atmos()->entry_point().get_value_or(0); + atmos->emit (film(), _atmos_reader->get_frame(entry_point + frame), _offset + frame, *_atmos_metadata); +} + + Decoder::PassResult DCPDecoder::pass () { @@ -241,9 +250,7 @@ DCPDecoder::pass () } if (_atmos_reader) { - DCPOMATIC_ASSERT (_atmos_metadata); - auto const entry_point = (*_reel)->atmos()->entry_point().get_value_or(0); - atmos->emit (film(), _atmos_reader->get_frame(entry_point + frame), _offset + frame, *_atmos_metadata); + pass_atmos(frame); } _next += ContentTime::from_frames (1, vfr); diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h index dfe941eb0..56e7a73f5 100644 --- a/src/lib/dcp_decoder.h +++ b/src/lib/dcp_decoder.h @@ -75,6 +75,7 @@ private: void get_readers (); void pass_video(Frame frame, dcp::Size size); void pass_audio(Frame frame, double video_frame_rate); + void pass_atmos(Frame frame); void pass_texts (dcpomatic::ContentTime next, dcp::Size size); void pass_texts ( dcpomatic::ContentTime next, |
