[vlc-devel] [RFC PATCH 0/8] Notify the decoder state

Thomas Guillem thomas at gllm.fr
Thu Apr 21 18:24:30 CEST 2016


This set of patches adds a way to notify the input_thread and libvlc that a
decoder thread encountered an error.

The state enum is called decoder_state. For now, it has only 2 possibles
values: ERROR_OUTPUT and ERROR_GENERIC. I don't know if it's useful to
broadcast a future non-error decoder state, or to differentiate the error that
way.

When the input_thread receive an error from a decoder, it will stop the
corresponding es_out. This will release the output and destroy the decoder. I
think it's a good improvement, you won't have a thread that does nothing in
case of error anymore.

The decoder state is also forwarded to the libvlc with enough informations to
handle it: The faulty module name, the id and category of the track, and the
type of error.

Thomas Guillem (8):
  decoder: don't notify record decoders
  decoder: store the es_id
  input: add INPUT_CONTROL_DECODER_STATE control
  decoder: notify the input_thread in case of error
  input: deactivate the decoder ES track in case of error
  events: remove unused input thread events
  input: broadcast vlc_InputDecoderStateChanged event
  libvlc: add libvlc_MediaPlayerDecoderStateChanged event

 include/vlc/libvlc_events.h       |  9 +++++
 include/vlc/libvlc_media_player.h |  8 ++++
 include/vlc_codec.h               |  7 ++++
 include/vlc_events.h              | 17 ++++-----
 include/vlc_input.h               |  2 +
 lib/event.c                       |  1 +
 lib/libvlc_internal.h             |  1 +
 lib/media.c                       |  1 +
 lib/media_discoverer.c            |  1 +
 lib/media_library.c               |  1 +
 lib/media_list.c                  |  1 +
 lib/media_player.c                | 74 ++++++++++++++++++++++++++++++++++++
 src/input/decoder.c               | 79 ++++++++++++++++++++++++++++++++-------
 src/input/decoder.h               |  2 +-
 src/input/es_out.c                | 10 +++--
 src/input/input.c                 | 34 +++++++++++++++++
 src/input/input_internal.h        | 12 ++++++
 17 files changed, 233 insertions(+), 27 deletions(-)

-- 
2.8.0.rc3



More information about the vlc-devel mailing list