X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Feval.h;h=5481b1407c72a7a8cd7a153bff3dff35f999566a;hb=881b5b80da6bf63d01db5baa1db602a20f64b12c;hp=c450332d3efccda64487e781af7892334f03675c;hpb=cac55c91969158bd07ffcef27753f4edc79fc8ef;p=ffmpeg diff --git a/libavcodec/eval.h b/libavcodec/eval.h index c450332d3ef..5481b1407c7 100644 --- a/libavcodec/eval.h +++ b/libavcodec/eval.h @@ -21,7 +21,7 @@ */ /** - * @file eval.h + * @file libavcodec/eval.h * eval header. */ @@ -74,4 +74,23 @@ AVEvalExpr * ff_parse(const char *s, const char * const *const_name, double ff_parse_eval(AVEvalExpr * e, const double *const_value, void *opaque); void ff_eval_free(AVEvalExpr * e); +/** + * Parses the string in numstr and returns its value as a double. If + * the string is empty, contains only whitespaces, or does not contain + * an initial substring that has the expected syntax for a + * floating-point number, no conversion is performed. In this case, + * returns a value of zero and the value returned in tail is the value + * of numstr. + * + * @param numstr a string representing a number, may contain one of + * the International System number postfixes, for example 'K', 'M', + * 'G'. If 'i' is appended after the postfix, powers of 2 are used + * instead of powers of 10. The 'B' postfix multiplies the value for + * 8, and can be appended after another postfix or used alone. This + * allows using for example 'KB', 'MiB', 'G' and 'B' as postfix. + * @param tail if non-NULL puts here the pointer to the char next + * after the last parsed character + */ +double av_strtod(const char *numstr, char **tail); + #endif /* AVCODEC_EVAL_H */