+ shared_ptr<const Film> film = _film.lock ();
+ DCPOMATIC_ASSERT (film);
+
+ list<shared_ptr<ScreenKDM> > screen_kdms;
+ try {
+ /* Start off by enabling forensic marking for all */
+ optional<int> for_audio;
+ if (!_output->forensic_mark_audio()) {
+ /* No forensic marking for audio */
+ for_audio = 0;
+ } else if (_output->forensic_mark_audio_up_to()) {
+ /* Forensic mark up to this channel; disabled on channels greater than this */
+ for_audio = _output->forensic_mark_audio_up_to();
+ }
+ screen_kdms = film->make_kdms (
+ _screens->screens(), _cpl->cpl(), _timing->from(), _timing->until(), _output->formulation(),
+ !_output->forensic_mark_video(), for_audio
+ );
+
+ } catch (runtime_error& e) {
+ error_dialog (this, std_to_wx(e.what()));
+ return;
+ }