summaryrefslogtreecommitdiff
path: root/src/lib/dcp_examiner.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-11 12:48:43 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-03 17:02:24 +0200
commitf145574466ca52e754c4febf1d79fb6d202d42d2 (patch)
tree6816a6d9891405eef56bf7481d528337381226ff /src/lib/dcp_examiner.h
parent0dce5e78c79eb5989c78a1cec10983406d7a4cac (diff)
Support closed subtitles and open captions.
Diffstat (limited to 'src/lib/dcp_examiner.h')
-rw-r--r--src/lib/dcp_examiner.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index 28b59ee2f..5e2a33361 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -104,8 +104,7 @@ public:
return _audio_language;
}
- /** @param type TEXT_OPEN_SUBTITLE or TEXT_CLOSED_CAPTION.
- * @return the number of "streams" of this type in the DCP.
+ /* @return the number of "streams" of @type in the DCP.
* Reels do not affect the return value of this method: if a DCP
* has any subtitles, type=TEXT_OPEN_SUBTITLE will return 1.
*/
@@ -117,9 +116,18 @@ public:
return _open_subtitle_language;
}
- DCPTextTrack dcp_text_track (int i) const {
- DCPOMATIC_ASSERT (i >= 0 && i < static_cast<int>(_dcp_text_tracks.size()));
- return _dcp_text_tracks[i];
+ boost::optional<dcp::LanguageTag> open_caption_language() const {
+ return _open_caption_language;
+ }
+
+ DCPTextTrack dcp_subtitle_track(int i) const {
+ DCPOMATIC_ASSERT (i >= 0 && i < static_cast<int>(_dcp_subtitle_tracks.size()));
+ return _dcp_subtitle_tracks[i];
+ }
+
+ DCPTextTrack dcp_caption_track(int i) const {
+ DCPOMATIC_ASSERT (i >= 0 && i < static_cast<int>(_dcp_caption_tracks.size()));
+ return _dcp_caption_tracks[i];
}
bool kdm_valid () const {
@@ -198,8 +206,11 @@ private:
/** number of different assets of each type (OCAP/CCAP) */
EnumIndexedVector<int, TextType> _text_count;
boost::optional<dcp::LanguageTag> _open_subtitle_language;
- /** the DCPTextTracks for each of our CCAPs */
- std::vector<DCPTextTrack> _dcp_text_tracks;
+ boost::optional<dcp::LanguageTag> _open_caption_language;
+ /** the DCPTextTracks for each of our closed subtitles */
+ std::vector<DCPTextTrack> _dcp_subtitle_tracks;
+ /** the DCPTextTracks for each of our closed captions */
+ std::vector<DCPTextTrack> _dcp_caption_tracks;
bool _encrypted = false;
bool _needs_assets = false;
bool _kdm_valid = false;