[vlc-devel] [PATCH v3 0/8] get rid of displayed.next in video output

Steve Lhomme robux4 at ycbcr.xyz
Wed Nov 18 13:13:42 CET 2020


On 2020-11-18 12:56, Steve Lhomme wrote:
> This patchset removes the need for displayed.next by polling for a more up to
> date picture to render when the current is too late.
> 
> Changes since v2
> - do not loop to get the next picture. ThreadDisplayPreparePicture already
>    contains a loop that will drop pictures too late to be displayed

It doesn't drop with the same constraints:
* Before it would use the next picture if there was not enough time left 
to render the current, even for the nth picture.
* In this single loop it drops only if it will be late by half a frame 
and no matter how long it takes to render, which is more permissive in 
the general case. It may end up always rendering frames half a frame too 
late. This is the case in current master as well.

But it handles the decoder reuse, the late drop option and the pause (no 
drop/looping). The rendering time may be added to the dropping mechanism 
of ThreadDisplayPreparePicture() instead of relying on the frame rate.

> - explain impact of changes on date_refresh (possibly fixing a timing issue)
> - use vlc_tick_now() to compute the render deadline of the "next" picture
>    rather than system_now
> - use more similar code and reindent so patches are more readable
> - move the first picture handling, the frame-by-frame mode already does the same
>    and shouldn't get another picture once it has the first picture
> - set the deadline directly instead of a temporary variable and only for non
>    frame-by-frame mode
> 
> Changes since v1
> - add a patch before to fix potential double displayed.current release
> - the frame by frame patch is reusing a older patches that returns an error
>    if a new picture is not found. So picture.current should not be released in
>    that case.
> - the first picture can be dropped if a more up to date picture is available
>    it will still be forced displayed as it's the first one.
> - mention the is_late_dropped support in the commit log*** BLURB HERE ***
> 
> Steve Lhomme (8):
>    video_output: avoid potential double release of displayed.current
>    video_output: rework the decision to use the next picture to display
>    video_output: reindent
>    video_output: keep the displayed.current in frame by frame if next is
>      not ready
>    video_output: remove always NULL displayed.next
>    video_output: move the first picture reading in frame by frame/regular
>      code
>    video_output: only set the deadline in non frame-by-frame mode
>    video_output: set the deadline as we go
> 
>   src/video_output/video_output.c | 97 +++++++++++++++------------------
>   1 file changed, 44 insertions(+), 53 deletions(-)
> 
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list