[vlc-devel] [PATCH 11/12] intf: rc: handle angle
Francois Cartegnie
fcvlcdev at free.fr
Thu Apr 2 20:40:19 CEST 2020
---
modules/control/rc.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 8f7161ecd6..c96b868f44 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -527,6 +527,28 @@ static void Input(intf_thread_t *intf, char const *psz_cmd,
msg_print(intf, "No title selected.");
}
}
+ else if( !strcmp( psz_cmd, "angle" ) )
+ {
+ if ( *newval.psz_string )
+ {
+ /* Set. */
+ unsigned char idx = atoi(newval.psz_string);
+ vlc_player_SelectAngle(player, idx);
+ }
+ else
+ {
+ /* Get. */
+ const struct vlc_player_title *title =
+ vlc_player_GetSelectedTitle(player);
+ unsigned char angle = 0, count = 1;
+ if (title != NULL)
+ {
+ count += title->additional_angles;
+ angle = vlc_player_GetSelectedAngle(player);
+ }
+ msg_print(intf, "Selected Angle %"PRIu8"/%"PRIu8, angle, count);
+ }
+ }
else if( !strcmp( psz_cmd, "atrack" )
|| !strcmp( psz_cmd, "vtrack" )
|| !strcmp( psz_cmd, "strack" ) )
@@ -1318,6 +1340,7 @@ static const struct
{ "seek", Input },
{ "title", Input },
{ "chapter", Input },
+ { "angle", Input },
{ "atrack", Input },
{ "vtrack", Input },
--
2.25.1
More information about the vlc-devel
mailing list