mpv/filters
wm4 c5eb2f2ac4 f_decoder_wrapper: make decoder thread responsive while filling queue
The mp_filter_run() invocation blocks as long as the demuxer provides
packets and the queue can be filled. That means it may block quite a
long time of the decoder queue size is large (since we use libavcodec in
a blocking manner; it regrettably does not have an async. API).

This made the main thread freeze in certain situations, because it has
to wait on the decoder thread.

Other than I suspected (I wrote that code, but that doesn't mean I know
how the hell it works), this did not freeze during seeking: seek resets
flushed the queue, which also prevented the decoder thread from adding
more frames to it, thus stopping decoding and responding to the main
thread in time. But it does fix the issue that exiting the player waited
for the decoder to finish filling the queue when stopping playback.
(This happened because it called mp_decoder_wrapper_set_play_dir()
before any resets. Related to the somewhat messy way play_dir is
generally set. But it affects all "synchronous" decoder wrapper API
calls.)

This uses pretty weird mechanisms in filter.h and dispatch.h. The
resulting durr hurr interactions are probably hard to follow, and this
whole thing is a sin. On the other hand, this is a _very_ user visible
issue, and I'm happy that it can be fixed in such an unintrusive way.
2020-03-05 22:00:50 +01:00
..
f_async_queue.c filter: add async queue filter 2020-02-29 21:52:00 +01:00
f_async_queue.h filter: add async queue filter 2020-02-29 21:52:00 +01:00
f_auto_filters.c f_auto_filters: always fall back to hw-download+yadif if no hw deint filter 2020-02-16 15:28:57 +01:00
f_auto_filters.h
f_autoconvert.c f_autoconvert: remove subfmt conversion BS 2020-01-17 15:19:05 +01:00
f_autoconvert.h f_autoconvert: remove subfmt conversion BS 2020-01-17 15:19:05 +01:00
f_decoder_wrapper.c f_decoder_wrapper: make decoder thread responsive while filling queue 2020-03-05 22:00:50 +01:00
f_decoder_wrapper.h f_decoder_wrapper: replace most public fields with setters/getters 2020-02-29 01:23:20 +01:00
f_demux_in.c
f_demux_in.h
f_hwtransfer.c f_hwtransfer: extend vaapi whitelist with some working formats 2020-01-17 15:13:23 +01:00
f_hwtransfer.h f_hwtransfer: move format fields to private struct 2020-01-12 01:47:42 +01:00
f_lavfi.c f_lavfi: don't propagate filter failure if creation fails 2020-02-16 16:21:03 +01:00
f_lavfi.h options: pre-check filter names when using vf/af libavfilter bridge 2019-11-25 20:29:42 +01:00
f_output_chain.c f_autoconvert: remove subfmt conversion BS 2020-01-17 15:19:05 +01:00
f_output_chain.h
f_swresample.c Remove remains of Libav compatibility 2020-02-16 15:14:55 +01:00
f_swresample.h
f_swscale.c video: mess with the filte chain to enable zimg IMGFMT_RGB30 output 2019-11-02 17:50:32 +01:00
f_swscale.h video: mess with the filte chain to enable zimg IMGFMT_RGB30 output 2019-11-02 17:50:32 +01:00
f_utils.c filters: add another dumb helper 2019-10-02 21:09:30 +02:00
f_utils.h filters: add another dumb helper 2019-10-02 21:09:30 +02:00
filter.c filter: add functions to suspend filtering temporarily 2020-03-05 22:00:50 +01:00
filter.h filter: add functions to suspend filtering temporarily 2020-03-05 22:00:50 +01:00
filter_internal.h
frame.c Implement backwards playback 2019-09-19 20:37:04 +02:00
frame.h Implement backwards playback 2019-09-19 20:37:04 +02:00
user_filters.c build: downgrade EGL requirement from 1.5 to 1.4 2019-12-16 00:37:18 +01:00
user_filters.h vf_gpu: add video filter using vo_gpu's renderer 2019-11-29 20:37:11 +01:00