> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of
> Michael Niedermayer
> Sent: Mittwoch, 16. April 2025 15:43
> To: FFmpeg development discussions and patches <ffmpeg-
> de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH v10 2/3] fftools: add mem log flag
> and disable printing addresses by default
>
> Hi
>
> On Thu, Apr 10, 2025 at 08:51:04AM +0200, Nicolas George wrote:
> > softworkz (HE12025-04-10):
> > > From: softworkz <softwo...@hotmail.com>
> > >
> > > This commit adds the mem log flag.
> > > When specifying this flag at the command line, context prefixes
> will
> > > be printed with memory addresses like in earlier ffmpeg versions.
> > >
> > > Example with mem flag:
> > >
> > > [hevc @ 0000018e72a89cc0] .....
> >
> > As explained recently, strong opposition to this being the default.
>
> just some random comments:
>
> I think some way to distingish two different "hevc" instances
> with high probability should remain.
>
> About the addresses. Iam curious how frequently do people use them ?
> and for what exactly ?
>
> I do think *item_name() should be used more often. The "hevc" is a
> quite bland identifcation of the instance.
>
> in absence of a item_name(), that is *av_default_item_name()
> which prints just the class name. I think printing the address by
> default
> is reasonable otherwsie instances would be always indistingishable
>
> beyond that, i dont remember using the addresses and would not
> mind if it gets replaced by something more usefull more repeatable
> with maybe some mem flag that could force them to be printed in all
> cases
>
> but i dont know, really depends on what the community prefers
Thanks Michael,
I'm gonna keep myself out of arguing, I believe that this is a decision
that should be based on what the community (majority) will prefer.
I just want to summarize the different implementations that are available
already while the patchset has walked its way through the various comments
that were made.
-----------------------------------------
1. Implementation in avutil with replacement Ids
The replacement Ids are a direct projection of the mem addresses, which
means that they are equally evident - yet subject to the same limitations
as the mem-addresses.
But other than the mem-addresses, this creates the identical log output
when repeating the same command.
Reviews:
- It has been criticized that this introduces global state which is
undesired in case of library use
- It has been suggested to implement this in fftools only, in a way that
fftools has its own and independent logging implementation, no longer
using the one in avutil. It was also based on the idea that this would
allow to do other things in the future which cannot reasonably be
implemented in avutil
This has led to the second variant:
-----------------------------------------
2. Implementation in fftools with replacement Ids
Replacement Id behavior is the same as in (1).
Obviously, there's no point in writing this from scratch, so the starting
point was the logging code from avutil
Reviews:
- This has raised criticism due to the copied logging code
- It was suggested to drop the replacement Ids and then it could be
implemented in avutil only
This has led to the third version:
-----------------------------------------
3. Implementation back in avutil without Ids
Means you switch the mem addresses on or off, when off, no Ids are printed
-----------------------------------------
Best regards,
softworkz
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".