Merge branch 'master' of ssh://carlh.dnsalias.org/home/carl/git/dvdomatic
[dcpomatic.git] / src / lib / film.cc
index 81c7de77f72bb0b3a04f1e7d906011c8777bcca8..6bc503dc1c3b4683df14ed09db1e13bc7e2ca684 100644 (file)
@@ -52,6 +52,7 @@
 #include "audio_decoder.h"
 #include "sndfile_decoder.h"
 #include "analyse_audio_job.h"
+#include "cross.h"
 
 #include "i18n.h"
 
@@ -67,6 +68,7 @@ using std::setfill;
 using std::min;
 using std::make_pair;
 using std::endl;
+using std::list;
 using boost::shared_ptr;
 using boost::lexical_cast;
 using boost::to_upper_copy;
@@ -218,6 +220,10 @@ Film::video_state_identifier () const
          << "_" << j2k_bandwidth()
          << "_" << boost::lexical_cast<int> (colour_lut());
 
+       if (trim_type() == ENCODE) {
+               s << "_" << trim_start() << "_" << trim_end();
+       }
+
        if (dcp_ab()) {
                pair<string, string> fa = Filter::ffmpeg_strings (Config::instance()->reference_filters());
                s << "ab_" << Config::instance()->reference_scaler()->id() << "_" << fa.first << "_" << fa.second;
@@ -324,6 +330,10 @@ Film::make_dcp ()
 #endif
        pair<string, int> const c = cpu_info ();
        log()->log (String::compose ("CPU: %1, %2 processors", c.first, c.second));
+       list<pair<string, string> > const m = mount_info ();
+       for (list<pair<string, string> >::const_iterator i = m.begin(); i != m.end(); ++i) {
+               log()->log (String::compose ("Mount: %1 %2", i->first, i->second));
+       }
        
        if (format() == 0) {
                throw MissingSettingError (_("format"));
@@ -938,6 +948,9 @@ Film::set_content (string c)
                _content = c;
        }
 
+       /* Do this before we start using FFmpeg ourselves */
+       run_ffprobe (c, file ("ffprobe.log"), _log);
+       
        /* Reset streams here in case the new content doesn't have one or the other */
        _content_audio_stream = shared_ptr<AudioStream> ();
        _subtitle_stream = shared_ptr<SubtitleStream> ();