[FFmpeg-devel] [PATCH v10 0/3] avutil/log: Add log flag to control printing of memory addresses
ffmpegagent
ffmpegagent at gmail.com
Thu Apr 10 03:38:56 EEST 2025
--and disable by default in fftools. The benefits are:
* Smaller log file sizes
* Makes log files better readable
* Allows comparing and viewing log file diffs without almost every line
being different due to those addresses
Before
======
[hevc @ 0000018e72a89cc0] nal_unit_type:
[hevc @ 0000018e72a89cc0] Decoding PPS
[hevc @ 0000018e72a89cc0] nal_unit_type: 39(SEI_P.. [hevc @
0000018e72a89cc0] Decoding SEI
[mp4 @ 0000018e72a8e240] All [mp4 @ 0000018e72a8e240] Afte [hevc @
0000018e742f6b40] Decoded frame with POC .. detected 16 logical cores
[Parsed_scale_0 @ 0000018e74382f40] Setting 'w' t.. [Parsed_scale_0 @
0000018e74382f40] Setting 'h' t.. [Parsed_scale_1 @ 0000018e74382440]
Setting 'w' t.. [mjpeg @ 0000018e743210c0] Forcing thread count t.. [mjpeg @
0000018e743210c0] intra_quant_bias = 96
After
=====
[hevc] nal_unit_type: [hevc] Decoding PPS
[hevc] nal_unit_type: 39(SEI_P.. [hevc] Decoding SEI
[mp4] All info found
[mp4] After avformat_find_ [hevc] Decoded frame with POC 2.
[Parsed_scale_0] Setting 'w' t.. [Parsed_scale_0] Setting 'h' t..
[Parsed_scale_1] Setting 'w' t.. [mjpeg] Forcing thread count t.. [mjpeg]
intra_quant_bias = 96
Versions
========
V2
==
* Added log flag for optionally restoring the previous behavior (as
requested by Gyan)
V3
==
* Externalize the prefix formatting with a prefix_format callback
V4
==
* Implement a custom logging callback function for fftools instead of the
prefix formatting callback (as suggested by Hendrik Leppkes)
V5
==
* Remove unused var
* Add missing include to fix build error on PPC (thanks, Michael)
V6
==
* No more changes to avutil involved
* Let fftools have its own management of log level and flags (as figured to
be most likely what Nicolas George was alluding to)
V7
==
* Minimal version without "simple id" substitution
* Defaults for printing mem addresses:
* fftools: off
* avutil: on
V8
==
* Negated flag logic
* Use singular naming
* Fix flag doc text (thanks, Andreas!)
V9
==
* Rename 'memaddress' to 'mem' for CLI (as suggested by Gyan)
V10
===
* Print 'mem' flag in help outrput (thanks, Gyan)
softworkz (3):
avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES
fftools: add mem log flag and disable printing addresses by default
doc/fftools-common-opts: document mem log flag
doc/APIchanges | 3 +++
doc/fftools-common-opts.texi | 2 ++
fftools/ffmpeg.c | 2 +-
fftools/ffplay.c | 2 +-
fftools/ffprobe.c | 2 +-
fftools/opt_common.c | 7 +++++++
libavutil/log.c | 6 ++++--
libavutil/log.h | 5 +++++
libavutil/version.h | 2 +-
9 files changed, 25 insertions(+), 6 deletions(-)
base-commit: 02eda84bf2fcf0db7793872204b0f564a6557232
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-59%2Fsoftworkz%2Fsubmit_logaddresses-v10
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-59/softworkz/submit_logaddresses-v10
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/59
Range-diff vs v9:
1: 0ce5bd11d7 = 1: 0ce5bd11d7 avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES
2: 0780dd080c ! 2: 207dedbff6 fftools: add mem log flag and disable printing addresses by default
@@ fftools/opt_common.c: int opt_loglevel(void *optctx, const char *opt, const char
} else {
break;
}
+@@ fftools/opt_common.c: int opt_loglevel(void *optctx, const char *opt, const char *arg)
+ av_log(NULL, AV_LOG_FATAL, "\"level\"\n");
+ av_log(NULL, AV_LOG_FATAL, "\"time\"\n");
+ av_log(NULL, AV_LOG_FATAL, "\"datetime\"\n");
++ av_log(NULL, AV_LOG_FATAL, "\"mem\"\n");
+ return AVERROR(EINVAL);
+ }
+
3: bfe2e51860 = 3: dc334f3eeb doc/fftools-common-opts: document mem log flag
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list