Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES
Date: Wed, 9 Apr 2025 09:56:58 +0000
Message-ID: <DM8P223MB0365B7B5F1B65F78F0858F67BAB42@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB0737717797029E17C0D19BEC8FB42@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Andreas Rheinhardt
> Sent: Mittwoch, 9. April 2025 10:28
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log flag
> AV_LOG_PRINT_MEMADDRESSES
> 
> softworkz .:
> >
> >
> >> -----Original Message-----
> >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >> Andreas Rheinhardt
> >> Sent: Mittwoch, 9. April 2025 10:12
> >> To: ffmpeg-devel@ffmpeg.org
> >> Subject: Re: [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log flag
> >> AV_LOG_PRINT_MEMADDRESSES
> >>
> >> softworkz .:
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >>>> softworkz .
> >>>> Sent: Mittwoch, 9. April 2025 09:51
> >>>> To: FFmpeg development discussions and patches <ffmpeg-
> >> devel@ffmpeg.org>
> >>>> Subject: Re: [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log flag
> >>>> AV_LOG_PRINT_MEMADDRESSES
> >>>>
> >>>>
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> >>>>> Andreas Rheinhardt
> >>>>> Sent: Mittwoch, 9. April 2025 09:28
> >>>>> To: ffmpeg-devel@ffmpeg.org
> >>>>> Subject: Re: [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log
> flag
> >>>>> AV_LOG_PRINT_MEMADDRESSES
> >>>>>
> >>>>> softworkz:
> >>>>>> From: softworkz <softworkz@hotmail.com>
> >>>>>>
> >>>>>> which is controls prefix formatting. With this flag set, the
> prefix
> >>>> is
> >>>>>> printed including the memory address, otherwise it is omitted.
> >>>>>> In libavutil, the flag is set by default, retaining the previous
> >>>>>> behavior. fftools remove the flag as default.
> >>>>>
> >>>>> The implementation of this flag is counter to the usual one: It is
> >>>>> enabled by default, but every av_log_set_flags() that does not set
> >>>>> AV_LOG_PRINT_MEMADDRESSES implicitly disables printing memory
> >>>> addresses.
> >>>>
> >>>> Hi Andreas,
> >>>>
> >>>> thanks for looking at the patchset.
> >>>
> >>> [..]
> >>>
> >>>>> AV_LOG_PRINT_MEMADDRESS seems better given that every av_log()
> will
> >>>>> likely only print one memaddress.
> >>>>
> >>>> It can be more than a single address per log line since it also
> >> prints
> >>>> the parent's memory address in case it specifies
> >>>> parent_log_context_offset.
> >>
> >> I know. That's why my statement contained a "likely".
> >
> > Sorry, of course you know. My bad.
> >
> >
> >>
> https://github.com/ffstaging/FFmpeg/blob/02eda84bf2fcf0db7793872204b0f56
> >>>> 4a6557232/libavutil/log.c#L329-L337
> >>>
> >>> But the reason - from my thinking - why I made it plural is because
> >> it's a global flag that controls whether all memory addresses ( <-
> pl.)
> >> should be printed or not. If it was a flag that is conveyed as part
> of a
> >> log invocation (like av_log), controlling whether the memory address
> >> should be printed for that single log line, then I'd think it should
> be
> >> singular - probably even despite the nit regarding the parent
> address.
> >>>
> >>> Does it make sense? 😊
> >>>
> >>
> >> I get your thinking, but it is not consistent with the other flags:
> >> There is no AV_LOG_PRINT_TIMES after all.
> >
> > Okay, singular it will be!
> >
> >
> >>> Do you think it would make more sense to negate the flag semantic?
> >>
> >> Yes.
> >
> > Fine, let's do it that way round. To be clear, you only mean to negate
> the internal logic of that flag, i.e. making it
> AV_LOG_NO_PRINT_MEMADDRESS internally,
> 
> The flag is public, not internal.

Hi Andreas,

I meant "internal" from the pov of a cli user, but public API of course, yea.


>  but for the fftools CLI, it will still be:
> >
> > ./ffmpeg -v memaddress
> >
> > to enable it, right?
> 
> Given that the default for the fftools is different from the default for
> lavu, it makes sense to handle it differently.

I've just pushed v8, I hope that's how you meant it to be like?

I also realized a flaw in the previous version in a way that the flag got lost when log params are specified multiple times (e.g. ./ffmpeg -v -memaddress -v verbose ...), but that doesn't happen anymore now.


Thanks again,
sw


_______________________________________________
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".

  reply	other threads:[~2025-04-09  9:57 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 15:38 [FFmpeg-devel] [PATCH] avutil/log: Replace addresses in log output with simple ids softworkz
2025-03-05 15:40 ` Nicolas George
2025-03-05 15:45   ` Soft Works
2025-03-05 15:48   ` Soft Works
2025-03-06 10:08     ` Nicolas George
2025-03-06 17:02       ` Soft Works
2025-03-06 17:38         ` Marvin Scholz
2025-03-06 17:44           ` Soft Works
2025-03-06 17:49             ` Marvin Scholz
2025-03-06 18:16               ` Soft Works
2025-03-06 18:58                 ` Marvin Scholz
2025-03-06 19:27                   ` Soft Works
2025-03-06 20:01                     ` Marvin Scholz
2025-03-06 20:48                       ` Soft Works
2025-03-06 20:56       ` Soft Works
2025-03-05 15:42 ` Soft Works
2025-03-05 16:23 ` Gyan Doshi
2025-03-05 16:30   ` Soft Works
2025-03-05 17:14     ` Gyan Doshi
2025-03-05 18:19 ` [FFmpeg-devel] [PATCH v2 0/3] " ffmpegagent
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 1/3] " softworkz
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 2/3] fftools/opt_common: add memaddresses log flag softworkz
2025-03-05 18:19   ` [FFmpeg-devel] [PATCH v2 3/3] doc/fftools-common-opts: document " softworkz
2025-03-06 10:04   ` [FFmpeg-devel] [PATCH v2 0/3] avutil/log: Replace addresses in log output with simple ids Nicolas George
2025-03-06 16:38     ` Soft Works
2025-03-06 16:43       ` Nicolas George
2025-03-06 17:05         ` Soft Works
2025-03-06 17:38           ` Soft Works
2025-03-06 20:59   ` [FFmpeg-devel] [PATCH v3 0/4] " ffmpegagent
2025-03-06 20:59     ` [FFmpeg-devel] [PATCH v3 1/4] avutil/log: Add callback for context prefix formatting softworkz
2025-03-07  9:44       ` Nicolas George
2025-03-07 17:23         ` Soft Works
2025-03-07 17:30           ` Hendrik Leppkes
2025-03-07 18:02             ` Soft Works
2025-03-06 20:59     ` [FFmpeg-devel] [PATCH v3 2/4] fftools/opt_common: add memaddresses log flag softworkz
2025-03-06 20:59     ` [FFmpeg-devel] [PATCH v3 3/4] fftools: Provide a log formatting callback for context prefixes softworkz
2025-03-06 20:59     ` [FFmpeg-devel] [PATCH v3 4/4] doc/fftools-common-opts: document memaddresses log flag softworkz
2025-03-08 23:02     ` [FFmpeg-devel] [PATCH v4 0/4] avutil/log: Replace addresses in log output with simple ids ffmpegagent
2025-03-08 23:02       ` [FFmpeg-devel] [PATCH v4 1/4] avutil/log: Add AV_LOG_PRINT_MEMADDRESSES logging flag softworkz
2025-03-08 23:02       ` [FFmpeg-devel] [PATCH v4 2/4] fftools/opt_common: add memaddresses log flag softworkz
2025-03-08 23:02       ` [FFmpeg-devel] [PATCH v4 3/4] fftools: Provide a an fftools-specific logging callback function softworkz
2025-03-09 17:52         ` Michael Niedermayer
2025-03-09 18:59           ` Soft Works
2025-03-08 23:02       ` [FFmpeg-devel] [PATCH v4 4/4] doc/fftools-common-opts: document memaddresses log flag softworkz
2025-03-09 19:01       ` [FFmpeg-devel] [PATCH v5 0/5] avutil/log: Replace addresses in log output with simple ids ffmpegagent
2025-03-09 19:01         ` [FFmpeg-devel] [PATCH v5 1/5] avutil/log: Add AV_LOG_PRINT_MEMADDRESSES logging flag softworkz
2025-03-09 19:05           ` Nicolas George
2025-03-09 19:11             ` Soft Works
2025-03-09 19:01         ` [FFmpeg-devel] [PATCH v5 2/5] fftools/opt_common: add memaddresses log flag softworkz
2025-03-09 19:01         ` [FFmpeg-devel] [PATCH v5 3/5] fftools: Provide a an fftools-specific logging callback function softworkz
2025-03-09 19:01         ` [FFmpeg-devel] [PATCH v5 4/5] doc/fftools-common-opts: document memaddresses log flag softworkz
2025-03-09 19:01         ` [FFmpeg-devel] [PATCH v5 5/5] Remove commented lines softworkz
2025-03-13  9:30         ` [FFmpeg-devel] [PATCH v6 0/3] avutil/log: Replace addresses in log output with simple ids ffmpegagent
2025-03-13  9:30           ` [FFmpeg-devel] [PATCH v6 1/3] fftools: Add a local logging callback function softworkz
2025-03-13  9:30           ` [FFmpeg-devel] [PATCH v6 2/3] fftools/opt_common: add memaddresses log flag softworkz
2025-03-13  9:30           ` [FFmpeg-devel] [PATCH v6 3/3] doc/fftools-common-opts: document " softworkz
2025-04-09  5:54           ` [FFmpeg-devel] [PATCH v7 0/3] avutil/log: Add log flag to control printing of memory addresses ffmpegagent
2025-04-09  5:55             ` [FFmpeg-devel] [PATCH v7 1/3] avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES softworkz
2025-04-09  7:27               ` Andreas Rheinhardt
2025-04-09  7:50                 ` softworkz .
2025-04-09  8:02                   ` softworkz .
2025-04-09  8:11                     ` Andreas Rheinhardt
2025-04-09  8:24                       ` softworkz .
2025-04-09  8:27                         ` Andreas Rheinhardt
2025-04-09  9:56                           ` softworkz . [this message]
2025-04-09  8:15                   ` Andreas Rheinhardt
2025-04-09  5:55             ` [FFmpeg-devel] [PATCH v7 2/3] fftools/opt_common: add memaddresses log flag softworkz
2025-04-09  5:55             ` [FFmpeg-devel] [PATCH v7 3/3] doc/fftools-common-opts: document " softworkz
2025-04-09  9:25             ` [FFmpeg-devel] [PATCH v8 0/3] avutil/log: Add log flag to control printing of memory addresses ffmpegagent
2025-04-09  9:25               ` [FFmpeg-devel] [PATCH v8 1/3] avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES softworkz
2025-04-09  9:25               ` [FFmpeg-devel] [PATCH v8 2/3] fftools: add memaddress log flag and disable printing addresses by default softworkz
2025-04-09 14:28                 ` Gyan Doshi
2025-04-09 14:41                   ` softworkz .
2025-04-09  9:25               ` [FFmpeg-devel] [PATCH v8 3/3] doc/fftools-common-opts: document memaddress log flag softworkz
2025-04-09 18:19               ` [FFmpeg-devel] [PATCH v9 0/3] avutil/log: Add log flag to control printing of memory addresses ffmpegagent
2025-04-09 18:19                 ` [FFmpeg-devel] [PATCH v9 1/3] avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES softworkz
2025-04-09 18:19                 ` [FFmpeg-devel] [PATCH v9 2/3] fftools: add mem log flag and disable printing addresses by default softworkz
2025-04-09 18:26                   ` Gyan Doshi
2025-04-09 18:40                     ` softworkz .
2025-04-09 18:19                 ` [FFmpeg-devel] [PATCH v9 3/3] doc/fftools-common-opts: document mem log flag softworkz
2025-04-10  0:38                 ` [FFmpeg-devel] [PATCH v10 0/3] avutil/log: Add log flag to control printing of memory addresses ffmpegagent
2025-04-10  0:38                   ` [FFmpeg-devel] [PATCH v10 1/3] avutil/log: Add log flag AV_LOG_PRINT_MEMADDRESSES softworkz
2025-04-10  7:38                     ` Andreas Rheinhardt
2025-04-10 18:06                       ` softworkz .
2025-04-10  0:38                   ` [FFmpeg-devel] [PATCH v10 2/3] fftools: add mem log flag and disable printing addresses by default softworkz
2025-04-10  6:51                     ` Nicolas George
2025-04-10 18:02                       ` softworkz .
2025-04-16 13:43                       ` Michael Niedermayer
2025-04-16 13:50                         ` Nicolas George
2025-04-16 14:25                           ` Gyan Doshi
2025-04-16 14:26                         ` softworkz .
2025-04-10  0:38                   ` [FFmpeg-devel] [PATCH v10 3/3] doc/fftools-common-opts: document mem log flag softworkz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM8P223MB0365B7B5F1B65F78F0858F67BAB42@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM \
    --to=softworkz-at-hotmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git