From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 6C9E84E12B for <ffmpegdev@gitmailbox.com>; Fri, 6 Jun 2025 20:29:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2905568CD02; Fri, 6 Jun 2025 23:29:44 +0300 (EEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 30E1168B7CC for <ffmpeg-devel@ffmpeg.org>; Fri, 6 Jun 2025 23:29:38 +0300 (EEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-23539a1a421so22946015ad.0 for <ffmpeg-devel@ffmpeg.org>; Fri, 06 Jun 2025 13:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749241776; x=1749846576; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:from:to:cc:subject:date :message-id:reply-to; bh=m8L0OwZnLs83TYb75O5eFGujAjgh0IuxNic1IFdKa20=; b=XbCSQ9ZoOOLst3fGpPGBUFQDt36Ack0m3HpWgIrnWDcDavT68/WdNl7rq4RFabwIAN vd6pu7K2g4LnEMsBc+eA9d/ZcRneGmXuO6wMADQVOG1GST1BRPH5nTNPgMNpEeRs458v ozloZfkHGjJ76D7r3XvsGJI5gJILyeLKcyxSHBUNJGchd/uG0wi0sUkKri6sqXcKh28O kQLbdluMJ4kKu0TDC/vxJGMYUV+bt33DX4RzBtazednJrd7SyrepbkdYGV2pZg12kMfq 6qKWfwvk+OCvQmxNe9XoOgsGbd40t/Cii1og/TjR2VE/1YJC2sDkN4bB6uJd/WW45YgR jdFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749241776; x=1749846576; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date:from :references:in-reply-to:message-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m8L0OwZnLs83TYb75O5eFGujAjgh0IuxNic1IFdKa20=; b=iPxfSZKuFIk0+2OsOauVIDjc0pAkFUFQxls3Pfh/4i9q3lwKLZ0lYAVxphg+tjbhSC KigmAAdNvkuSFiKwAe8xuB0FrVG3NaUd4Q8Tjc2LyR/FfOC2TpwXudLS0mevT4pxa371 Qd56qRx3aKtidsseanRx7ASQ50LnmySQl8b1EJ6M/GqggC1nHNb+B066zDmiXJ4r7si5 ut1S8GTjldd+9dkhdiDSP5dzmGqstQmiDntIcEg/FIsQAInADR/2naZDTpmgTAUxyQ4O 4Bwno6xMqYoflH706FdmbU7smIx6ZAMxQ0leNtzwzfjhNSZTcOVTm9JY+dTKP+V0I+rT 7WXQ== X-Gm-Message-State: AOJu0YynecsfOXAiPC4DxX5MD5hF3YEm1+UmAKqs9uj5+VjPSY3PFhL5 Z+auRTDQleOTpTTpkeLqLw9iA5dYv8edqYyn5Zk6tP76hO0LuUHVzVGHANIGSQ== X-Gm-Gg: ASbGnctR+qdixJmY8Z5ovfoyx1fyrDERaZIZhRpdaAe7LRp5W3o/f7NiqHKEu7GR8DX RnoR+WWYaQ0m8hbIifFiL2M7YtYws4urG0xQuWZmabTgBwdBjm0IpsXfZk/5xh8U/BLkw1ivoqu kOxTq8DXnEk9FhbRGmmWF8ezbI/kNoLMMrmcnF/YD+T+T6LKRPadhnjwFWzZpCJW2BIzGj3c5jT 9L6CM7XufTDlRmq70kJ+llIQSZ6NyL35O3bTpPYwn5gdm/3QqsrJwtP4DWBPV2xZjDBmhZhO2+X +8QkJz1reYrErOPP4aQdUt2HDmeiV7YzcE3/xQ/5IL9wy1z26SZVOAj4MEhJA0W8sIqOhA== X-Google-Smtp-Source: AGHT+IEtHuS5CnimAnjohhzfvEFvNj7mdxDOjr6lJmpIHZscyCkqAe4FnjAexiBL3JSm9IOHp2kUaA== X-Received: by 2002:a17:903:228e:b0:235:1b3e:c01c with SMTP id d9443c01a7336-23601dc462bmr60706235ad.39.1749241776282; Fri, 06 Jun 2025 13:29:36 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23603078ca1sm16291985ad.35.2025.06.06.13.29.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jun 2025 13:29:35 -0700 (PDT) Message-Id: <pull.59.v11.ffstaging.FFmpeg.1749241770.ffmpegagent@gmail.com> In-Reply-To: <pull.59.v10.ffstaging.FFmpeg.1744245539.ffmpegagent@gmail.com> References: <pull.59.v10.ffstaging.FFmpeg.1744245539.ffmpegagent@gmail.com> From: ffmpegagent <ffmpegagent-at-gmail.com@ffmpeg.org> Date: Fri, 06 Jun 2025 20:29:27 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v11 0/3] avutil/log: Add log flag to control printing of memory addresses X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: softworkz <softworkz@hotmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> Archived-At: <https://master.gitmailbox.com/ffmpegdev/pull.59.v11.ffstaging.FFmpeg.1749241770.ffmpegagent@gmail.com/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> --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) V11 === * Reversed logic again and renamed flag back to AV_LOG_PRINT_MEMADDRESS * Default behavior: Memory addresses are not printed . softworkz (3): avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESS and hide addresses by default fftools: add mem log flag for printing memory addresses doc/fftools-common-opts: document mem log flag doc/APIchanges | 3 +++ doc/fftools-common-opts.texi | 2 ++ fftools/opt_common.c | 7 +++++++ libavutil/log.c | 6 ++++-- libavutil/log.h | 5 +++++ libavutil/version.h | 2 +- 6 files changed, 22 insertions(+), 3 deletions(-) base-commit: a4c1a5b08409cdfeb8e7f92c7fd443c8ff42e00d Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-59%2Fsoftworkz%2Fsubmit_logaddresses-v11 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-59/softworkz/submit_logaddresses-v11 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/59 Range-diff vs v10: 1: 0ce5bd11d7 ! 1: 0253bb9e68 avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES @@ Metadata Author: softworkz <softworkz@hotmail.com> ## Commit message ## - avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES + avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESS and hide addresses by default - which is controls prefix formatting. With this flag set, the prefix is - printed without the memory address, otherwise it is included. + Memory addresses are no longer printed by default. + With this flag set, memory addresses are included like + in earlier versions. Signed-off-by: softworkz <softworkz@hotmail.com> @@ doc/APIchanges @@ The last version increases of all libraries were on 2025-03-28 -+2025-03-xx - xxxxxxxxxx - lavu 60.2.100 - log.h -+ Add flag AV_LOG_NO_PRINT_MEMADDRESS ++2025-03-xx - xxxxxxxxxx - lavu 60.4.100 - log.h ++ Add flag AV_LOG_PRINT_MEMADDRESS + API changes, most recent first: - 2025-04-07 - 19e9a203b7 - lavu 60.01.100 - dict.h + 2025-05-21 - xxxxxxxxxx - lavu 60.3.100 - avassert.h ## libavutil/log.c ## @@ libavutil/log.c: static void format_line(void *avcl, int level, const char *fmt, va_list vl, if(type) type[0] = type[1] = AV_CLASS_CATEGORY_NA + 16; if (*print_prefix && avc) { -+ const char *p_fmt = flags & AV_LOG_NO_PRINT_MEMADDRESS ? "[%s] " : "[%s @ %p] "; ++ const char *p_fmt = flags & AV_LOG_PRINT_MEMADDRESS ? "[%s @ %p] " : "[%s] "; + if (avc->parent_log_context_offset) { AVClass** parent = *(AVClass ***) (((uint8_t *) avcl) + @@ libavutil/log.h: int av_log_format_line2(void *ptr, int level, const char *fmt, #define AV_LOG_PRINT_DATETIME 8 +/** -+ * Do not print memory addresses of context instances. ++ * Print memory addresses of context instances. + */ -+#define AV_LOG_NO_PRINT_MEMADDRESS 16 ++#define AV_LOG_PRINT_MEMADDRESS 16 + void av_log_set_flags(int arg); int av_log_get_flags(void); @@ libavutil/version.h */ #define LIBAVUTIL_VERSION_MAJOR 60 --#define LIBAVUTIL_VERSION_MINOR 1 -+#define LIBAVUTIL_VERSION_MINOR 2 +-#define LIBAVUTIL_VERSION_MINOR 3 ++#define LIBAVUTIL_VERSION_MINOR 4 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ 2: 207dedbff6 ! 2: fd66ba0b05 fftools: add mem log flag and disable printing addresses by default @@ Metadata Author: softworkz <softworkz@hotmail.com> ## Commit message ## - fftools: add mem log flag and disable printing addresses by default + fftools: add mem log flag for printing memory addresses This commit adds the mem log flag. When specifying this flag at the command line, context prefixes will @@ Commit message Signed-off-by: softworkz <softworkz@hotmail.com> - ## fftools/ffmpeg.c ## -@@ fftools/ffmpeg.c: int main(int argc, char **argv) - - setvbuf(stderr,NULL,_IONBF,0); /* win32 runtime needs this */ - -- av_log_set_flags(AV_LOG_SKIP_REPEATED); -+ av_log_set_flags(AV_LOG_SKIP_REPEATED | AV_LOG_NO_PRINT_MEMADDRESS); - parse_loglevel(argc, argv, options); - - #if CONFIG_AVDEVICE - - ## fftools/ffplay.c ## -@@ fftools/ffplay.c: int main(int argc, char **argv) - - init_dynload(); - -- av_log_set_flags(AV_LOG_SKIP_REPEATED); -+ av_log_set_flags(AV_LOG_SKIP_REPEATED | AV_LOG_NO_PRINT_MEMADDRESS); - parse_loglevel(argc, argv, options); - - /* register all codecs, demux and protocols */ - - ## fftools/ffprobe.c ## -@@ fftools/ffprobe.c: int main(int argc, char **argv) - - init_dynload(); - -- av_log_set_flags(AV_LOG_SKIP_REPEATED); -+ av_log_set_flags(AV_LOG_SKIP_REPEATED | AV_LOG_NO_PRINT_MEMADDRESS); - - options = real_options; - parse_loglevel(argc, argv, options); - ## fftools/opt_common.c ## @@ fftools/opt_common.c: int opt_loglevel(void *optctx, const char *opt, const char *arg) } else { @@ fftools/opt_common.c: int opt_loglevel(void *optctx, const char *opt, const char } + } else if (av_strstart(token, "mem", &arg)) { + if (cmd == '-') { -+ flags |= AV_LOG_NO_PRINT_MEMADDRESS; ++ flags &= ~AV_LOG_PRINT_MEMADDRESS; + } else { -+ flags &= ~AV_LOG_NO_PRINT_MEMADDRESS; ++ flags |= AV_LOG_PRINT_MEMADDRESS; + } } else { break; 3: dc334f3eeb = 3: fd233fb2cf doc/fftools-common-opts: document mem log flag -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".