[FFmpeg-devel] [PATCH] av_log repeating
Michael Niedermayer
michaelni
Tue Sep 14 12:18:06 CEST 2010
On Tue, Sep 14, 2010 at 08:11:50AM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> > On Tue, Sep 14, 2010 at 01:30:06AM +0100, M?ns Rullg?rd wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >>
> >> > On Mon, Sep 13, 2010 at 11:46:15PM +0100, M?ns Rullg?rd wrote:
> >> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >> >>
> >> >> > On Mon, Sep 13, 2010 at 11:13:36PM +0100, M?ns Rullg?rd wrote:
> >> >> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >> >> >>
> >> >> >> > Hi
> >> >> >> >
> >> >> >> > patch below disabled the (hated by some) repeating in av_log() and adds an
> >> >> >> > option for apps to turn it on again
> >> >> >> >
> >> >> >> > comments?
> >> >> >> >
> >> >> >> > (yes ill bump vers & add appchanges entry if people agree to this)
> >> >> >> >
> >> >> >> > alternatively we can also completely drop the repeat code ...
> >> >> >>
> >> >> >> It was fine before your last change. Now it spews just as many
> >> >> >> messages as without repeat detection. It makes log files horrible to
> >> >> >> read if there are many repeated messages.
> >> >> >>
> >> >> >> Printing the increasing counter with \r might be acceptable on a
> >> >> >> terminal (although it makes the next non-repeated message unreadable
> >> >> >> if it is shorter), but not otherwise.
> >> >> >
> >> >> > we need a solution not complaints
> >> >> >
> >> >> > btw, isnt there something on posix that can clean these \r in a terminal
> >> >> > simulating manner out of a file ?
> >> >>
> >> >> Of course something can be done with awk or sed, but that's not the
> >> >> point.
> >> >
> >> > i didnt really mean it as solution for this otherwise i wouldnt have posted
> >> > that patch, i was more curious if there was a easy way to flatten all the
> >> > codes into a nice ascii/utf8 file. ffmpeg isnt the only thing from where
> >> > one can end up with things that need that ...
> >>
> >> tr '\r' '\n' might do what you want in some cases.
> >>
> >> >> The proper solution is to not print the repeated messages in the first
> >> >> place. We already check for a terminal to enable the colouring of log
> >> >> output. Do the same thing if you insist on printing those lines.
> >> >
> >> > ok and done
> >>
> >> No, not done.
> >
> > i prefer it as it is now and it fixes the issue that you reported.
>
> No it doesn't. The issue I reported would have been fixed by
> reverting r24573. I even asked you to do that, as did several others.
as ive said on cvslog, the revission before was buggy
1. ffmpeg | grep X | wc
didnt work
2. the last repeated message was missing thus leaving you to guess if one
or all frames printed it in absence of other messages in between
>
> > its also nicer for things like
> > ffmpeg | grep X | wc
> > the repeat interfers with such things
>
> So make it do that with -v 2 or something. I like the repeat
> suppression,
The problem is that its not compatible with our API
we would need to require the user to call a av_log_flush() at the end
also theres still the issue that the whole does not mix well with printf()
thus we need a way to disable it, which is what my original patch did.
> but I DO NOT want the "repeated X times" message only
> once, otherwise it is utterly pointless.
you always say something different and your offensive attitude is very
tireing
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100914/2f4e86a7/attachment.pgp>
More information about the ffmpeg-devel
mailing list