[vlc-devel] [RFC v2 3/8] libvlc: handle more than 8 bits output in external D3D rendering

Steve Lhomme robux4 at ycbcr.xyz
Thu May 2 15:28:46 CEST 2019


---
 include/vlc/libvlc_media_player.h | 1 +
 include/vlc_vout_display.h        | 1 +
 lib/media_player.c                | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index a9d8199728..5e6cd81fbc 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -583,6 +583,7 @@ typedef struct
 {
     unsigned width;                        /** rendering video width in pixel */
     unsigned height;                      /** rendering video height in pixel */
+    unsigned bitdepth;      /** rendering video bit depth in bits per channel */
 } libvlc_video_surface_cfg_t;
 
 /**
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 33bd344a99..7916d3027c 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -469,6 +469,7 @@ typedef struct
 typedef struct
 {
     unsigned width, height;
+    unsigned bitdepth; /* bits per channel */
 } vlc_video_surface_cfg_t; /* must match libvlc_video_surface_cfg_t */
 
 typedef struct
diff --git a/lib/media_player.c b/lib/media_player.c
index 8e63569e4b..888b3e2cc5 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -2097,5 +2097,6 @@ static_assert(sizeof(vlc_video_surface_device_setup_t)            == sizeof(libv
 
 static_assert(sizeof(vlc_video_surface_cfg_t)              == sizeof(libvlc_video_surface_cfg_t) &&
               offsetof(vlc_video_surface_cfg_t, width)     == offsetof(libvlc_video_surface_cfg_t, width) &&
-              offsetof(vlc_video_surface_cfg_t, height)    == offsetof(libvlc_video_surface_cfg_t, height)
+              offsetof(vlc_video_surface_cfg_t, height)    == offsetof(libvlc_video_surface_cfg_t, height) &&
+              offsetof(vlc_video_surface_cfg_t, bitdepth)  == offsetof(libvlc_video_surface_cfg_t, bitdepth)
               , "video surface setup mismatch");
-- 
2.17.1



More information about the vlc-devel mailing list