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/dcp_examiner.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/dcp_examiner.cc')
| -rw-r--r-- | src/lib/dcp_examiner.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index d04dacdd6..133c1614e 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -39,6 +39,7 @@ #include <dcp/sound_asset.h> #include <dcp/sound_asset_reader.h> #include <dcp/subtitle_asset.h> +#include <dcp/reel_atmos_asset.h> #include <dcp/reel_subtitle_asset.h> #include <dcp/reel_closed_caption_asset.h> #include <dcp/reel_markers_asset.h> @@ -65,6 +66,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) , _needs_assets (false) , _kdm_valid (false) , _three_d (false) + , _has_atmos (false) { shared_ptr<dcp::CPL> cpl; @@ -96,6 +98,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (j->main_subtitle() && !j->main_subtitle()->asset_ref().resolved()) { ++unsatisfied; } + if (j->atmos() && !j->atmos()->asset_ref().resolved()) { + ++unsatisfied; + } } if (unsatisfied < least_unsatisfied) { @@ -191,6 +196,10 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) _markers.insert (rm.begin(), rm.end()); } + if (i->atmos()) { + _has_atmos = true; + } + if (i->main_picture()) { _reel_lengths.push_back (i->main_picture()->actual_duration()); } else if (i->main_sound()) { @@ -199,6 +208,8 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) _reel_lengths.push_back (i->main_subtitle()->actual_duration()); } else if (!i->closed_captions().empty()) { _reel_lengths.push_back (i->closed_captions().front()->actual_duration()); + } else if (!i->atmos()) { + _reel_lengths.push_back (i->atmos()->actual_duration()); } } @@ -226,6 +237,10 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) if (i->main_subtitle()) { i->main_subtitle()->asset()->subtitles (); } + + if (i->atmos()) { + i->atmos()->asset()->start_read()->get_frame(0); + } } } catch (dcp::ReadError& e) { _kdm_valid = false; |
