[MPlayer-dev-eng] [PATCH] stream dump: print progress information

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri May 13 09:31:48 CEST 2011



On 13 May 2011, at 08:31, Nicolas George <nicolas.george at normalesup.org> wrote:

> Le quartidi 24 floréal, an CCXIX, Reimar Döffinger a écrit :
>> First, the _ts variables seem pointless/unused?
> 
> They are used to avoid flooding the console by only refreshing once per
> second. Numerous messages on the console can really slow things down if
> mplayer is started, for example, through a slow SSH connection.
> 
> Additionally, they can be used to compute an ETA.
> 
>> Also, I'd be in favour of using int64_t and appropriate format strings
>> instead of off_t and casts.
> 
> Will do.
> 
>> Lastly, your size is not quite right I think, it should be start_pos -
>> end_pos (using -sb might help to show it, not sure if it currently works).
> 
> I'll try to look into it.
> 
> Do you have any preference regarding which version of the patch?

Using stream pos is a good idea, though the percent value will quite often be inf.
If it doesn't get too confusing you could use stream pos to print the number of bytes read.
Or possibly write exactly one of percent or number of bytes read depending on whether end_pos is available.


More information about the MPlayer-dev-eng mailing list