+ bool const needed_assets = needs_assets ();
+ bool const needed_kdm = needs_kdm ();
+ string const old_name = name ();
+
+ ContentChangeSignaller cc_texts (this, DCPContentProperty::TEXTS);
+ ContentChangeSignaller cc_assets (this, DCPContentProperty::NEEDS_ASSETS);
+ ContentChangeSignaller cc_kdm (this, DCPContentProperty::NEEDS_KDM);
+ ContentChangeSignaller cc_name (this, DCPContentProperty::NAME);
+
+ if (job) {
+ job->set_progress_unknown ();
+ }
+ Content::examine (film, job);
+
+ auto examiner = make_shared<DCPExaminer>(shared_from_this(), film ? film->tolerant() : true);
+
+ if (examiner->has_video()) {
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ video = make_shared<VideoContent>(this);
+ }
+ video->take_from_examiner (examiner);
+ set_default_colour_conversion ();
+ }
+
+ if (examiner->has_audio()) {
+ {
+ 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());
+ audio->set_stream (as);
+ auto m = as->mapping ();
+ m.make_default (film ? film->audio_processor() : 0);
+ as->set_mapping (m);
+ }
+
+ if (examiner->has_atmos()) {
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ atmos = make_shared<AtmosContent>(this);
+ }
+ /* Setting length will cause calculations to be made based on edit rate, so that must
+ * be set up first otherwise hard-to-spot exceptions will be thrown.
+ */
+ atmos->set_edit_rate (examiner->atmos_edit_rate());
+ atmos->set_length (examiner->atmos_length());
+ }
+
+ list<shared_ptr<TextContent>> new_text;