[vlc-devel] [vlc-commits] skins2: ensure playlist gets stopped before terminating vlc.
remi at remlab.net
Mon Dec 2 18:05:15 CET 2019
Le maanantaina 2. joulukuuta 2019, 14.11.28 EET erwan.tulou at gmail.com a écrit
> On 02/12/2019 09:20, Alexandre Janniaux wrote:
> > Hi,
> > Actually stopping the playlist wont kill the video output
> > module, only killing the input resource, meaning releasing
> > the vlc_player will do.
> > However, player and playlist might be used by multiple
> > control interface and this problem is only a concern for
> > the one providing the vout_window. Hence I believe it must
> > be solved by the mechanism providing the window instead of
> > relying on a much wider API like playlist and player.
> I fully agree with that. And actually, the work is already partially
> done. A 'vout_window_ReportClose' is available to let the vout know that
> the windows ids won't be available any more.
No. That ReportClose does *not* mean that the window ID is no longer valid.
Even back when the earlier incarnation of that callback (in the old vout core)
"worked", all it did was request an asynchronous stop of the playlist.
It just means that the window system has advised that the window should be
closed - normally because the user clicked on the window close button. The
window ID must remain valid until the window is actually released by the core.
Otherwise, you *will* introduce intractable races for the consumer of the
window and, e.g., deadlock or crash OpenGL.
The GUI can and should call ReportClose when the interface is being closed by
the user. But it *cannot* destroy the window immediately, nor can it wait for
it to be released, which would cause a dead lock (been there done that).
More information about the vlc-devel