[vlc-devel] [PATCH 1/3] video_output: rework the decision to use the next picture to display
Steve Lhomme
robux4 at ycbcr.xyz
Tue Nov 17 15:17:01 CET 2020
On 2020-11-17 15:04, Francois Cartegnie wrote:
> Le 17/11/2020 à 14:22, Steve Lhomme a écrit :
>> Until now, in normal playback, the way to skip to the next frame to
>> display was
>> * get displayed.current
>> * get displayed.next
>> * if displayed.next has time to render use it to replace
>> displayed.current
>> * the vout thread waits until the deadline to render displayed.current
>>
>> Now we don't use displayed.next anymore. We keep the displayed.current
>> has long
>> as the "time to render" (the deadline to render - current time) is
>> bigger than
>> the time it takes to render (approximately render_delay).
>> If there is not enough time, we try to get the next picture from the
>> decoder+prerender. And we check if there's enough time to render that
>> one.
>> If there is not enough time, we try to get the next picture from the
>> decoder+prerender. And so on...
>
> That's not used for frame by frame ?
displayed.next is used in frame by frame because it may have been set
before. So it uses that first and then gets a next picture at each call.
It sets the value in displayed.next but it doesn't have to because it
will be reset and set in displayed.current anyway.
Once you eliminate the main case where displayed.next it set, we don't
need to use the second one either (patch 2/3).
More information about the vlc-devel
mailing list