aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-02-25 14:05:52 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2008-02-25 14:05:52 +0000
commit60b5a745a91484ecc2697d9615d1314bdbfdbf51 (patch)
tree55212a1f4eee8b0e87ed9585ce620ccb661a2d10 /cmdutils.h
parent4649fa90529c27520f2e9b7990dd11b47adc4465 (diff)
downloadffmpeg-60b5a745a91484ecc2697d9615d1314bdbfdbf51.tar.gz
Export and document in cmdutils.h the function parse_number_or_die().
Patch by Stefano Sabatini: stefano sabatini-lala poste it Originally committed as revision 12210 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.h')
-rw-r--r--cmdutils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h
index 102e0403de..9d0f32a5ae 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -24,6 +24,21 @@
#include <inttypes.h>
+/**
+ * parses a string and returns its corresponding value as a double or
+ * exits from the application if the string cannot be correctly parsed
+ * or the corresponding value is invalid
+ *
+ * @param context the context of the value to be set (e.g. the
+ * corresponding commandline option name)
+ * @param numstr the string to be parsed
+ * @param type the type (OPT_INT64 or OPT_FLOAT) as which the
+ * string should be parsed
+ * @param min the minimum valid value accepted
+ * @param max the maximum valid value accepted
+ */
+double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
+
typedef struct {
const char *name;
int flags;