summaryrefslogtreecommitdiff
path: root/cmdutils.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-01-20 06:42:39 +0000
committerMåns Rullgård <mans@mansr.com>2010-01-20 06:42:39 +0000
commitffcc6e24f5dfa98dfcdcae39f5f85c1f5b8d52e1 (patch)
tree12253316dd457c8490bcdddc5879603e65fe3802 /cmdutils.h
parent5e7dfb7de11dab3cbf8663d4fcb682935bd3a80b (diff)
downloadffmpeg-ffcc6e24f5dfa98dfcdcae39f5f85c1f5b8d52e1.tar.gz
Add -timelimit option
This option limits the CPU time used by ffmpeg to the number of seconds specified. After this time, the OS sends a SIGXCPU signal, which we handle and attempt to exit cleanly. If the process is stuck, the OS will deliver a SIGKILL one second later, forcibly terminating the process. This functionality is useful in automated setups where a runaway ffmpeg process would otherwise go undetected. Originally committed as revision 21347 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.h')
-rw-r--r--cmdutils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h
index d2d722b085..9190a81fd9 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -56,6 +56,11 @@ int opt_default(const char *opt, const char *arg);
int opt_loglevel(const char *opt, const char *arg);
/**
+ * Limit the execution time.
+ */
+int opt_timelimit(const char *opt, const char *arg);
+
+/**
* Parses a string and returns its corresponding value as a double.
* Exits from the application if the string cannot be correctly
* parsed or the corresponding value is invalid.