[vlc-devel] [PATCH 17/17] video_output: restart display after filter change

Rémi Denis-Courmont remi at remlab.net
Tue Nov 24 16:37:38 CET 2020


Le lundi 23 novembre 2020, 14:21:29 EET Steve Lhomme a écrit :
> On 2020-11-22 10:22, Rémi Denis-Courmont wrote:
> > Le perjantaina 20. marraskuuta 2020, 16.45.07 EET Steve Lhomme a écrit :
> >> This is done in the vout thread loop, immediately after the filter output
> >> change is detected, before processing pictures coming out of the filters.
> >> The filters are untouched (not flushed).
> >> 
> >> The new display module is created with the format coming out of the last
> >> filter.
> > 
> > As you have pointed out yourself, this causes glitches if the windowing
> > system is not capable of retaining the window content while restarting
> > the display. AFAICT; without this patch, it works just fine: the
> > conversion filter chain is adjusted and the display has nothing to worry
> > about.
> 
> It doesn't work *just fine*, an extra filter is added to match the
> original display format.

Itss removing the old conversion and adding a new conversion. That's working 
fine and as intended.

> You said yourself that the display should be restarted when the source
> changes and now you're against it because it causes glitches ?

I wrote that, if it is somehow necessary to change the video format of a 
display in a way that is not currently permitted by the change controls, the 
display should be restarted, e.g. the "chroma" or pixel format.

Still you should avoid getting into a situation where the display needs to be 
restarted at all.

In particular, I don't challenge that it might cause glitches within the 
window. Those glitches are more tolerable than window glitches which 
potentially steal the focus, move the window some place else, etc.

> > Of course, that assumes the display is sensibly implemented when it comes
> > to picking its input format. In particular a CPU display should always
> > request CPU formats and a GPU display GPU formats - memory transfer is
> > best handled by conversion filters.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list