Bump libdcp for better ContentKind support, and libsub
[dcpomatic.git] / src / lib / dcp_content_type.h
index 2685e6edfd20b8857060ef1735fae36c74160754..f08db883a867ba17ff2772e389ce7761389200d7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_DCP_CONTENT_TYPE_H
 #define DCPOMATIC_DCP_CONTENT_TYPE_H
 
+
 /** @file src/dcp_content_type.h
  *  @brief DCPContentType class.
  */
 
+
+#include <dcp/content_kind.h>
 #include <dcp/dcp.h>
 #include <string>
 #include <vector>
 
+
 /** @class DCPContentType
  *  @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
  */
-class DCPContentType : public boost::noncopyable
+class DCPContentType
 {
 public:
        DCPContentType (std::string, dcp::ContentKind, std::string);
@@ -51,8 +56,9 @@ public:
        }
 
        static DCPContentType const * from_isdcf_name (std::string);
+       static DCPContentType const * from_libdcp_kind (dcp::ContentKind);
        static DCPContentType const * from_index (int);
-       static int as_index (DCPContentType const *);
+       static boost::optional<int> as_index (DCPContentType const *);
        static std::vector<DCPContentType const *> all ();
        static void setup_dcp_content_types ();
 
@@ -62,7 +68,8 @@ private:
        std::string _isdcf_name;
 
        /** All available DCP content types */
-       static std::vector<DCPContentType const *> _dcp_content_types;
+       static std::vector<DCPContentType> _dcp_content_types;
 };
 
+
 #endif