This commit drastically improves the buffering speed when casting to a CC
receiver. Indeed, some CC receivers need a 1minute buffer. Since the input
thread was previously paced, you could wait 59.7 sec (1min - file-caching
value) to get the playback started.
To fix this issue, the CC sout can now control the pacing
(ACCESS_OUT_CONTROLS_PACE = true). The input thread, via the cc demux-filter,
is now paced by the CC sout. The input-thread is paced in order to avoid
unresponsive controls. Indeed, we want to prevent the case when the input
thread is waiting for the sout that is waiting for the http buffer to be
emptied (via the fifo wait from input_DecoderDecode()).
Now that the CC can buffer 1 minute of data before failing, the transcode
fallback also needed to be reworked. It's now handled by the demux-filter that
will seek back (if possible) to the last position before doing the fallback.
The same goes when disabling the CC filter or when changing es tracks.
This commit also improves the CC time report by comparing the system clock with
the CC one.
This commit also reworks seeking. We need to flush the sout (and the muxer) and
request a new input. The previous method, using the seek command could not work
well with live streaming.
Don't seek from demux filter but from the the sout. Do it only one time for
every stream ids. Pause the httpd server while seeking in order to prevent the
CC to flush valid post flush buffers.
Pace demux only when the httpd fifo starts to be full.
Replace seek/app_start wait methods by pace() that is interruptible. This fixes
possible deadlock in case of connectivity issue.
This new submodule wait for all tracks to be added into the last stream out
(the http one) before running a chromecast session.
This fixes chromecast timeout errors when the session was started during the
middle of a playback and when the http sout was still empty (because no video
IFrames were available for example).
This also fixes the "You can try increasing sout-mux-caching value" error (when
the timeout came from VLC and not the CC).