[vlc-devel] [PATCH 4/7] libvlc: add support for HDR10 metadata during the rendering start

Steve Lhomme robux4 at ycbcr.xyz
Tue May 7 11:39:52 CEST 2019


---
 include/vlc/libvlc_media_player.h | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index cbeb7231a9..cebe81f9fa 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -673,10 +673,24 @@ typedef struct
  */
 typedef bool( *libvlc_video_direct3d_update_output_cb )( void *opaque, const libvlc_video_direct3d_cfg_t *cfg, libvlc_video_output_cfg_t *output );
 
+typedef struct
+{
+    /* similar to SMPTE ST 2086 mastering display color volume */
+    uint16_t RedPrimary[2];
+    uint16_t GreenPrimary[2];
+    uint16_t BluePrimary[2];
+    uint16_t WhitePoint[2];
+    unsigned int MaxMasteringLuminance;
+    unsigned int MinMasteringLuminance;
+    uint16_t MaxContentLightLevel;
+    uint16_t MaxFrameAverageLightLevel;
+} libvlc_video_direct3d_hdr10_metadata_t;
+
 /** Tell the host the rendering is about to start/has finished.
  *
  * \param opaque private pointer passed to the @a libvlc_video_direct3d_set_callbacks() [IN]
  * \param enter true if the rendering is about to start, false if it's finished
+ * \param hdr10 libvlc_video_direct3d_hdr10_metadata_t* or NULL
  * \return true on success
  * \version LibVLC 4.0.0 or later
  *
@@ -720,7 +734,7 @@ typedef bool( *libvlc_video_direct3d_update_output_cb )( void *opaque, const lib
  * - RSSetViewports()
  * - DrawIndexed()
  */
-typedef bool( *libvlc_video_direct3d_start_end_rendering_cb )( void *opaque, bool enter );
+typedef bool( *libvlc_video_direct3d_start_end_rendering_cb )( void *opaque, bool enter, const libvlc_video_direct3d_hdr10_metadata_t *hdr10 );
 
 
 /**
-- 
2.17.1



More information about the vlc-devel mailing list