Skip to content

input: decoder: remove decoder thread in sout scenarios

Alaric Senat requested to merge asenat/vlc:input-dec-sout-sync into master

Currently, a decoder thread is spawned to handle both the display and the stream output. The decoder thread is actually unneeded by the stream output as packetizing is the only task to do before forwarding the data to the stream output. No heavy decoding is involved.

In addition to make the runtime lighter for stream output, having the sout handling synchronous would help a lot for the implementation of PCR forwarding in stream output (see !1394 (merged)) as the asynchronous SetPCR handling could be then managed in transcode only.

This patch removes the decoder thread usage in stream output scenarios directly in the vlc_input_decoder. While this is far from ideal and looks hacky, it's the best way I found to not change the code base too much and not introduce unseen regressions right before 4.0 release.

These changes can be considered temporary as the plan in the long run (after 4.0) is to remove stream output mention from vlc_input_decoder and create a stream output specific es_out implementation.

Refs #26870 #26825 (closed)

Edited by Alaric Senat

Merge request reports

Loading