Move ScopeGuard into libdcp.
[dcpomatic.git] / src / lib / dcp_content.h
index d57c0059c753cdf621d1e9d11c7dbac02b25d82b..3753740a2728af929ff17572ffa5c4b2930ce3f7 100644 (file)
 
 
 #include "content.h"
+#include "enum_indexed_vector.h"
+#include "font.h"
+#include "resolution.h"
 #include <libcxml/cxml.h>
+#include <dcp/content_kind.h>
 #include <dcp/encrypted_kdm.h>
 #include <dcp/rating.h>
 
@@ -92,7 +96,7 @@ public:
                return _kdm;
        }
 
-       bool can_be_played () const;
+       bool can_be_played () const override;
        bool needs_kdm () const;
        bool needs_assets () const;
 
@@ -121,7 +125,7 @@ public:
         */
        bool reference_text (TextType type) const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _reference_text[static_cast<int>(type)];
+               return _reference_text[type];
        }
 
        bool can_reference_text (std::shared_ptr<const Film> film, TextType type, std::string &) const;
@@ -170,6 +174,10 @@ public:
                return _content_versions;
        }
 
+       int active_audio_channels() const;
+
+       void check_font_ids();
+
 private:
        friend struct reels_test5;
 
@@ -205,7 +213,7 @@ private:
         *  rather than by rewrapping.  The types here are the original text types,
         *  not what they are being used for.
         */
-       bool _reference_text[static_cast<int>(TextType::COUNT)];
+       EnumIndexedVector<bool, TextType> _reference_text;
 
        boost::optional<dcp::Standard> _standard;
        boost::optional<dcp::ContentKind> _content_kind;
@@ -219,6 +227,8 @@ private:
        std::map<dcp::Marker, dcpomatic::ContentTime> _markers;
        std::vector<dcp::Rating> _ratings;
        std::vector<std::string> _content_versions;
+
+       boost::optional<int> _active_audio_channels;
 };