Make out-of-memory error message a bit more informative.
[dcpomatic.git] / src / lib / film.cc
index e48b08f3b70b7216b6035c7750b22df3cdbcd942..b112914b340241d7958e95b29af50cbf6bc576a8 100644 (file)
@@ -48,6 +48,7 @@
 #include "video_content.h"
 #include "subtitle_content.h"
 #include "ffmpeg_content.h"
+#include "dcp_content.h"
 #include <libcxml/cxml.h>
 #include <dcp/cpl.h>
 #include <dcp/certificate_chain.h>
@@ -122,7 +123,7 @@ Film::Film (boost::filesystem::path dir, bool log)
        , _audio_channels (6)
        , _three_d (false)
        , _sequence_video (true)
-       , _interop (false)
+       , _interop (Config::instance()->default_interop ())
        , _audio_processor (0)
        , _state_version (current_state_version)
        , _dirty (false)
@@ -674,8 +675,18 @@ Film::isdcf_name (bool if_created_now) const
                d << "-3D";
        }
 
-       if (!dm.package_type.empty ()) {
-               d << "_" << dm.package_type;
+       bool vf = false;
+       BOOST_FOREACH (shared_ptr<Content> i, content ()) {
+               shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (i);
+               if (dc && (dc->reference_video() || dc->reference_audio() || dc->reference_subtitle())) {
+                       vf = true;
+               }
+       }
+
+       if (vf) {
+               d << "_VF";
+       } else {
+               d << "_OV";
        }
 
        return d.str ();
@@ -994,6 +1005,7 @@ Film::move_content_later (shared_ptr<Content> c)
        _playlist->move_later (c);
 }
 
+/** @return length of the film from time 0 to the last thing on the playlist */
 DCPTime
 Film::length () const
 {