[vlc-devel] [PATCH 00/20] Move picture placement in the core

Steve Lhomme robux4 at ycbcr.xyz
Tue Aug 25 09:29:48 CEST 2020


Working on the mouse handling I noticed it uses the picture placement to
translate the values to video coordinates. So far modules were free to do their
own picture placement, even faking some values like the vertical orientation
in OpenGL modules.

To always get the correct mouse translation the core should know about the
current picture placement. So we move (most) picture placement calls in the
core.

On Open, OpenGL modules update the display configuration to flip the vertical
alignement. After that the vertical alignment never changes and is always used
accurately in the core.

There are still a few modules that call vout_display_PlacePicture() internally,
mostly because they adjust to the real display size internally. They should be
fixed to let the core know about the proper display size. That means fixing
ios.m, macosx.m, mmal/vout.c.
MMAL also doesn't allow is_display_filled to be false. Maybe it can actually
handle it.

Steve Lhomme (20):
  display: use vd->cfg directly in VOUT_DISPLAY_CHANGE_xxx
  vout: fix warning on unused va_list
  display: don't pass a const vout_display_cfg_t* anymore in
    VOUT_DISPLAY_CHANGE_xxx
  display: keep the placed picture on open and after changing display
    settings
  xcb/x11: use the picture placement from the core on open
  vdpau/display: use the picture placement from the core on open
  vdpau/display: use the picture placement from the core
  wayland/shm: use the picture placement from the core
  kva: use the placed picture dimensions from the core
  xcb: use the placed picture dimensions from the core
  vout: vulkan: use the placed picture dimensions from the core
  vout: win32: use the placed picture dimensions from the core
  display: allow the display modules to change the vout_display_cfg_t
  opengl: flip the alignment once on Open
  glwin32: flip the alignment once on Open
  vout/macosx: use the picture placement from the core
  vout: win32: use the placed picture dimensions from the core
  display: opengl: use precomputed vd->place directly in
    VOUT_DISPLAY_CHANGE_xxx
  display: log when the source or picture placement changes
  vout: win32: simplify setting the placement as changed

 include/vlc_vout_display.h              | 45 +++++++-----
 modules/hw/mmal/vout.c                  |  7 +-
 modules/hw/vdpau/display.c              | 43 +++++-------
 modules/video_output/Makefile.am        |  3 -
 modules/video_output/android/display.c  | 11 ++-
 modules/video_output/caca.c             |  2 +-
 modules/video_output/caopengllayer.m    | 20 +++---
 modules/video_output/decklink.cpp       |  4 +-
 modules/video_output/fb.c               |  4 +-
 modules/video_output/flaschen.c         |  4 +-
 modules/video_output/ios.m              | 11 +--
 modules/video_output/kms.c              |  2 +-
 modules/video_output/kva.c              | 26 +++----
 modules/video_output/macosx.m           | 45 +++++-------
 modules/video_output/opengl/display.c   | 35 +++-------
 modules/video_output/splitter.c         |  2 +-
 modules/video_output/vdummy.c           |  8 +--
 modules/video_output/vmem.c             |  4 +-
 modules/video_output/vulkan/display.c   | 14 ++--
 modules/video_output/wayland/shm.c      | 28 ++++----
 modules/video_output/win32/common.c     | 68 ++++--------------
 modules/video_output/win32/common.h     | 13 ++--
 modules/video_output/win32/direct3d11.c | 52 +++++++-------
 modules/video_output/win32/direct3d9.c  | 38 +++++-----
 modules/video_output/win32/glwin32.c    | 20 ++++--
 modules/video_output/win32/wingdi.c     | 26 +++----
 modules/video_output/xcb/render.c       | 27 ++++----
 modules/video_output/xcb/x11.c          | 31 ++++-----
 modules/video_output/yuv.c              |  4 +-
 src/video_output/display.c              | 92 +++++++++++++++++--------
 src/video_output/video_output.c         |  9 ++-
 31 files changed, 324 insertions(+), 374 deletions(-)

-- 
2.26.2



More information about the vlc-devel mailing list