]> git.sesse.net Git - vlc/commit
input core: add status field per elementary stream
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Sat, 15 Feb 2014 14:02:42 +0000 (15:02 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Sat, 15 Feb 2014 21:45:25 +0000 (22:45 +0100)
commitd8199d8cbe0e4e3f4920580c4735364a4664fc7e
treef5d8df3eb803c037df673bf6c827236d6bae94b2
parent2bc56d7de86df3db77554ad1ff0016a86941b93b
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.
14 files changed:
include/vlc_codec.h
include/vlc_es_out.h
include/vlc_input.h
modules/codec/a52.c
modules/codec/avcodec/video.c
modules/codec/dts.c
modules/codec/mpeg_audio.c
modules/codec/quicktime.c
modules/packetizer/mpeg4audio.c
src/input/control.c
src/input/decoder.c
src/input/es_out.c
src/input/es_out.h
src/input/es_out_timeshift.c