[vlc-devel] [PATCH] libvlc: rename the aspect ratio setter/getter and use a fraction

Rémi Denis-Courmont remi at remlab.net
Wed May 29 16:46:17 CEST 2019


Le keskiviikkona 29. toukokuuta 2019, 17.35.37 EEST Steve Lhomme a écrit :
> On 2019-05-29 16:24, Rémi Denis-Courmont wrote:
> > Le keskiviikkona 29. toukokuuta 2019, 17.16.00 EEST Steve Lhomme a écrit :
> >> Using sample in the name is more accurate than just an "aspect ratio",
> >> even
> >> though that's probably the one most people know.
> >> 
> >> ---
> >> how do we document APIs that are removed ?
> >> ---
> >> 
> >>   include/vlc/libvlc_media_player.h | 16 ++++++++++++----
> >>   lib/libvlc.sym                    |  4 ++--
> >>   lib/media_player.c                |  2 +-
> >>   lib/video.c                       | 28 +++++++++++++++++++++-------
> >>   4 files changed, 36 insertions(+), 14 deletions(-)
> >> 
> >> diff --git a/include/vlc/libvlc_media_player.h
> >> b/include/vlc/libvlc_media_player.h index 10e302529d..179597e80f 100644
> >> --- a/include/vlc/libvlc_media_player.h
> >> +++ b/include/vlc/libvlc_media_player.h
> >> @@ -1486,23 +1486,31 @@ LIBVLC_API float libvlc_video_get_scale(
> >> libvlc_media_player_t *p_mi ); */
> >> 
> >>   LIBVLC_API void libvlc_video_set_scale( libvlc_media_player_t *p_mi,
> >>   float
> >> 
> >> f_factor );
> >> 
> >> +typedef struct libvlc_aspect_ratio_t
> >> +{
> >> +    int numerator; /**< aspect ratio numerator */
> >> +    int denominator; /**< aspect ratio denominator, 0 if the source
> >> default is used */
> >> +} libvlc_aspect_ratio_t;
> > 
> > AFAIK, denominator is unsigned, and structure seems overkill when there
> > could just as well be two parameters.
> 
> Looking at the AR presets, it seems negative values are not supported.
> I'd rather use unsigned for both.

Right. Negative SAR would be ambiguous and redundant with orientation.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list