[vlc-devel] [PATCH 12/14] filter_chain: add a default implementation for the video_allocator
Rémi Denis-Courmont
remi at remlab.net
Mon Jul 29 21:18:16 CEST 2019
Le maanantaina 29. heinäkuuta 2019, 22.08.58 EEST Alexandre Janniaux a écrit :
> While I agree that we probably don't need flow control and that image number
> is probably dominated, the starvation issue seems a real issue to tackle.
> What are the solution against starvation on Windows ? Should we just fail
> if we got starved ?
In general, it is the halting problemm which is to say that the general case
cannot be solved and assumptions have to be made.
If we need to make assumptions, we might just as well assume that filters are
well-behaved, as indeed they have so far been. Ideally, a filter that needs to
allocate surfaces (rather than modify input surface in-place) should allocate
a suitably large pool for itself. And that turns out incompatible with
filter_NewPicture().
Since the filter chain is (partially) dynamic, we cannot even rely on filters
telling how many "extra" surfaces they need - the total value could change in
the middle of the stream. Instead, the filter ought to allocate its surfaces
during initialization, and potentially refuse to start if it cannot succeed -
but not break the whole pipeline.
--
レミ・デニ-クールモン
http://www.remlab.net/
More information about the vlc-devel
mailing list