diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-06 01:17:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-11 09:25:26 +0100 |
| commit | 4d2418d26ea16946931dc2024cc7afd4519fc9b9 (patch) | |
| tree | 5f1b21e5b88a75318ff440f7bb93381504fd226c /src | |
| parent | fcb8747232c817be9a45f007df8571fb2e9bcb89 (diff) | |
Offer has_non_zero_entry_point() from DCPExaminer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcp_examiner.cc | 6 | ||||
| -rw-r--r-- | src/lib/dcp_examiner.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 22e9f9b50..3515f34c2 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -196,6 +196,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) } if (auto sub = reel->main_subtitle()) { + if (sub->entry_point().get_value_or(0) != 0) { + _has_non_zero_entry_point[TextType::OPEN_SUBTITLE] = true; + } if (!sub->asset_ref().resolved()) { LOG_GENERAL("Main subtitle %1 of reel %2 is missing", sub->id(), reel->id()); _needs_assets = true; @@ -225,6 +228,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant) } for (auto ccap: reel->closed_captions()) { + if (ccap->entry_point().get_value_or(0) != 0) { + _has_non_zero_entry_point[TextType::CLOSED_CAPTION] = true; + } if (!ccap->asset_ref().resolved()) { LOG_GENERAL("Closed caption %1 of reel %2 is missing", ccap->id(), reel->id()); _needs_assets = true; diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index 04fa31ea4..425552632 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -171,6 +171,10 @@ public: return _atmos_edit_rate; } + EnumIndexedVector<bool, TextType> has_non_zero_entry_point() const { + return _has_non_zero_entry_point; + } + void add_fonts(std::shared_ptr<TextContent> content); private: @@ -206,6 +210,7 @@ private: bool _has_atmos = false; Frame _atmos_length = 0; dcp::Fraction _atmos_edit_rate; + EnumIndexedVector<bool, TextType> _has_non_zero_entry_point; struct Font { |
