[FFmpeg-devel] [PATCH 6/6] Rename ff_parse() to av_parse_expr(), the new name is more expressive and fits better in the overall naming scheme for the revisited eval API.
Stefano Sabatini
stefano.sabatini-lala
Sat Apr 10 13:50:33 CEST 2010
---
libavcodec/eval.c | 4 ++--
libavcodec/eval.h | 2 +-
libavcodec/ratecontrol.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavcodec/eval.c b/libavcodec/eval.c
index 92569ca..b4b37eb 100644
--- a/libavcodec/eval.c
+++ b/libavcodec/eval.c
@@ -393,7 +393,7 @@ static int verify_expr(AVExpr * e) {
}
}
-int ff_parse(AVExpr **expr, const char *s, const char * const *const_name,
+int av_parse_expr(AVExpr **expr, const char *s, const char * const *const_name,
double (**func1)(void *, double), const char **func1_name,
double (**func2)(void *, double, double), const char **func2_name,
void *log_ctx){
@@ -442,7 +442,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co
void *opaque, const char **error){
AVExpr * e;
double d;
- int ret = ff_parse(&e, s, const_name, func1, func1_name, func2, func2_name, NULL);
+ int ret = av_parse_expr(&e, s, const_name, func1, func1_name, func2, func2_name, NULL);
if (ret < 0)
*error = "Error occurred during parsing, check log";
if (!e) return NAN;
diff --git a/libavcodec/eval.h b/libavcodec/eval.h
index 2107bd5..efb5620 100644
--- a/libavcodec/eval.h
+++ b/libavcodec/eval.h
@@ -63,7 +63,7 @@ double ff_eval2(const char *s, const double *const_value, const char * const *co
* @return 0 in case of success, a negative error corresponding to an
* AVERROR code in case of failure
*/
-int ff_parse(AVExpr **expr, const char *s, const char * const *const_name,
+int av_parse_expr(AVExpr **expr, const char *s, const char * const *const_name,
double (**func1)(void *, double), const char **func1_name,
double (**func2)(void *, double, double), const char **func2_name,
void *log_ctx);
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 4807eb2..6a21a0a 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -106,7 +106,7 @@ int ff_rate_control_init(MpegEncContext *s)
};
emms_c();
- ret = ff_parse(&rcc->rc_eq_eval, s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1, func1_names, NULL, NULL, s->avctx);
+ ret = av_parse_expr(&rcc->rc_eq_eval, s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1, func1_names, NULL, NULL, s->avctx);
if (ret < 0) {
av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\"\n", s->avctx->rc_eq);
return ret;
--
1.7.0
More information about the ffmpeg-devel
mailing list