Merge branch 'master' of ssh://carlh.dnsalias.org/home/carl/git/dvdomatic
[dcpomatic.git] / src / lib / film.cc
index 041bbc22503c624c447a0ed4e5eca3ecad16849c..6bc503dc1c3b4683df14ed09db1e13bc7e2ca684 100644 (file)
@@ -68,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;
@@ -329,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"));
@@ -943,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> ();
@@ -998,21 +1006,6 @@ Film::set_content (string c)
        if (content_type() == STILL) {
                set_use_content_audio (false);
        }
-
-#ifdef DVDOMATIC_WINDOWS
-       wchar_t dir[512];
-       GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
-       boost::filesystem::path path_dir (dir);
-       path_dir = path_dir.parent_path ();
-       path_dir /= "ffprobe.exe";
-       string ffprobe = "\"" + path_dir.string () + "\" ";
-#else
-       string ffprobe = "ffprobe ";
-#endif
-       ffprobe += "\"" + c + "\"";
-       ffprobe += " 2> \"" + file ("ffprobe.log") + "\"";
-       log()->log (String::compose ("Probing with %1", ffprobe));
-       system (ffprobe.c_str ());
 }
 
 void