[vlc-devel] [PATCH 1/2] input: add DEMUX_SET_ES notification
Rémi Denis-Courmont
remi at remlab.net
Wed Dec 4 10:53:14 CET 2013
On Tue, 3 Dec 2013 19:05:20 +0100, Francois Cartegnie <fcvlcdev at free.fr>
wrote:
> ---
> include/vlc_demux.h | 3 ++-
> src/input/input.c | 3 +++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/include/vlc_demux.h b/include/vlc_demux.h
> index 6cfca6b..0dcee0d 100644
> --- a/include/vlc_demux.h
> +++ b/include/vlc_demux.h
> @@ -115,11 +115,12 @@ enum demux_query_e
> DEMUX_SET_TITLE, /* arg1= int can fail */
> DEMUX_SET_SEEKPOINT, /* arg1= int can fail */
>
> - /* DEMUX_SET_GROUP only a hint for demuxer (mainly DVB) to allow
not
> + /* DEMUX_SET_GROUP/SET_ES only a hint for demuxer (mainly DVB) to
> allow not
> * reading everything (you should not use this to call
es_out_Control)
> * if you don't know what to do with it, just IGNORE it, it is
safe(r)
> * -1 means all group, 0 default group (first es added) */
> DEMUX_SET_GROUP, /* arg1= int, arg2=const vlc_list_t *
> can fail */
> + DEMUX_SET_ES, /* arg1= int
> can fail */
Is this any different from ES_OUT_GET_ES_STATE, aside from being a
callback to the demuxer? If so, I would agree that a callback is better but
ES_OUT_GET_ES_STATE should perhaps be *removed*...
And the documentation is rather unclear about what the "int" value is.
>
> /* Ask the demux to demux until the given date at the next pf_demux
> call
> * but not more (and not less, at the precision available of
course).
> diff --git a/src/input/input.c b/src/input/input.c
> index e39c1a4..874e5cf 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -1855,6 +1855,9 @@ static bool Control( input_thread_t *p_input,
> /* No need to force update, es_out does it if needed */
> es_out_Control( p_input->p->p_es_out_display,
> ES_OUT_SET_ES_BY_ID, (int)val.i_int );
> +
> + demux_Control( p_input->p->input.p_demux, DEMUX_SET_ES,
> (int)val.i_int,
> + true );
I don't remember if all demuxers deal with unknown controls very well. It
might be worth checking that this won't spam the logs with unsupported
control error messages.
> break;
>
> case INPUT_CONTROL_RESTART_ES:
--
Rémi Denis-Courmont
Sent from my collocated server
More information about the vlc-devel
mailing list