diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-01-27 23:20:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-16 01:20:17 +0100 |
| commit | 1f4f56b4d5e3d08be5ff823c9890a8b4e0af5967 (patch) | |
| tree | c73cd840eea3b320c3307f4dcd3449fc4e6f1bd1 /src/lib/dcp_content.cc | |
| parent | f015d6b314a6bfc8534e3e2c331d6edd5f817e25 (diff) | |
Separate some things out from the examination process.
Diffstat (limited to 'src/lib/dcp_content.cc')
| -rw-r--r-- | src/lib/dcp_content.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index ce4b552f9..1f1e7294b 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -280,11 +280,10 @@ DCPContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool toler boost::mutex::scoped_lock lm(_mutex); audio = make_shared<AudioContent>(this); } - auto as = make_shared<AudioStream>(examiner->audio_frame_rate(), examiner->audio_length(), examiner->audio_channels(), 24); - audio->set_stream(as); - auto m = as->mapping(); - m.make_default(film ? film->audio_processor() : 0); - as->set_mapping(m); + + audio->set_stream( + make_shared<AudioStream>(examiner->audio_frame_rate(), examiner->audio_length(), examiner->audio_channels(), 24) + ); _active_audio_channels = examiner->active_audio_channels(); _audio_language = examiner->audio_language(); @@ -374,6 +373,21 @@ DCPContent::examine(shared_ptr<const Film> film, shared_ptr<Job> job, bool toler } } + +void +DCPContent::prepare_for_add_to_film(shared_ptr<const Film> film) +{ + boost::mutex::scoped_lock lm(_mutex); + + if (audio) { + auto as = audio->stream(); + auto m = as->mapping(); + m.make_default(film->audio_processor()); + as->set_mapping(m); + } +} + + string DCPContent::summary() const { |
