[vlc-devel] [PATCH] player: restart video_es tracks on video splitter
Thomas Guillem
thomas at gllm.fr
Fri Nov 30 09:30:50 CET 2018
On Thu, Nov 29, 2018, at 14:49, Rémi Denis-Courmont wrote:
> I doubt that users expect the splitter setup to apply to all vouts at
> the same time always, frankly.
That's good point. Specially it you call this function several time,
you'll end up setting splitter on already splitted vout.
> Le 28 novembre 2018 16:50:26 GMT+02:00, Victorien Le Couviour--Tuffet
> <victorien.lecouviour.tuffet at gmail.com> a écrit :>> The vout can't handle live "video-splitter" change for now.
>>
>> To work-around this issue, this function will set this variable and
>>>> restart all vouts. include/vlc_player.h | 10 +++++++++-
>>
>> src/input/player.c | 11 +++++++++--
>>
>> src/libvlccore.sym | 1 +
>>
>> 3 files changed, 19 insertions(+), 3 deletions(-)
>>
>>
>>
>> diff --git a/include/vlc_player.h b/include/vlc_player.h
>>
>> index 78d78d29d3..4c0d1abe74 100644
>>
>> --- a/include/vlc_player.h
>>
>> +++ b/include/vlc_player.h
>>
>> @@ -332,7 +332,6 @@ enum vlc_player_subtitle_sync
>>
>> */
>>
>> enum vlc_vout_filter_type
>>
>> {
>>
>> - VLC_VOUT_FILTER_VIDEO_SPLITTER,
>>
>> VLC_VOUT_FILTER_VIDEO_FILTER,
>>
>> VLC_VOUT_FILTER_SUB_SOURCE,
>>
>> VLC_VOUT_FILTER_SUB_FILTER,
>>
>> @@ -2446,6 +2445,15 @@ vlc_player_GetStatistics(vlc_player_t
>> *player);
>>>> VLC_API void
>>
>> vlc_player_SetPauseOnCork(vlc_player_t *player, bool enabled);
>>
>>
>>
>> +/**
>>
>> + * Set a video splitter to all vouts and all future vouts
>>
>> + *
>>
>> + * @param player locked instance
>>
>> + * @param splitter a video splitter name or NULL
>>
>> + */
>>
>> +VLC_API void
>>
>> +vlc_player_SetVideoSplitter(vlc_player_t *player, const char
>> *splitter);
>>>> +
>>
>> /**
>>
>> * Get the audio output
>>
>> *
>>
>> diff --git a/src/input/player.c b/src/input/player.c
>>
>> index 59d2fdb774..3609c5962f 100644
>>
>> --- a/src/input/player.c
>>
>> +++ b/src/input/player.c
>>
>> @@ -3352,6 +3352,15 @@ vlc_player_vout_TriggerOption(vlc_player_t
>> *player, const char *option)
>>>> free(vouts);
>>
>> }
>>
>>
>>
>> +void
>>
>> +vlc_player_SetVideoSplitter(vlc_player_t *player, const char
>> *splitter)
>>>> +{
>>
>> + vlc_player_assert_locked(player);
>>
>> + vlc_player_vout_SetVar(player, "video-splitter", VLC_VAR_STRING,
>>>> + (vlc_value_t) { .psz_string = (char *)
>> splitter });
>>>> + vlc_player_RestartTrackCategory(player, VIDEO_ES);
>>
>> +}
>>
>> +
>>
>> void
>>
>> vlc_player_vout_SetFullscreen(vlc_player_t *player, bool enabled)
>>>> {
>>
>> @@ -3379,8 +3388,6 @@ vlc_vout_filter_type_to_varname(enum
>> vlc_vout_filter_type type)
>>>> {
>>
>> switch (type)
>>
>> {
>>
>> - case VLC_VOUT_FILTER_VIDEO_SPLITTER:
>>
>> - return "video-splitter";
>>
>> case VLC_VOUT_FILTER_VIDEO_FILTER:
>>
>> return "video-filter";
>>
>> case VLC_VOUT_FILTER_SUB_SOURCE:
>>
>> diff --git a/src/libvlccore.sym b/src/libvlccore.sym
>>
>> index 9423e2fc20..d4db4ccc51 100644
>>
>> --- a/src/libvlccore.sym
>>
>> +++ b/src/libvlccore.sym
>>
>> @@ -883,6 +883,7 @@ vlc_player_SetSubtitleSync
>>
>> vlc_player_SetTeletextEnabled
>>
>> vlc_player_SetTeletextTransparency
>>
>> vlc_player_SetTrackCategoryEnabled
>>
>> +vlc_player_SetVideoSplitter
>>
>> vlc_player_Start
>>
>> vlc_player_Stop
>>
>> vlc_player_title_list_GetAt
>>
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> excuser ma brièveté.> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181130/f958b9b2/attachment.html>
More information about the vlc-devel
mailing list