*** functions.inc.orig Sat Dec 7 07:26:26 2002 --- functions.inc Tue Jan 21 17:18:52 2003 *************** *** 79,87 **** --- 79,89 ---- $path[] = "/usr/local/gallery"; $path[] = "/usr/local/gallery/bin"; $path[] = "/usr/local/gallery/jhead"; + $path[] = "/usr/local/gallery/ffmpeg"; $path[] = "/usr/local/gallery/netpbm"; $path[] = "/usr/local/bin"; $path[] = "/usr/local/bin/jhead"; + $path[] = "/usr/local/bin/ffmpeg"; $path[] = "/usr/local/bin/netpbm"; $path[] = "/usr/local/netpbm"; $path[] = "/usr/local/netpbm/bin"; *************** *** 89,94 **** --- 91,97 ---- $path[] = "/usr/local/jhead/bin"; $path[] = "/usr/bin/gallery"; $path[] = "/usr/bin/gallery/jhead"; + $path[] = "/usr/bin/gallery/ffmpeg"; $path[] = "/usr/bin/gallery/netpbm"; return $path; *************** *** 215,220 **** --- 218,246 ---- $fail["fail-exif"] = "Could not locate jhead"; } else { $success[] = "jhead binary located"; + } + + return array($success, $fail); + } + + function check_ffmpeg($location="") + { + global $gallery; + + $fail = array(); + $success = array(); + + $bin = fs_executable("ffmpeg"); + + if ($location) { + $d = locateDir($bin, $location); + } else { + $d = locateDir($bin, $gallery->app ? $gallery->app->pnmDir : ""); + } + if (!$d) { + $fail["fail-ffmpeg"] = "Could not locate ffmpeg"; + } else { + $success[] = "ffmpeg binary located"; } return array($success, $fail);