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

Steve Lhomme robux4 at ycbcr.xyz
Mon May 6 15:01:32 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 72b4648019..315c8c3567 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -608,6 +608,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;
 
 typedef struct
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 23657d21f5..a157dd7a4b 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 e87c43b5ba..ac79d4ce8c 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -2097,7 +2097,8 @@ static_assert(sizeof(vlc_video_surface_device_setup_t) == sizeof(libvlc_video_su
 
 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");
 
 static_assert(sizeof(video_surface_output_cfg_t) == sizeof(libvlc_video_output_cfg_t) &&
-- 
2.17.1



More information about the vlc-devel mailing list