diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/cross.cc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 5ecbedf6e..61ec8de5e 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -33,6 +33,7 @@ #endif #ifdef DCPOMATIC_OSX #include <sys/sysctl.h> +#include <mach-o/dyld.h> #endif using std::pair; @@ -179,11 +180,30 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share CloseHandle (process_info.hProcess); CloseHandle (process_info.hThread); CloseHandle (child_stderr_read); -#else +#endif + +#ifdef DCPOMATIC_LINUX string ffprobe = "ffprobe \"" + content.string() + "\" 2> \"" + out.string() + "\""; log->log (String::compose ("Probing with %1", ffprobe)); + system (ffprobe.c_str ()); +#endif + +#ifdef DCPOMATIC_OSX + uint32_t size = 1024; + char buffer[size]; + if (_NSGetExecutablePath (buffer, &size)) { + log->log ("_NSGetExecutablePath failed"); + return; + } + + boost::filesystem::path path (buffer); + path.remove_filename (); + path /= "ffprobe"; + + string ffprobe = path.string() + " \"" + content.string() + "\" 2> \"" + out.string() + "\""; + log->log (String::compose ("Probing with %1", ffprobe)); system (ffprobe.c_str ()); -#endif +#endif } list<pair<string, string> > |
