universal_copy $ROOT lib/libswscale*.dylib $WORK/$libs
universal_copy $ROOT lib/libpostproc*.dylib $WORK/$libs
universal_copy $ROOT lib/libswresample*.dylib $WORK/$libs
+universal_copy $ROOT bin/ffprobe $WORK/$macos
universal_copy $ENV lib/libboost_system.dylib $WORK/$libs
universal_copy $ENV lib/libboost_filesystem.dylib $WORK/$libs
universal_copy $ENV lib/libboost_thread.dylib $WORK/$libs
#endif
#ifdef DCPOMATIC_OSX
#include <sys/sysctl.h>
+#include <mach-o/dyld.h>
#endif
using std::pair;
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> >