[FFmpeg-cvslog] avfilter/f_ebur128: add quiet framelog mode

Paul B Mahol git at videolan.org
Thu Nov 10 20:12:41 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Nov 10 19:13:43 2022 +0100| [a0c7c9d636c53e87a7f7265d04662c8b7e750101] | committer: Paul B Mahol

avfilter/f_ebur128: add quiet framelog mode

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0c7c9d636c53e87a7f7265d04662c8b7e750101
---

 doc/filters.texi        | 2 ++
 libavfilter/f_ebur128.c | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 18b14fc376..910fc1fe79 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -27979,6 +27979,8 @@ Force the frame logging level.
 
 Available values are:
 @table @samp
+ at item quiet
+logging disabled
 @item info
 information logging level
 @item verbose
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 195c9a8639..298bbaa9d9 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -164,6 +164,7 @@ static const AVOption ebur128_options[] = {
     { "size",  "set video size",   OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "640x480"}, 0, 0, V|F },
     { "meter", "set scale meter (+9 to +18)",  OFFSET(meter), AV_OPT_TYPE_INT, {.i64 = 9}, 9, 18, V|F },
     { "framelog", "force frame logging level", OFFSET(loglevel), AV_OPT_TYPE_INT, {.i64 = -1},   INT_MIN, INT_MAX, A|V|F, "level" },
+        { "quiet",   "logging disabled",          0, AV_OPT_TYPE_CONST, {.i64 = AV_LOG_QUIET},   INT_MIN, INT_MAX, A|V|F, "level" },
         { "info",    "information logging level", 0, AV_OPT_TYPE_CONST, {.i64 = AV_LOG_INFO},    INT_MIN, INT_MAX, A|V|F, "level" },
         { "verbose", "verbose logging level",     0, AV_OPT_TYPE_CONST, {.i64 = AV_LOG_VERBOSE}, INT_MIN, INT_MAX, A|V|F, "level" },
     { "metadata", "inject metadata in the filtergraph", OFFSET(metadata), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|F },
@@ -535,6 +536,7 @@ static av_cold int init(AVFilterContext *ctx)
     int ret;
 
     if (ebur128->loglevel != AV_LOG_INFO &&
+        ebur128->loglevel != AV_LOG_QUIET &&
         ebur128->loglevel != AV_LOG_VERBOSE) {
         if (ebur128->do_video || ebur128->metadata)
             ebur128->loglevel = AV_LOG_VERBOSE;
@@ -898,6 +900,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
                 SET_META_PEAK(true,   TRUE);
             }
 
+            if (ebur128->loglevel != AV_LOG_QUIET) {
             if (ebur128->scale == SCALE_TYPE_ABSOLUTE) {
                 av_log(ctx, ebur128->loglevel, "t: %-10s " LOG_FMT,
                        av_ts2timestr(pts, &outlink->time_base),
@@ -923,7 +926,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
             PRINT_PEAKS("FTPK", ebur128->true_peaks_per_frame, TRUE);
             PRINT_PEAKS("TPK", ebur128->true_peaks,   TRUE);
             av_log(ctx, ebur128->loglevel, "\n");
-
+            }
         }
     }
 



More information about the ffmpeg-cvslog mailing list