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

Steve Lhomme robux4 at gmail.com
Wed Aug 2 17:32:25 CEST 2017


On Wed, Aug 2, 2017 at 5:24 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 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.

IMO it's important only if some modules wanted to know the previous
value before making the change. If not (which is the case in all
modules) then they don't care how they receive the data and if they
can read the previous value. If they refuse they know nothing changed
(or not) and they don't have to care how the core recovers from that,
just like before.

> --
> 雷米‧德尼-库尔蒙
> https://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