[FFmpeg-cvslog] avfilter/f_graphmonitor: add flags option shortcuts

Paul B Mahol git at videolan.org
Sun May 21 13:56:20 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun May 21 12:39:05 2023 +0200| [65fe18040a90ab1b206bfedec08308940436c590] | committer: Paul B Mahol

avfilter/f_graphmonitor: add flags option shortcuts

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

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

diff --git a/doc/filters.texi b/doc/filters.texi
index 393297c418..ddc8529bbe 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -14660,6 +14660,12 @@ Set flags which enable which stats are shown in video.
 
 Available values for flags are:
 @table @samp
+ at item none
+All flags turned off.
+
+ at item all
+All flags turned on.
+
 @item queue
 Display number of queued frames in each link.
 
diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c
index 68c343d75e..78a365822f 100644
--- a/libavfilter/f_graphmonitor.c
+++ b/libavfilter/f_graphmonitor.c
@@ -72,6 +72,7 @@ enum {
 };
 
 enum {
+    FLAG_NONE  = 0 << 0,
     FLAG_QUEUE = 1 << 0,
     FLAG_FCIN  = 1 << 1,
     FLAG_FCOUT = 1 << 2,
@@ -109,7 +110,8 @@ static const AVOption graphmonitor_options[] = {
         { "nodisabled",NULL,0,AV_OPT_TYPE_CONST, {.i64=MODE_NODISABLED},0,0,VFR,"mode" },
     { "flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64=FLAG_QUEUE}, 0, INT_MAX, VFR, "flags" },
     { "f",     "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64=FLAG_QUEUE}, 0, INT_MAX, VFR, "flags" },
-        { "queue",            NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAG_QUEUE},   0, 0, VFR, "flags" },
+        { "none",             NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAG_NONE},    0, 0, VFR, "flags" },
+        { "all",              NULL, 0, AV_OPT_TYPE_CONST, {.i64=INT_MAX},      0, 0, VFR, "flags" },
         { "frame_count_in",   NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAG_FCOUT},   0, 0, VFR, "flags" },
         { "frame_count_out",  NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAG_FCIN},    0, 0, VFR, "flags" },
         { "frame_count_delta",NULL, 0, AV_OPT_TYPE_CONST, {.i64=FLAG_FC_DELTA},0, 0, VFR, "flags" },



More information about the ffmpeg-cvslog mailing list