[vlc-devel] [PATCH 11/12] intf: rc: handle angle
Rémi Denis-Courmont
remi at remlab.net
Thu Apr 2 21:05:34 CEST 2020
Le torstaina 2. huhtikuuta 2020, 21.40.19 EEST Francois Cartegnie a écrit :
> ---
> 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);
Uh? Why PRIu8 ? I can't see uint8_t !?
> + }
> + }
> 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 },
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list