ffmpeg-cli-wrapper
ffmpeg-cli-wrapper copied to clipboard
I hope to provide customizable throwOnError time.
trafficstars
I hope to provide customizable throwOnError time.
protected void throwOnError(Process p) throws IOException {
try {
// TODO In java 8 use waitFor(long timeout, TimeUnit unit)
if (ProcessUtils.waitForWithTimeout(p, 1, TimeUnit.SECONDS) != 0) {
// TODO Parse the error
throw new IOException(path + " returned non-zero exit status. Check stdout.");
}
} catch (TimeoutException e) {
throw new IOException("Timed out waiting for " + path + " to finish.");
}
}