[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:21:08 CEST 2017


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.

>>      /* Ask the module to acknowledge/refuse source crop change after being
>>       * requested externally.
>>       * The cropping requested is stored by video_format_t::i_x/y_offset and
>> * video_format_t::i_visible_width/height */
>> -    VOUT_DISPLAY_CHANGE_SOURCE_CROP,   /* const video_format_t *p_source */
>> +    VOUT_DISPLAY_CHANGE_SOURCE_CROP,
>
> Ditto.
>
>>      /* Ask the module to acknowledge/refuse VR/360° viewing direction after
>> * being requested externally */
>
> --
> 雷米‧德尼-库尔蒙
> 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