Fix audio analysis; make sure we don't decode video and let it pile up unwanted.
[dcpomatic.git] / src / lib / content.cc
index bcfedb1f9e6e9019f788236eb0c440ef4f83d5f1..a8d058cc19cd2c8d3e1ef0b765520ea07777287d 100644 (file)
@@ -37,7 +37,6 @@
 #include "i18n.h"
 
 using std::string;
-using std::set;
 using std::list;
 using std::cout;
 using std::vector;
@@ -140,7 +139,9 @@ Content::examine (shared_ptr<Job> job, bool calculate_digest)
                return;
        }
 
-       job->sub (_("Computing digest"));
+       if (job) {
+               job->sub (_("Computing digest"));
+       }
        
        boost::mutex::scoped_lock lm (_mutex);
        vector<boost::filesystem::path> p = _paths;
@@ -219,7 +220,7 @@ Content::clone () const
 string
 Content::technical_summary () const
 {
-       return String::compose ("%1 %2 %3", path_summary(), digest(), position().seconds());
+       return String::compose ("%1 %2 %3", path_summary(), digest().get_value_or("X"), position().seconds());
 }
 
 DCPTime
@@ -236,7 +237,7 @@ Content::identifier () const
 {
        SafeStringStream s;
        
-       s << Content::digest()
+       s << Content::digest().get_value_or("X")
          << "_" << position().get()
          << "_" << trim_start().get()
          << "_" << trim_end().get();
@@ -269,7 +270,7 @@ Content::path_summary () const
 {
        /* XXX: should handle multiple paths more gracefully */
 
-       assert (number_of_paths ());
+       DCPOMATIC_ASSERT (number_of_paths ());
 
        string s = path(0).filename().string ();
        if (number_of_paths() > 1) {