player: add helper to toggle subtitles

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This commit is contained in:
Victorien Le Couviour--Tuffet 2018-11-19 19:10:05 +01:00 committed by Thomas Guillem
parent ae3d4eed70
commit 631c32341e
1 changed files with 10 additions and 0 deletions

View File

@ -1890,6 +1890,16 @@ vlc_player_IsSubtitleEnabled(vlc_player_t *player)
return vlc_player_IsTrackCategoryEnabled(player, SPU_ES);
}
/**
* Helper to toggle subtitles
*/
static inline void
vlc_player_ToggleSubtitle(vlc_player_t *player)
{
bool enabled = !vlc_player_IsSubtitleEnabled(player);
return vlc_player_SetSubtitleEnabled(player, enabled);
}
/**
* Get the number of programs
*