[vlc-commits] es_out: add a new ES policy: auto
Thomas Guillem
git at videolan.org
Fri Feb 28 20:46:33 CET 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Feb 20 14:42:24 2020 +0100| [5e0d7762db3b409e5f8a329dae1b4deca5fdafbe] | committer: Thomas Guillem
es_out: add a new ES policy: auto
This policy, used for sub and video behave as exclusive by default but switch
to simultaneous if more than one tracks is specifically requested by the user.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5e0d7762db3b409e5f8a329dae1b4deca5fdafbe
---
include/vlc_es_out.h | 3 +++
src/input/es_out.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h
index d7dd98a655..49635f8594 100644
--- a/include/vlc_es_out.h
+++ b/include/vlc_es_out.h
@@ -121,6 +121,9 @@ enum es_out_policy_e
{
ES_OUT_ES_POLICY_EXCLUSIVE = 0,/* Enforces single ES selection only */
ES_OUT_ES_POLICY_SIMULTANEOUS, /* Allows multiple ES per cat */
+ /* Exclusive by default, and simultaneous if specifically requested more
+ * than one track at once */
+ ES_OUT_ES_POLICY_AUTO,
};
struct es_out_callbacks
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 9e53cd83ad..afb3015c5a 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -503,11 +503,11 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, input_source_t *main_source,
vlc_list_init(&p_sys->es_slaves);
/* */
- EsOutPropsInit( &p_sys->video, true, p_input, ES_OUT_ES_POLICY_EXCLUSIVE,
+ EsOutPropsInit( &p_sys->video, true, p_input, ES_OUT_ES_POLICY_AUTO,
"video-track-id", "video-track", NULL, NULL );
EsOutPropsInit( &p_sys->audio, true, p_input, ES_OUT_ES_POLICY_EXCLUSIVE,
"audio-track-id", "audio-track", "audio-language", "audio" );
- EsOutPropsInit( &p_sys->sub, false, p_input, ES_OUT_ES_POLICY_EXCLUSIVE,
+ EsOutPropsInit( &p_sys->sub, false, p_input, ES_OUT_ES_POLICY_AUTO,
"sub-track-id", "sub-track", "sub-language", "sub" );
p_sys->i_group_id = var_GetInteger( p_input, "program" );
More information about the vlc-commits
mailing list