[FFmpeg-devel] [PATCH] ffplay show status and refresh

Benoit Fouet benoit.fouet
Thu Jul 30 10:59:29 CEST 2009


On 2009-07-30 10:53, Baptiste Coudurier wrote:
> On 07/30/2009 01:49 AM, Benoit Fouet wrote:
>> On 2009-07-30 10:20, Baptiste Coudurier wrote:
>>> On 07/30/2009 12:06 AM, Michael Niedermayer wrote:
>>>> On Wed, Jul 29, 2009 at 10:02:44PM -0700, Baptiste Coudurier wrote:
>>>>> Hi guys,
>>>>>
>>>>> Always show status and increase refresh time "a la" mplayer, it looks
>>>>> nice
>>>>> this way :>
>>>>>
>>>>> Don't remove the option, it could break users using it :)
>>>>>
>>
>>>>>    ffplay.c |    4 ++--
>>>>>    1 file changed, 2 insertions(+), 2 deletions(-)
>>>>> b932c51e74b18f91f418336478d23d1e9fc62a4d  ffplay_status.patch
>>>>> Index: ffplay.c
>>>>> ===================================================================
>>>>> --- ffplay.c    (revision 19507)
>>>>> +++ ffplay.c    (working copy)
>>>>> @@ -195,7 +195,7 @@
>>>>>    static int wanted_subtitle_stream= -1;
>>>>>    static int seek_by_bytes;
>>>>>    static int display_disable;
>>>>> -static int show_status;
>>>>> +static int show_status = 1;
>>>>>    static int av_sync_type = AV_SYNC_AUDIO_MASTER;
>>>>>    static int64_t start_time = AV_NOPTS_VALUE;
>>>>>    static int debug = 0;
>>>>> @@ -1138,7 +1138,7 @@
>>>>>            double av_diff;
>>>>>
>>>>>            cur_time = av_gettime();
>>>>> -        if (!last_time || (cur_time - last_time)>= 500 * 1000) {
>>>>> +        if (!last_time || (cur_time - last_time)>= 1000) {
>>>> i think displaying this 1000 times per second is too much though 2
>>>> times is too little
>>>> except that iam ok with the patch
>>> Ok, 30000 seems nice, are you ok with it ?
>>> Maybe people want it disabled ? I changed option to OPT_INT | HAS_ARG,
>>> is it ok ? It changes cli though :/
>>>
>>
>> if you change the cli, why not having a nostats (or something alike)
>> option ?
>> havin a '-stats 0' looks weird to me.
>> (well, I must admit that havin an 'if (!nostats)' will look weird too
>> :) )
>>
> 
> Well that's the price to pay for using OPT_BOOL :(

yep

> Besides, to avoid the !nostats we can add opt_nostats which set
> show_status to 0.
> 

was thinking about that too, and that would certainly be nice to have,
and simple enough to have a chance to be accepted by Michael ;)



More information about the ffmpeg-devel mailing list