Allow import of OV/VF DCPs (#906).
[dcpomatic.git] / src / lib / dcp_content.h
index 7ea9c3500f95b1284b05c9c9210cd742ad5004ff..f3a8236a2d4c0c77194640d4ec463c67a9bb2bc1 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
+    DCP-o-matic is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -67,7 +68,7 @@ public:
        void set_default_colour_conversion ();
        std::list<DCPTime> reel_split_points () const;
 
-       boost::filesystem::path directory () const;
+       std::vector<boost::filesystem::path> directories () const;
 
        bool encrypted () const {
                boost::mutex::scoped_lock lm (_mutex);
@@ -75,12 +76,15 @@ public:
        }
 
        void add_kdm (dcp::EncryptedKDM);
+       void add_ov (boost::filesystem::path ov);
 
        boost::optional<dcp::EncryptedKDM> kdm () const {
                return _kdm;
        }
 
        bool can_be_played () const;
+       bool needs_kdm () const;
+       bool needs_assets () const;
 
        void set_reference_video (bool r);
 
@@ -109,6 +113,11 @@ public:
 
        bool can_reference_subtitle (std::list<std::string> &) const;
 
+       boost::optional<std::string> cpl () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _cpl;
+       }
+
 private:
        void add_properties (std::list<UserProperty>& p) const;
 
@@ -123,6 +132,8 @@ private:
        std::string _name;
        /** true if our DCP is encrypted */
        bool _encrypted;
+       /** true if this DCP needs more assets before it can be played */
+       bool _needs_assets;
        boost::optional<dcp::EncryptedKDM> _kdm;
        /** true if _kdm successfully decrypts the first frame of our DCP */
        bool _kdm_valid;
@@ -140,6 +151,11 @@ private:
        bool _reference_subtitle;
 
        boost::optional<dcp::Standard> _standard;
+       bool _three_d;
+       /** ID of the CPL to use; older metadata might not specify this: in that case
+        *  just use the only CPL.
+        */
+       boost::optional<std::string> _cpl;
 };
 
 #endif