[vlc-devel] [PATCH 0/8] Add drain support in sout

Thomas Guillem thomas at gllm.fr
Mon Jan 29 18:25:48 CET 2018


Hello,

This set of patches modifies the sout_mux/sout_access/sout behavior by handling
drain when a NULL buffer is sent to pf_write/pf_send callbacks.

The NULL buffer case was already handled by most modules (but nothing was done
in that case). I preferred to copy the decoder_t behavior for consistency.

For now, draining is only implemented with the avformat muxer and the http
sout_access.

The goal is obviously to notify an EOF to the chromecast. Without this set of
patches, the cc won't able to play small files since it will wait for more
data. Moreover, this allows to play a file until the end when using the
chromecast sout.

Regards,

Thomas Guillem (8):
  sout: move code
  sout_mux/core: handle drain
  sout/core: handle drain
  sout_access/core: handle drain
  httpd/core: handle stream drain
  sout_access/http: handle drain
  sout_mux/avformat: handle drain by draining the sout_access
  decoder: drain sout when requested

 include/vlc_sout.h                       | 16 +++++++--
 modules/access_output/dummy.c            |  3 +-
 modules/access_output/http.c             |  7 ++++
 modules/access_output/srt.c              |  2 +-
 modules/demux/avformat/mux.c             | 18 ++++++----
 modules/stream_out/autodel.c             |  6 ++++
 modules/stream_out/bridge.c              | 12 +++++++
 modules/stream_out/chromaprint.c         |  6 ++++
 modules/stream_out/chromecast/cast.cpp   |  7 ++--
 modules/stream_out/cycle.c               |  6 ++++
 modules/stream_out/description.c         |  3 +-
 modules/stream_out/display.c             |  6 ++++
 modules/stream_out/dummy.c               |  3 +-
 modules/stream_out/duplicate.c           | 12 +++++++
 modules/stream_out/gather.c              |  2 +-
 modules/stream_out/mosaic_bridge.c       |  3 +-
 modules/stream_out/record.c              |  7 ++++
 modules/stream_out/smem.c                |  5 +++
 modules/stream_out/transcode/transcode.c | 10 +++---
 src/input/decoder.c                      |  6 ++++
 src/network/httpd.c                      | 17 ++++++++--
 src/stream_output/stream_output.c        | 56 +++++++++++++++++++++-----------
 22 files changed, 171 insertions(+), 42 deletions(-)

-- 
2.11.0



More information about the vlc-devel mailing list