[vlc-commits] input: add controls to cycle through ES tracks
Thomas Guillem
git at videolan.org
Thu Nov 15 16:23:24 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 14 17:47:07 2018 +0100| [7ba3dd8c43babcf2ee8809c3aa0dba644f723cb9] | committer: Thomas Guillem
input: add controls to cycle through ES tracks
cf. previous commit. This will be used by vlc_player_t.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ba3dd8c43babcf2ee8809c3aa0dba644f723cb9
---
src/input/input.c | 12 ++++++++++++
src/input/input_internal.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/src/input/input.c b/src/input/input.c
index 3f173a9b36..5c5830e9ab 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2102,6 +2102,18 @@ static bool Control( input_thread_t *p_input,
demux_Control( input_priv(p_input)->master->p_demux, DEMUX_SET_ES,
vlc_es_id_GetInputId( param.id ) );
break;
+ case INPUT_CONTROL_SET_ES_NEXT:
+ case INPUT_CONTROL_SET_ES_PREV:
+ {
+ vlc_es_id_t *id;
+ int query = i_type == INPUT_CONTROL_SET_ES_NEXT ? ES_OUT_SET_ES_NEXT
+ : ES_OUT_SET_ES_PREV;
+ if( es_out_Control( input_priv(p_input)->p_es_out_display, query,
+ param.cat, &id ) == VLC_SUCCESS && id != NULL )
+ demux_Control( input_priv(p_input)->master->p_demux, DEMUX_SET_ES,
+ vlc_es_id_GetInputId( id ) );
+ break;
+ }
case INPUT_CONTROL_UNSET_ES:
es_out_Control( input_priv(p_input)->p_es_out_display,
ES_OUT_UNSET_ES, param.id );
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 82eb5f64bd..311300faa1 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -85,6 +85,7 @@ typedef union
vlc_value_t val;
vlc_viewpoint_t viewpoint;
vlc_es_id_t *id;
+ enum es_format_category_e cat;
struct {
bool b_fast_seek;
vlc_tick_t i_val;
@@ -247,6 +248,8 @@ enum input_control_e
INPUT_CONTROL_RESTART_ES_BY_ID,
INPUT_CONTROL_SET_ES,
+ INPUT_CONTROL_SET_ES_NEXT,
+ INPUT_CONTROL_SET_ES_PREV,
INPUT_CONTROL_UNSET_ES,
INPUT_CONTROL_RESTART_ES,
More information about the vlc-commits
mailing list