> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Hendrik Leppkes > Sent: Freitag, 7. März 2025 18:31 > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] avutil/log: Add callback for > context prefix formatting > > On Fri, Mar 7, 2025 at 6:23 PM Soft Works > <softworkz-at-hotmail....@ffmpeg.org> wrote: > > > > > > > > > -----Original Message----- > > > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > > > Nicolas George > > > Sent: Freitag, 7. März 2025 10:44 > > > To: FFmpeg development discussions and patches <ffmpeg- > de...@ffmpeg.org> > > > Subject: Re: [FFmpeg-devel] [PATCH v3 1/4] avutil/log: Add callback > for > > > context prefix formatting > > > > > > softworkz (HE12025-03-06): > > > > From: softworkz <softwo...@hotmail.com> > > > > > > > > also adds a log flag AV_LOG_PRINT_MEMADDRESSES, which is meant to > > > > control prefix formatting. The actual formatting has to be > performed > > > > by the consuming application which needs to provide a formatting > > > > callback via av_log_set_formatprefix_callback. > > > > > > Still more global state in the libraries.
Hi Hendrik, > > You mean the callback? > > > > Yes. You are also adding a new callback thats used from within a > callback, if someone uses av_log_set_callback then it might just not > get used. Yes, that's true. fftools are sometimes setting it to some "simple" implementation like in cases when printing help information, yet there's no prefix formatting needed - that's why I didn't see it as a problem, but indeed it's kind of going around 2 corners here. > So instead, why not provide a different implementation of the log > callback and use the existing av_log_set_callback function? Then no > library changes are needed at all. I like the idea. I had thought about it for a moment but disregarded it (maybe too) early, being afraid of people criticizing the code duplication involved in doing so. But I'm open to go that way. The option for printing date and time on log lines has just recently been added and not included in any release yet. Maybe that's something that should only be done in the fftools version of the logging callback as well? Thanks for your suggestion, 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-requ...@ffmpeg.org with subject "unsubscribe".