[vlc-devel] [PATCH 01/12] d3d11: allow rendering video to DirectComposition surfaces

Rémi Denis-Courmont remi at remlab.net
Tue May 12 17:33:20 CEST 2020


Le tiistaina 12. toukokuuta 2020, 10.36.20 EEST Pierre Lamot a écrit :
> On 2020-05-11 19:08, Rémi Denis-Courmont wrote:
> > Le maanantaina 11. toukokuuta 2020, 19.04.51 EEST Pierre Lamot a écrit
> > 
> >> ---
> >> 
> >>  include/vlc_vout_window.h                    |  5 ++
> >>  modules/video_output/Makefile.am             |  3 +-
> >>  modules/video_output/win32/d3d11_swapchain.c | 51
> >> 
> >> +++++++++++++++++---
> >> 
> >>  modules/video_output/win32/d3d11_swapchain.h |  3 +-
> >>  modules/video_output/win32/dcomp_wrapper.cpp | 31 ++++++++++++
> >>  modules/video_output/win32/dcomp_wrapper.h   | 42 ++++++++++++++++
> >>  modules/video_output/win32/direct3d11.c      | 13 +++--
> >>  7 files changed, 135 insertions(+), 13 deletions(-)
> >>  create mode 100644 modules/video_output/win32/dcomp_wrapper.cpp
> >>  create mode 100644 modules/video_output/win32/dcomp_wrapper.h
> >> 
> >> diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
> >> index ad16955ace..2699d2f744 100644
> >> --- a/include/vlc_vout_window.h
> >> +++ b/include/vlc_vout_window.h
> >> @@ -61,6 +61,7 @@ enum vout_window_type {
> >> 
> >>      VOUT_WINDOW_TYPE_XID /**< X11 window */,
> >>      VOUT_WINDOW_TYPE_HWND /**< Win32 or OS/2 window */,
> >>      VOUT_WINDOW_TYPE_NSOBJECT /**< macOS/iOS view */,
> >> 
> >> +    VOUT_WINDOW_TYPE_DCOMP /**< Win32 DirectComposition */,
> >> 
> >>      VOUT_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
> >>      VOUT_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
> > 
> > Breaking ABIs for the lulz? Please no.
> 
> OK
> 
> >>  };
> >> 
> >> @@ -360,6 +361,10 @@ typedef struct vout_window_t {
> >> 
> >>          void     *nsobject;      /**< macOS/iOS view object */
> >>          void     *anativewindow; /**< Android native window */
> >>          struct wl_surface *wl;   /**< Wayland surface (client
> >> 
> >> pointer) */
> >> +        struct {
> >> +            void *device;
> >> +            void *visual;
> >> +        } dcomp;                 /**<  Win32 direct composition
> >> surface */
> >> 
> >>      } handle;
> > 
> > Same here.
> 
> Isn't that the point of having an union VS a void*

No, the point of a union is not the break ABIs just for fun.

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





More information about the vlc-devel mailing list