[vlc-devel] [PATCH 11/12] intf: rc: handle angle

Alexandre Janniaux ajanni at videolabs.io
Sat Apr 4 18:46:43 CEST 2020


Hi,

On Thu, Apr 02, 2020 at 10:05:34PM +0300, Rémi Denis-Courmont wrote:
> 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 !?
>

+ 1 here, it will warn on darwin platforms because the format
descriptor doesn't match the value in the callsite.

> > +        }
> > +    }
> >      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/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list