[vlc-commits] player: osd: add missing calls
Victorien Le Couviour--Tuffet
git at videolan.org
Tue Nov 27 13:16:14 CET 2018
vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Wed Nov 21 15:46:58 2018 +0100| [8dd18039755b439ae89106ce10c5bd2e7da969b7] | committer: Thomas Guillem
player: osd: add missing calls
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8dd18039755b439ae89106ce10c5bd2e7da969b7
---
src/input/player.c | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/src/input/player.c b/src/input/player.c
index 60f62c3e3a..02890bb522 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -1731,16 +1731,20 @@ void
vlc_player_SelectNextTitle(vlc_player_t *player)
{
struct vlc_player_input *input = vlc_player_get_input_locked(player);
- if (input)
- input_ControlPush(input->thread, INPUT_CONTROL_SET_TITLE_NEXT, NULL);
+ if (!input)
+ return;
+ input_ControlPush(input->thread, INPUT_CONTROL_SET_TITLE_NEXT, NULL);
+ vlc_player_vout_OSDMessage(player, NULL, _("Next title"));
}
void
vlc_player_SelectPrevTitle(vlc_player_t *player)
{
struct vlc_player_input *input = vlc_player_get_input_locked(player);
- if (input)
- input_ControlPush(input->thread, INPUT_CONTROL_SET_TITLE_PREV, NULL);
+ if (!input)
+ return;
+ input_ControlPush(input->thread, INPUT_CONTROL_SET_TITLE_PREV, NULL);
+ vlc_player_vout_OSDMessage(player, NULL, _("Previous title"));
}
ssize_t
@@ -1757,25 +1761,31 @@ void
vlc_player_SelectChapterIdx(vlc_player_t *player, size_t index)
{
struct vlc_player_input *input = vlc_player_get_input_locked(player);
- if (input)
- input_ControlPushHelper(input->thread, INPUT_CONTROL_SET_SEEKPOINT,
- &(vlc_value_t){ .i_int = index });
+ if (!input)
+ return;
+ input_ControlPushHelper(input->thread, INPUT_CONTROL_SET_SEEKPOINT,
+ &(vlc_value_t){ .i_int = index });
+ vlc_player_vout_OSDMessage(player, NULL, _("Chapter %ld"), index);
}
void
vlc_player_SelectNextChapter(vlc_player_t *player)
{
struct vlc_player_input *input = vlc_player_get_input_locked(player);
- if (input)
- input_ControlPush(input->thread, INPUT_CONTROL_SET_SEEKPOINT_NEXT, NULL);
+ if (!input)
+ return;
+ input_ControlPush(input->thread, INPUT_CONTROL_SET_SEEKPOINT_NEXT, NULL);
+ vlc_player_vout_OSDMessage(player, NULL, _("Next chapter"));
}
void
vlc_player_SelectPrevChapter(vlc_player_t *player)
{
struct vlc_player_input *input = vlc_player_get_input_locked(player);
- if (input)
- input_ControlPush(input->thread, INPUT_CONTROL_SET_SEEKPOINT_PREV, NULL);
+ if (!input)
+ return;
+ input_ControlPush(input->thread, INPUT_CONTROL_SET_SEEKPOINT_PREV, NULL);
+ vlc_player_vout_OSDMessage(player, NULL, _("Previous chapter"));
}
static void
More information about the vlc-commits
mailing list