[vlc-commits] input core: add status field per elementary stream

Jean-Paul Saman git at videolan.org
Sat Feb 15 22:45:48 CET 2014


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Sat Feb 15 15:02:42 2014 +0100| [d8199d8cbe0e4e3f4920580c4735364a4664fc7e] | committer: Jean-Paul Saman

input core: add status field per elementary stream

VLC has status reporting on the input state, but not on the output state.
This makes it impossible to know if playback actually started completely from
checking stream status states.

For instance a failed audio output cannot be determined programatically. This
patch adds an extra field per ES (in src/input/es_out.c) to determine the state
of that ES (DISABLE, ENABLED, ERROR).

If CreateDecoder() cannot instantiate an output, then it set p_dec->b_error = true.
This is used to determine what the return value for es_out_GetEsState() should be.
If p_dec->b_error is true, then it returns an ES_OUT_STATE_ES_ERROR to the caller.
Else it returns ES_OUT_STATE_ES_ENABLED or ES_OUT_STATE_ES_DISABLED.

A function 'es_out_GetEsState()' is available to query an input for the state of
the primary audio, video and SPU elementary streams.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d8199d8cbe0e4e3f4920580c4735364a4664fc7e
---

 include/vlc_codec.h             |    3 ++-
 include/vlc_es_out.h            |    4 +++-
 include/vlc_input.h             |   22 ++++++++++++++++++++++
 modules/codec/a52.c             |    2 +-
 modules/codec/avcodec/video.c   |    2 +-
 modules/codec/dts.c             |    2 +-
 modules/codec/mpeg_audio.c      |    2 +-
 modules/codec/quicktime.c       |    4 ++--
 modules/packetizer/mpeg4audio.c |    2 +-
 src/input/control.c             |   20 +++++++++++++++++++-
 src/input/decoder.c             |   16 +++++++++-------
 src/input/es_out.c              |   34 +++++++++++++++++++++++++++++++---
 src/input/es_out.h              |    2 ++
 src/input/es_out_timeshift.c    |    4 +++-
 14 files changed, 98 insertions(+), 21 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=d8199d8cbe0e4e3f4920580c4735364a4664fc7e


More information about the vlc-commits mailing list