Hand-apply bbfb370d7de28ec1e8f307865cc6253bb5d4366e from master; quicker digest calcu...
authorCarl Hetherington <cth@carlh.net>
Sat, 24 Jan 2015 17:41:00 +0000 (17:41 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 24 Jan 2015 17:41:00 +0000 (17:41 +0000)
52 files changed:
TO_PORT
src/lib/audio_content.cc
src/lib/content.cc
src/lib/content.h
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_subtitle_content.cc
src/lib/dcp_subtitle_content.h
src/lib/examine_content_job.cc
src/lib/examine_content_job.h
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_content.h
src/lib/film.cc
src/lib/film.h
src/lib/image_content.cc
src/lib/image_content.h
src/lib/sndfile_content.cc
src/lib/sndfile_content.h
src/lib/subrip_content.cc
src/lib/subrip_content.h
src/lib/util.cc
src/lib/util.h
src/tools/dcpomatic.cc
src/tools/dcpomatic_create.cc
src/wx/content_menu.cc
src/wx/content_panel.cc
src/wx/image_sequence_dialog.cc
src/wx/image_sequence_dialog.h
test/4k_test.cc
test/audio_analysis_test.cc
test/audio_delay_test.cc
test/black_fill_test.cc
test/dcp_subtitle_test.cc
test/ffmpeg_audio_test.cc
test/ffmpeg_dcp_test.cc
test/ffmpeg_decoder_seek_test.cc
test/ffmpeg_decoder_sequential_test.cc
test/frame_rate_test.cc
test/import_dcp_test.cc
test/isdcf_name_test.cc
test/play_test.cc
test/player_test.cc
test/recover_test.cc
test/repeat_frame_test.cc
test/scaling_test.cc
test/seek_zero_test.cc
test/silence_padding_test.cc
test/skip_frame_test.cc
test/threed_test.cc
test/upmixer_a_test.cc
test/util_test.cc
test/xml_subtitle_test.cc

diff --git a/TO_PORT b/TO_PORT
index eb4531ef64eac79f3efaaa27f8aa500d1c96ddbe..414fcd7597d6b4d9669e551a8fcbee2135027013 100644 (file)
--- a/TO_PORT
+++ b/TO_PORT
@@ -1,4 +1,2 @@
-3cee9121d9cda951e3fb15a53a792b682a27a01b
-e48f13a1fc46fb469417d602acfe4b3fa57d5aa2
 a0b2c57943ddc55ff2b5b04aba829427a66f41e6
 87521fff39a85b532f462a667bd2fb00adeb1185
index 61357c60f48922b3637328bd1fb3eb749f6b4525..9909e3a08564552da416db3cfc9d6b60ebae9d1d 100644 (file)
@@ -181,7 +181,7 @@ AudioContent::audio_analysis_path () const
        }
 
        boost::filesystem::path p = film->audio_analysis_dir ();
-       p /= digest().get_value_or ("X") + "_" + audio_mapping().digest();
+       p /= digest() + "_" + audio_mapping().digest();
        return p;
 }
 
index a8d058cc19cd2c8d3e1ef0b765520ea07777287d..550a8cd0577333d88844ea014d2f41b60299c7f7 100644 (file)
@@ -88,7 +88,7 @@ Content::Content (shared_ptr<const Film> f, cxml::ConstNodePtr node)
        for (list<cxml::NodePtr>::const_iterator i = path_children.begin(); i != path_children.end(); ++i) {
                _paths.push_back ((*i)->content ());
        }
-       _digest = node->optional_string_child ("Digest");
+       _digest = node->optional_string_child ("Digest").get_value_or ("X");
        _position = DCPTime (node->number_child<double> ("Position"));
        _trim_start = DCPTime (node->number_child<double> ("TrimStart"));
        _trim_end = DCPTime (node->number_child<double> ("TrimEnd"));
@@ -124,21 +124,15 @@ Content::as_xml (xmlpp::Node* node) const
        for (vector<boost::filesystem::path>::const_iterator i = _paths.begin(); i != _paths.end(); ++i) {
                node->add_child("Path")->add_child_text (i->string ());
        }
-       if (_digest) {
-               node->add_child("Digest")->add_child_text (_digest.get ());
-       }
+       node->add_child("Digest")->add_child_text (_digest);
        node->add_child("Position")->add_child_text (raw_convert<string> (_position.get ()));
        node->add_child("TrimStart")->add_child_text (raw_convert<string> (_trim_start.get ()));
        node->add_child("TrimEnd")->add_child_text (raw_convert<string> (_trim_end.get ()));
 }
 
 void
-Content::examine (shared_ptr<Job> job, bool calculate_digest)
+Content::examine (shared_ptr<Job> job)
 {
-       if (!calculate_digest) {
-               return;
-       }
-
        if (job) {
                job->sub (_("Computing digest"));
        }
@@ -146,8 +140,12 @@ Content::examine (shared_ptr<Job> job, bool calculate_digest)
        boost::mutex::scoped_lock lm (_mutex);
        vector<boost::filesystem::path> p = _paths;
        lm.unlock ();
-       
-       string const d = md5_digest (p, job);
+
+       /* Some content files are very big, so we use a poor's
+          digest here: a MD5 of the first and last 1e6 bytes with the
+          size of the first file tacked on the end as a string.
+       */
+       string const d = md5_digest_head_tail (p, 1000000) + dcp::raw_convert<string> (boost::filesystem::file_size (p.front ()));
 
        lm.lock ();
        _digest = d;
@@ -220,7 +218,7 @@ Content::clone () const
 string
 Content::technical_summary () const
 {
-       return String::compose ("%1 %2 %3", path_summary(), digest().get_value_or("X"), position().seconds());
+       return String::compose ("%1 %2 %3", path_summary(), digest(), position().seconds());
 }
 
 DCPTime
@@ -237,7 +235,7 @@ Content::identifier () const
 {
        SafeStringStream s;
        
-       s << Content::digest().get_value_or("X")
+       s << Content::digest()
          << "_" << position().get()
          << "_" << trim_start().get()
          << "_" << trim_end().get();
index a3e6da988cddad6fa335a89d60814c1f69f56b83..c6cede5fa6cafde4d04f18dc1943a3551c858a2c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -66,9 +66,8 @@ public:
        /** Examine the content to establish digest, frame rates and any other
         *  useful metadata.
         *  @param job Job to use to report progress, or 0.
-        *  @param calculate_digest True to calculate a digest for the content's file(s).
         */
-       virtual void examine (boost::shared_ptr<Job> job, bool calculate_digest);
+       virtual void examine (boost::shared_ptr<Job> job);
        
        /** @return Quick one-line summary of the content, as will be presented in the
         *  film editor.
@@ -107,8 +106,11 @@ public:
        
        bool paths_valid () const;
 
-       /** @return MD5 digest of the content's file(s) */
-       boost::optional<std::string> digest () const {
+       /** @return Digest of the content's file(s).  Note: this is
+        *  not a complete MD5-or-whatever hash, but a sort of poor
+        *  man' version (see comments in ::examine).
+        */
+       std::string digest () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _digest;
        }
@@ -167,7 +169,7 @@ protected:
        std::vector<boost::filesystem::path> _paths;
        
 private:
-       boost::optional<std::string> _digest;
+       std::string _digest;
        DCPTime _position;
        DCPTime _trim_start;
        DCPTime _trim_end;
index 2bf14dcffd77074229c9d9a6cbb01aaba9a62a6f..d1a65800155ec13559b071ee41f3332a782af08a 100644 (file)
@@ -77,12 +77,12 @@ DCPContent::read_directory (boost::filesystem::path p)
 }
 
 void
-DCPContent::examine (shared_ptr<Job> job, bool calculate_digest)
+DCPContent::examine (shared_ptr<Job> job)
 {
        bool const could_be_played = can_be_played ();
                
        job->set_progress_unknown ();
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
        
        shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
        take_from_video_examiner (examiner);
index 82f5a8089be69ff40bf753169213358d92dfc64b..aa53d76a9d32aa694cf7d6fb4114aa6f7ceadbc5 100644 (file)
@@ -52,7 +52,7 @@ public:
 
        DCPTime full_length () const;
        
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        void as_xml (xmlpp::Node *) const;
index 45c4be9b21bad8e8148154ad4491f0d345e3d4f6..9f2ff61c5aea829be5d5331f2dd9b4126e9493a9 100644 (file)
@@ -47,9 +47,9 @@ DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::Const
 }
 
 void
-DCPSubtitleContent::examine (shared_ptr<Job> job, bool calculate_digest)
+DCPSubtitleContent::examine (shared_ptr<Job> job)
 {
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
 
        shared_ptr<dcp::SubtitleContent> sc = load (path (0));
        
index 4b5f1fa058f070fe4c71c9052f4d538600f74f38..05af716906a31b05f96de284c4cbf1df5e62b9b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ public:
        DCPSubtitleContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
 
        /* Content */
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        void as_xml (xmlpp::Node *) const;
index ee887271fd7ffbb8690cc86bc579aabec39749d9..2b8f118f8d11b0cf665dbf621913afc984ca7ade 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -29,10 +29,9 @@ using std::string;
 using std::cout;
 using boost::shared_ptr;
 
-ExamineContentJob::ExamineContentJob (shared_ptr<const Film> f, shared_ptr<Content> c, bool calculate_digest)
+ExamineContentJob::ExamineContentJob (shared_ptr<const Film> f, shared_ptr<Content> c)
        : Job (f)
        , _content (c)
-       , _calculate_digest (calculate_digest)
 {
 
 }
@@ -50,7 +49,7 @@ ExamineContentJob::name () const
 void
 ExamineContentJob::run ()
 {
-       _content->examine (shared_from_this (), _calculate_digest);
+       _content->examine (shared_from_this ());
        set_progress (1);
        set_state (FINISHED_OK);
 }
index e59dba0b8fa2796b2f7ae73d94bc6649abf5b90c..016a56371de1ff8f8641b137484a2712d6d9ad04 100644 (file)
@@ -26,7 +26,7 @@ class Log;
 class ExamineContentJob : public Job
 {
 public:
-       ExamineContentJob (boost::shared_ptr<const Film>, boost::shared_ptr<Content>, bool calculate_digest);
+       ExamineContentJob (boost::shared_ptr<const Film>, boost::shared_ptr<Content>);
        ~ExamineContentJob ();
 
        std::string name () const;
@@ -34,6 +34,5 @@ public:
 
 private:
        boost::shared_ptr<Content> _content;
-       bool _calculate_digest;
 };
 
index d5fd592d6c9a11cf726cf596c4eea01916aa3a1c..9e9473935d82810f88ca4a8bf445230504780629 100644 (file)
@@ -163,11 +163,11 @@ FFmpegContent::as_xml (xmlpp::Node* node) const
 }
 
 void
-FFmpegContent::examine (shared_ptr<Job> job, bool calculate_digest)
+FFmpegContent::examine (shared_ptr<Job> job)
 {
        job->set_progress_unknown ();
 
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
 
        shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this (), job));
        take_from_video_examiner (examiner);
@@ -367,7 +367,7 @@ FFmpegContent::audio_analysis_path () const
        */
 
        boost::filesystem::path p = film->audio_analysis_dir ();
-       string name = digest().get_value_or ("X");
+       string name = digest();
        if (audio_stream ()) {
                name += "_" + audio_stream()->identifier ();
        }
index 2831c2acfcb0514496dd00339841c2b3228163da..76ba43567d9961ea2c1798c3ebfe13fb27e9772b 100644 (file)
@@ -56,7 +56,7 @@ public:
                return boost::dynamic_pointer_cast<FFmpegContent> (Content::shared_from_this ());
        }
        
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        void as_xml (xmlpp::Node *) const;
index 82add67c57f89446e8982e475b57d072d8617ab2..ecc98d7dc698be487248ce5870636cde9be334cc 100644 (file)
@@ -952,20 +952,20 @@ Film::content () const
 }
 
 void
-Film::examine_content (shared_ptr<Content> c, bool calculate_digest)
+Film::examine_content (shared_ptr<Content> c)
 {
-       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
+       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
        JobManager::instance()->add (j);
 }
 
 void
-Film::examine_and_add_content (shared_ptr<Content> c, bool calculate_digest)
+Film::examine_and_add_content (shared_ptr<Content> c)
 {
        if (dynamic_pointer_cast<FFmpegContent> (c)) {
                run_ffprobe (c->path(0), file ("ffprobe.log"), _log);
        }
                        
-       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c, calculate_digest));
+       shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
        j->Finished.connect (bind (&Film::maybe_add_content, this, boost::weak_ptr<Job> (j), boost::weak_ptr<Content> (c)));
        JobManager::instance()->add (j);
 }
index 43f7bae78a2557c192dd19ed2a148ddc744a0b0f..2de06515965d785c0e5e4ccb5e6ef1a50a6914bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -252,8 +252,8 @@ public:
        void set_directory (boost::filesystem::path);
        void set_name (std::string);
        void set_use_isdcf_name (bool);
-       void examine_content (boost::shared_ptr<Content>, bool calculate_digest);
-       void examine_and_add_content (boost::shared_ptr<Content>, bool calculate_digest);
+       void examine_content (boost::shared_ptr<Content>);
+       void examine_and_add_content (boost::shared_ptr<Content>);
        void add_content (boost::shared_ptr<Content>);
        void remove_content (boost::shared_ptr<Content>);
        void move_content_earlier (boost::shared_ptr<Content>);
index b8d2a6921c3df204e161a07835273b50a913c8fd..1dbd7871b9f9a22d51f2a296094209499922bb87 100644 (file)
@@ -100,9 +100,9 @@ ImageContent::as_xml (xmlpp::Node* node) const
 }
 
 void
-ImageContent::examine (shared_ptr<Job> job, bool calculate_digest)
+ImageContent::examine (shared_ptr<Job> job)
 {
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
 
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
index 8c50fd8a87f89cd0115d2a4e49b462d3af976448..38aa77bf52eddf7ea889b436483c3f585b628292 100644 (file)
@@ -37,7 +37,7 @@ public:
                return boost::dynamic_pointer_cast<ImageContent> (Content::shared_from_this ());
        };
 
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        void as_xml (xmlpp::Node *) const;
index e0b7cc10cc19d55932fe1ceffdbb7b2314ef3ea5..e757c77c5469704e48c386b81199b5532bfc91b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -82,10 +82,10 @@ SndfileContent::valid_file (boost::filesystem::path f)
 }
 
 void
-SndfileContent::examine (shared_ptr<Job> job, bool calculate_digest)
+SndfileContent::examine (shared_ptr<Job> job)
 {
        job->set_progress_unknown ();
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
        shared_ptr<AudioExaminer> dec (new SndfileDecoder (shared_from_this()));
        take_from_audio_examiner (dec);
 }
index 1fff01f602508e074e4502bdeb9074fe8b0910f9..1bac51167cad010cf2aceed5f07a088e420cf432 100644 (file)
@@ -41,7 +41,7 @@ public:
        
        DCPTime full_length () const;
        
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        std::string information () const;
index 819bca32199422cd1750b61c338789401d8fd6ce..fc0637bfd89d523140c60ea7ca58f8b0bee9d150 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -50,9 +50,9 @@ SubRipContent::SubRipContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
 }
 
 void
-SubRipContent::examine (boost::shared_ptr<Job> job, bool calculate_digest)
+SubRipContent::examine (boost::shared_ptr<Job> job)
 {
-       Content::examine (job, calculate_digest);
+       Content::examine (job);
        SubRip s (shared_from_this ());
 
        shared_ptr<const Film> film = _film.lock ();
index 4321ecb6ad87f4c285579722197eb96270e987a2..e6352617972e31fcfd089911964446abcab60173 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ public:
        }
        
        /* Content */
-       void examine (boost::shared_ptr<Job>, bool calculate_digest);
+       void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        void as_xml (xmlpp::Node *) const;
index c0e32b778669ce3b9f810d5d46ac4c188a3e067d..0a6f381db8adf23cd7c8028e3dd2cc624f49d575 100644 (file)
@@ -417,45 +417,53 @@ dcpomatic_setup_gettext_i18n (string lang)
 #endif
 }
 
-/** @param job Optional job for which to report progress */
+/** Compute a digest of the first and last `size' bytes of a set of files. */
 string
-md5_digest (vector<boost::filesystem::path> files, shared_ptr<Job> job)
+md5_digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size)
 {
-       boost::uintmax_t const buffer_size = 64 * 1024;
-       char buffer[buffer_size];
-
+       boost::scoped_array<char> buffer (new char[size]);
        MD5Digester digester;
 
-       vector<int64_t> sizes;
-       for (size_t i = 0; i < files.size(); ++i) {
-               sizes.push_back (boost::filesystem::file_size (files[i]));
-       }
-
-       for (size_t i = 0; i < files.size(); ++i) {
+       /* Head */
+       boost::uintmax_t to_do = size;
+       char* p = buffer.get ();
+       int i = 0;
+       while (i < int64_t (files.size()) && to_do > 0) {
                FILE* f = fopen_boost (files[i], "rb");
                if (!f) {
                        throw OpenFileError (files[i].string());
                }
 
-               boost::uintmax_t const bytes = boost::filesystem::file_size (files[i]);
-               boost::uintmax_t remaining = bytes;
-
-               while (remaining > 0) {
-                       int const t = min (remaining, buffer_size);
-                       int const r = fread (buffer, 1, t, f);
-                       if (r != t) {
-                               throw ReadFileError (files[i], errno);
-                       }
-                       digester.add (buffer, t);
-                       remaining -= t;
-
-                       if (job) {
-                               job->set_progress ((float (i) + 1 - float(remaining) / bytes) / files.size ());
-                       }
+               boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i]));
+               fread (p, 1, this_time, f);
+               p += this_time;
+               to_do -= this_time;
+               fclose (f);
+
+               ++i;
+       }
+       digester.add (buffer.get(), size - to_do);
+
+       /* Tail */
+       to_do = size;
+       p = buffer.get ();
+       i = files.size() - 1;
+       while (i >= 0 && to_do > 0) {
+               FILE* f = fopen_boost (files[i], "rb");
+               if (!f) {
+                       throw OpenFileError (files[i].string());
                }
 
+               boost::uintmax_t this_time = min (to_do, boost::filesystem::file_size (files[i]));
+               fseek (f, -this_time, SEEK_END);
+               fread (p, 1, this_time, f);
+               p += this_time;
+               to_do -= this_time;
                fclose (f);
-       }
+
+               --i;
+       }               
+       digester.add (buffer.get(), size - to_do);
 
        return digester.get ();
 }
index b06c8a58b5e8b5f78ac33314261d8c3f6024212a..ee2865e763df84a2328c5b05064d4add768e43fc 100644 (file)
@@ -61,7 +61,7 @@ extern std::string dependency_version_summary ();
 extern double seconds (struct timeval);
 extern void dcpomatic_setup ();
 extern void dcpomatic_setup_gettext_i18n (std::string);
-extern std::string md5_digest (std::vector<boost::filesystem::path>, boost::shared_ptr<Job>);
+extern std::string md5_digest_head_tail (std::vector<boost::filesystem::path>, boost::uintmax_t size);
 extern void ensure_ui_thread ();
 extern std::string audio_channel_name (int);
 extern bool valid_image_file (boost::filesystem::path);
index 614073947b4032e305ef26a0a2e90c1879f740a5..e929f185d1fa75e4339d4dbaff7f92dbf943f5b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -810,7 +810,7 @@ class App : public wxApp
                if (!_film_to_create.empty ()) {
                        _frame->new_film (_film_to_create);
                        if (!_content_to_add.empty ()) {
-                               _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add), true);
+                               _frame->film()->examine_and_add_content (content_factory (_frame->film(), _content_to_add));
                        }
                }
 
@@ -903,7 +903,7 @@ class App : public wxApp
                        dialog->Destroy ();
                } else if (uc->state() == UpdateChecker::FAILED) {
                        if (!UpdateChecker::instance()->last_emit_was_first ()) {
-                               error_dialog (_frame, _("The DCP-o-matic download server could not be contaced."));
+                               error_dialog (_frame, _("The DCP-o-matic download server could not be contacted."));
                        }
                } else {
                        if (!UpdateChecker::instance()->last_emit_was_first ()) {
index 6e8f1688843f48bb160c244c4b23db76ddccb704..304f4f697ab6e8a031c44dd2a74c3b896f2c448a 100644 (file)
@@ -178,7 +178,7 @@ main (int argc, char* argv[])
                        if (vc) {
                                vc->set_scale (VideoContentScale (content_ratio));
                        }
-                       film->examine_and_add_content (c, true);
+                       film->examine_and_add_content (c);
                }
                
                JobManager* jm = JobManager::instance ();
index 15a2341848656220acd9f6dc92fbb8c1a8298797..3bdaf259110bf0e0fdf9b204c5059f86ace3d54d 100644 (file)
@@ -207,7 +207,7 @@ ContentMenu::find_missing ()
                return;
        }
 
-       shared_ptr<Job> j (new ExamineContentJob (film, content, true));
+       shared_ptr<Job> j (new ExamineContentJob (film, content));
        
        j->Finished.connect (
                bind (
@@ -231,7 +231,7 @@ ContentMenu::re_examine ()
        }
 
        for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) {
-               film->examine_content (*i, true);
+               film->examine_content (*i);
        }
 }
 
@@ -269,7 +269,7 @@ ContentMenu::kdm ()
                dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()))));
                shared_ptr<Film> film = _film.lock ();
                DCPOMATIC_ASSERT (film);
-               film->examine_content (dcp, true);
+               film->examine_content (dcp);
        }
        
        d->Destroy ();
index 4d73a608dcb2b329f7c262c95d2561f02b9265a9..8bcf46f5c3151e2c0a2fe3f844e76483377833bc 100644 (file)
@@ -248,7 +248,7 @@ ContentPanel::add_file_clicked ()
        /* XXX: check for lots of files here and do something */
 
        for (unsigned int i = 0; i < paths.GetCount(); ++i) {
-               _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])), true);
+               _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])));
        }
 
        d->Destroy ();
@@ -281,7 +281,7 @@ ContentPanel::add_folder_clicked ()
        if (is_dcp) {
                try {
                        shared_ptr<DCPContent> content (new DCPContent (_film, path));
-                       _film->examine_and_add_content (content, true);
+                       _film->examine_and_add_content (content);
                } catch (...) {
                        error_dialog (_panel, _("Could not find a DCP in that folder."));
                }
@@ -290,7 +290,6 @@ ContentPanel::add_folder_clicked ()
                ImageSequenceDialog* e = new ImageSequenceDialog (_panel);
                r = e->ShowModal ();
                float const frame_rate = e->frame_rate ();
-               bool const digest = e->digest ();
                e->Destroy ();
 
                if (r != wxID_OK) {
@@ -302,7 +301,7 @@ ContentPanel::add_folder_clicked ()
                try {
                        shared_ptr<ImageContent> content (new ImageContent (_film, path));
                        content->set_video_frame_rate (frame_rate);
-                       _film->examine_and_add_content (content, digest);
+                       _film->examine_and_add_content (content);
                } catch (...) {
                        error_dialog (_panel, _("Could not find any images in that folder"));
                        return;
@@ -491,6 +490,6 @@ ContentPanel::files_dropped (wxDropFilesEvent& event)
        
        wxString* paths = event.GetFiles ();
        for (int i = 0; i < event.GetNumberOfFiles(); i++) {
-               _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])), true);
+               _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])));
        }
 }
index f4491bda383386bc22483aebb891da90499725b9..02602267c6eb9cebad968c14ed0a8d1786d87cba 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -28,11 +28,6 @@ ImageSequenceDialog::ImageSequenceDialog (wxWindow* parent)
 {
        add (_("Frame rate"), true);
        _frame_rate = add (new wxTextCtrl (this, wxID_ANY, N_("24")));
-       _digest = new wxCheckBox (this, wxID_ANY, _("Calculate digests"));
-       _digest->SetValue (true);
-       _digest->SetToolTip (_("By default DCP-o-matic will calculate digests (hashes) of your image files so that it knows if they change.  Turning this off will speed up import but you must not alter the image files after import or strange things may happen."));
-       add (_digest);
-
        layout ();
 }
 
@@ -47,9 +42,3 @@ ImageSequenceDialog::frame_rate () const
 
        return 0;
 }
-
-bool
-ImageSequenceDialog::digest () const
-{
-       return _digest->GetValue ();
-}
index d3658b7b8e341183e6146acd569ab6fdefdc0604..536ae6680273d34ebbe2a0072b1b648c4f0212f5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -26,9 +26,7 @@ public:
        ImageSequenceDialog (wxWindow* parent);
 
        float frame_rate () const;
-       bool digest () const;
 
 private:
        wxTextCtrl* _frame_rate;
-       wxCheckBox* _digest;
 };
index 63c5f543588b5bc3e1ebfdc67d7bf6e873376091..de4e5218b94dc3695261f57a6476361bf6b92190 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (fourk_test)
        film->set_resolution (RESOLUTION_4K);
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
        film->set_container (Ratio::from_id ("185"));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
        wait_for_jobs ();
 
        film->make_dcp ();
index 2da38f45566d5d4ebec68d9f47a1d42a89f21b96..2799449191575571a55e3c2694a9032265608fee 100644 (file)
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test)
        boost::filesystem::path p = private_data / "betty_L.wav";
 
        shared_ptr<SndfileContent> c (new SndfileContent (film, p));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
        wait_for_jobs ();
 
        c->analyse_audio (boost::bind (&finished));
index 0127cc644e0929c0c34ac55551abc101c4e1df2e..68e14ff3ca353f470d9f09f8c14112f6713b34a4 100644 (file)
@@ -51,7 +51,7 @@ void test_audio_delay (int delay_in_ms)
 
        shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav"));
        content->set_audio_delay (delay_in_ms);
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
 
        film->make_dcp ();
index 99e0870b17c59801d64810fbacf00889e007d1f7..5981552d128e6c3f9f0ead28bacfc772ee2fd718 100644 (file)
@@ -40,8 +40,8 @@ BOOST_AUTO_TEST_CASE (black_fill_test)
        shared_ptr<ImageContent> contentA (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
        shared_ptr<ImageContent> contentB (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
 
-       film->examine_and_add_content (contentA, true);
-       film->examine_and_add_content (contentB, true);
+       film->examine_and_add_content (contentA);
+       film->examine_and_add_content (contentB);
        wait_for_jobs ();
 
        contentA->set_scale (VideoContentScale (Ratio::from_id ("185")));
index 08e8a5cc03360b7b8c42c93f8fdc480f867fdbc2..314b214f2acf5ccc4f576c32c4d0c6661f30d8e4 100644 (file)
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test)
        film->set_name ("frobozz");
        film->set_burn_subtitles (false);
        shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent (film, "test/data/dcp_sub.xml"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
 
        BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (2));
index 5117cf412a3aba7b16343a4409c4071e2d47566a..444b0869b7dc52fd2928dec6444a408315265642 100644 (file)
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
        shared_ptr<Film> film = new_test_film ("ffmpeg_audio_test");
        film->set_name ("ffmpeg_audio_test");
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/staircase.mov"));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
 
        wait_for_jobs ();
        
index 8b441db98578f7573ba6845298c29a869ea4915b..559277e511a4ba14e59f4f2b329eea6d4b77224b 100644 (file)
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test)
        shared_ptr<Film> film = new_test_film ("ffmpeg_dcp_test");
        film->set_name ("test_film2");
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
 
        wait_for_jobs ();
        
index 3274fd8a907054a477665b24ce616d4a2180d6f5..f3504ffc591f8e8a799981436eb46c4ee5c6b0b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -60,7 +60,7 @@ test (boost::filesystem::path file, vector<int> frames)
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, path)); 
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        shared_ptr<Log> log (new NullLog);
        FFmpegDecoder decoder (content, log);
index cf1fb818958ff4f9c34c7e4adf6525f54a7d7b97..c5f43173ea57b55ada9eb972c2da0cdd8845a008 100644 (file)
@@ -47,7 +47,7 @@ test (boost::filesystem::path file, float fps, int gaps)
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, path)); 
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        shared_ptr<Log> log (new NullLog);
        FFmpegDecoder decoder (content, log);
index 0ed5a64a7400f4f2aef00de00c6dc06be6ed9097..e8ebcea3b959833ccb1009c561c7b99f4394bbf5 100644 (file)
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        shared_ptr<Film> film = new_test_film ("audio_sampling_rate_test");
        /* Get any piece of content, it doesn't matter what */
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        
        std::list<int> afr;
index b2420b1fe490c585ff0741f8f677bf1492aebf1e..80cd9c3df35d200873a8b86907ab11908ae47eb2 100644 (file)
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
        A->set_name ("frobozz");
 
        shared_ptr<FFmpegContent> c (new FFmpegContent (A, "test/data/test.mp4"));
-       A->examine_and_add_content (c, true);
+       A->examine_and_add_content (c);
        A->set_encrypted (true);
        wait_for_jobs ();
 
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
 
        shared_ptr<DCPContent> d (new DCPContent (B, "build/test/import_dcp_test/" + A->dcp_name()));
        d->add_kdm (kdm);
-       B->examine_and_add_content (d, true);
+       B->examine_and_add_content (d);
        wait_for_jobs ();
 
        B->make_dcp ();
index b0b83de44948d28712a65ab7bece6d5af1d3f859..c2ea833bd859c13e7f6cf7136d1f89f1f12de314 100644 (file)
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        /* Test interior aspect ratio: shouldn't be shown with trailers */
 
        shared_ptr<ImageContent> content (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        content->set_scale (VideoContentScale (Ratio::from_id ("133")));
        film->set_container (Ratio::from_id ("185"));
index f7aa52d6f539f18102a3f68080c59f70d6cc75e7..bbf70781a87d4600526428055228fc54809c1c62 100644 (file)
@@ -87,13 +87,13 @@ BOOST_AUTO_TEST_CASE (play_test)
        film->set_name ("play_test");
 
        shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/red_24.mp4"));
-       film->examine_and_add_content (A, true);
+       film->examine_and_add_content (A);
        wait_for_jobs ();
 
        BOOST_CHECK_EQUAL (A->video_length_after_3d_combine(), 16);
 
        shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/red_30.mp4"));
-       film->examine_and_add_content (B, true);
+       film->examine_and_add_content (B);
        wait_for_jobs ();
 
        BOOST_CHECK_EQUAL (B->video_length_after_3d_combine(), 16);
index d7a55b57a065d89d34b4de743ddd7a0319e4dfac..b6f864f8250e9762f0975eb16e6e79b38af8e360 100644 (file)
@@ -44,9 +44,9 @@ BOOST_AUTO_TEST_CASE (player_overlaps_test)
        shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/test.mp4"));
        shared_ptr<FFmpegContent> C (new FFmpegContent (film, "test/data/test.mp4"));
 
-       film->examine_and_add_content (A, true);
-       film->examine_and_add_content (B, true);
-       film->examine_and_add_content (C, true);
+       film->examine_and_add_content (A);
+       film->examine_and_add_content (B);
+       film->examine_and_add_content (C);
        wait_for_jobs ();
 
        BOOST_CHECK_EQUAL (A->full_length(), DCPTime (288000));
@@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE (player_silence_padding_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_audio_channels (6);
        
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
        wait_for_jobs ();
 
        shared_ptr<Player> player = film->make_player ();
index d442b6a4d62524c9a6cc503582bf52e525496a5b..a0886fbf4fdef788579c4d8ac8aeeda976dc2a9b 100644 (file)
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE (recover_test)
 
        shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test"));
        content->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
 
        film->make_dcp ();
index d312ae7edeaa6e9b85448f9d7f7a4ef0a1fc4f57..1d19d269e314b2a448ab31dbbfcf73ceea9eaf1c 100644 (file)
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/red_24.mp4"));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
 
        wait_for_jobs ();
 
index d642271c27088bb39254e0bc6a1031e4e51d5541..441af6bf30514ecb2eaaafa58ae7deea3ffdaa16 100644 (file)
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (scaling_test)
        film->set_name ("scaling_test");
        shared_ptr<ImageContent> imc (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
 
-       film->examine_and_add_content (imc, true);
+       film->examine_and_add_content (imc);
 
        wait_for_jobs ();
        
index 7abe7fa2623f290ebae98409cbf689551c971391..2a1a061360e328fefc6721aeb09f1c9d3b7fedbc 100644 (file)
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        content->set_scale (VideoContentScale (Ratio::from_id ("185")));
        
index 25f2d80c94d1c1e7a9446b6476ccde0349a669ef..d876a0228d7acafa9cd7ab0bb8319097c127869d 100644 (file)
@@ -48,7 +48,7 @@ test_silence_padding (int channels)
        film->set_name (film_name);
 
        shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
 
        film->set_audio_channels (channels);
index 3e4f895c55a013e61ad5be8ad59591ac915615c9..dac7b5a25a7aa18ea79c52ec2c36e37d945b2f08 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
 
        wait_for_jobs ();
 
index 0553d4c0f606d13733be55d6c6c1551438eb76d4..f51a77109a6ccda11e1d5eb0546d7b866d18ebb4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE (threed_test)
        film->set_name ("test_film2");
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
        c->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
-       film->examine_and_add_content (c, true);
+       film->examine_and_add_content (c);
 
        wait_for_jobs ();
 
index bdca521a22ccaedd40f9ebf9625ace55d26d6739..9bcbf3a696504e20da51e8c20499a622c93e320f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE (upmixer_a_test)
        film->set_name ("frobozz");
        shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/white.wav"));
        content->set_audio_processor (AudioProcessor::from_id ("stereo-5.1-upmix-a"));
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
 
        wait_for_jobs ();
 
index 43b7b9b1dde09c8a57beb932a7511ea76d720ff9..2a66cb855842a22c17f43b84f7813ebbb04b3ad0 100644 (file)
@@ -33,12 +33,21 @@ BOOST_AUTO_TEST_CASE (md5_digest_test)
 {
        vector<boost::filesystem::path> p;
        p.push_back ("test/data/md5.test");
-       string const t = md5_digest (p, shared_ptr<Job> ());
-       BOOST_CHECK_EQUAL (t, "15058685ba99decdc4398c7634796eb0");
+       BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "57497ef84a0487f2bb0939a1f5703912");
 
+       p.push_back ("test/data/md5.test2");
+       BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "5a3a89857b931755ae728a518224a05c");
+
+       p.clear ();
+       p.push_back ("test/data/md5.test3");
+       p.push_back ("test/data/md5.test");
+       p.push_back ("test/data/md5.test2");
+       p.push_back ("test/data/md5.test4");
+       BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "52ccf111e4e72b58bb7b2aaa6bd45ea5");
+       
        p.clear ();
        p.push_back ("foobar");
-       BOOST_CHECK_THROW (md5_digest (p, shared_ptr<Job> ()), std::runtime_error);
+       BOOST_CHECK_THROW (md5_digest_head_tail (p, 1024), OpenFileError);
 }
 
 /* Straightforward test of DCPTime::round_up */
index f6452c788f381f125d61188fcaa830e5d45753d0..7c3ca3efe68e45847f44937e47808d35ecb65b4b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test)
        film->set_burn_subtitles (false);
        shared_ptr<SubRipContent> content (new SubRipContent (film, "test/data/subrip2.srt"));
        content->set_use_subtitles (true);
-       film->examine_and_add_content (content, true);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
        film->make_dcp ();
        wait_for_jobs ();