[vlc-devel] [PATCH 22/23] libvlc: add a pointer-size variant of the surface format use by the output bost

Steve Lhomme robux4 at ycbcr.xyz
Thu Feb 6 08:21:05 CET 2020


We don't use it yet but that leaves room for future variants that may not fit
in a signed int.
---
 include/vlc/libvlc_media_player.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index cd02fe01e71..a0ac7a1e9fa 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -564,10 +564,13 @@ typedef struct
 
 typedef struct
 {
-    int surface_format;  /** the rendering DXGI_FORMAT for \ref libvlc_video_direct3d_engine_d3d11,
-                          D3DFORMAT for \ref libvlc_video_direct3d_engine_d3d9,
-                          GL_RGBA or GL_RGB for \ref libvlc_video_engine_opengl and
-                          for \ref libvlc_video_engine_gles2 */
+    union {
+        int surface_format;  /** the rendering DXGI_FORMAT for \ref libvlc_video_direct3d_engine_d3d11,
+                            D3DFORMAT for \ref libvlc_video_direct3d_engine_d3d9,
+                            GL_RGBA or GL_RGB for \ref libvlc_video_engine_opengl and
+                            for \ref libvlc_video_engine_gles2 */
+        void *p_surface; /** currently unused */
+    };
     bool full_range;          /** video is full range or studio/limited range */
     libvlc_video_color_space_t colorspace;              /** video color space */
     libvlc_video_color_primaries_t primaries;       /** video color primaries */
-- 
2.17.1



More information about the vlc-devel mailing list