[vlc-devel] [PATCH 3/4] display: no need to pass the video_format_t for CROP/ASPECT_RATIO changes

Rémi Denis-Courmont remi at remlab.net
Wed Aug 2 17:24:24 CEST 2017


Le keskiviikkona 2. elokuuta 2017, 17.21.08 EEST Steve Lhomme a écrit :
> On Wed, Aug 2, 2017 at 4:32 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> > Le keskiviikkona 2. elokuuta 2017, 9.33.37 EEST Steve Lhomme a écrit :
> >> It's always found in vd->source.
> >> ---
> >> 
> >>  include/vlc_vout_display.h             | 4 ++--
> >>  modules/hw/mmal/vout.c                 | 4 +---
> >>  modules/video_output/android/display.c | 5 ++---
> >>  modules/video_output/evas.c            | 5 +----
> >>  modules/video_output/kva.c             | 6 ++----
> >>  modules/video_output/opengl/display.c  | 3 +--
> >>  modules/video_output/sdl.c             | 5 +----
> >>  modules/video_output/wayland/shm.c     | 7 ++-----
> >>  modules/video_output/win32/common.c    | 8 +++-----
> >>  modules/video_output/xcb/xvideo.c      | 5 +----
> >>  src/video_output/display.c             | 4 ++--
> >>  11 files changed, 18 insertions(+), 38 deletions(-)
> >> 
> >> diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
> >> index 38dbded17d..f02272a3d7 100644
> >> --- a/include/vlc_vout_display.h
> >> +++ b/include/vlc_vout_display.h
> >> @@ -167,13 +167,13 @@ enum {
> >> 
> >>      /* Ask the module to acknowledge/refuse source aspect ratio after
> >>      being
> >> 
> >> * requested externally */
> >> -    VOUT_DISPLAY_CHANGE_SOURCE_ASPECT, /* const video_format_t *p_source
> >> */ +    VOUT_DISPLAY_CHANGE_SOURCE_ASPECT,
> > 
> > Refusal was not really implemeneted but this API change makes it pretty
> > much impossible. So I would argue that the documentation needs a more
> > accurate update.
> 
> Refusal was handled and is still handled as before. If the receiver
> returns an error we revert to the previous value as if it was never
> set. Except now we don't copy the whole structure back and forth, just
> the fields that we wanted changed.

Well OK but still the idea was that you still had the old value in source 
until accepted. Changing the value straight only makes sense if you assume 
failure cannot happen.

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list