class DCPExaminer : public VideoExaminer, public AudioExaminer
{
public:
- explicit DCPExaminer (std::shared_ptr<const DCPContent>, bool tolerant);
+ DCPExaminer(std::shared_ptr<const DCPContent>, bool tolerant);
bool has_video () const override {
return _has_video;
}
/** @param type TEXT_OPEN_SUBTITLE or TEXT_CLOSED_CAPTION.
- * @return Number of assets of this type in this DCP.
+ * @return the number of "streams" of this 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.
*/
int text_count (TextType type) const {
- return _text_count[static_cast<int>(type)];
+ return _text_count[type];
}
boost::optional<dcp::LanguageTag> open_subtitle_language () const {
}
dcp::ContentKind content_kind () const {
- return _content_kind;
+ DCPOMATIC_ASSERT(_content_kind);
+ return *_content_kind;
}
std::string cpl () const {
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)];
+ 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;
bool _kdm_valid = false;
boost::optional<dcp::Standard> _standard;
bool _three_d = false;
- dcp::ContentKind _content_kind;
+ boost::optional<dcp::ContentKind> _content_kind;
std::string _cpl;
std::list<int64_t> _reel_lengths;
std::map<dcp::Marker, dcp::Time> _markers;