summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_examiner.cc6
-rw-r--r--src/lib/dcp_examiner.h10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc
index 133c1614e..b05ef593b 100644
--- a/src/lib/dcp_examiner.cc
+++ b/src/lib/dcp_examiner.cc
@@ -67,6 +67,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
, _kdm_valid (false)
, _three_d (false)
, _has_atmos (false)
+ , _atmos_length (0)
{
shared_ptr<dcp::CPL> cpl;
@@ -198,6 +199,11 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
if (i->atmos()) {
_has_atmos = true;
+ _atmos_length += i->atmos()->actual_duration();
+ if (_atmos_edit_rate != dcp::Fraction()) {
+ DCPOMATIC_ASSERT (i->atmos()->edit_rate() == _atmos_edit_rate);
+ }
+ _atmos_edit_rate = i->atmos()->edit_rate();
}
if (i->main_picture()) {
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index b4c87596c..78d2befd3 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -135,6 +135,14 @@ public:
return _has_atmos;
}
+ Frame atmos_length () const {
+ return _atmos_length;
+ }
+
+ dcp::Fraction atmos_edit_rate () const {
+ return _atmos_edit_rate;
+ }
+
private:
boost::optional<double> _video_frame_rate;
boost::optional<dcp::Size> _video_size;
@@ -161,4 +169,6 @@ private:
std::vector<dcp::Rating> _ratings;
std::string _content_version;
bool _has_atmos;
+ Frame _atmos_length;
+ dcp::Fraction _atmos_edit_rate;
};