summaryrefslogtreecommitdiff
path: root/src/lib/dcp_examiner.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-09 00:03:35 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-09 00:03:35 +0200
commit4e9a15d558ecca660eb74f54b693d1e4a3aa7381 (patch)
tree45dd4160839ca9b40b866b5908736b7b7448c690 /src/lib/dcp_examiner.h
parent37a6d1a768debea28c24174503d85903f7f90aa5 (diff)
Extract audio/subtitle language from imported DCPs.
Diffstat (limited to 'src/lib/dcp_examiner.h')
-rw-r--r--src/lib/dcp_examiner.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index 3fedaca06..66f694f72 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -90,6 +90,10 @@ public:
return _audio_frame_rate.get_value_or (48000);
}
+ boost::optional<dcp::LanguageTag> audio_language () const {
+ return _audio_language;
+ }
+
/** @param type TEXT_OPEN_SUBTITLE or TEXT_CLOSED_CAPTION.
* @return Number of assets of this type in this DCP.
*/
@@ -97,6 +101,10 @@ public:
return _text_count[static_cast<int>(type)];
}
+ boost::optional<dcp::LanguageTag> open_subtitle_language () const {
+ 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];
@@ -162,8 +170,10 @@ private:
bool _has_video = false;
/** true if this DCP has audio content (but false if it has unresolved references to audio content) */
bool _has_audio = false;
+ boost::optional<dcp::LanguageTag> _audio_language;
/** number of different assets of each type (OCAP/CCAP) */
int _text_count[static_cast<int>(TextType::COUNT)];
+ boost::optional<dcp::LanguageTag> _open_subtitle_language;
/** the DCPTextTracks for each of our CCAPs */
std::vector<DCPTextTrack> _dcp_text_tracks;
bool _encrypted = false;