[vlc-devel] [PATCH 08/21] libvlc: merge direct3d_update_output_cb update into update_output_cb

Steve Lhomme robux4 at ycbcr.xyz
Wed Feb 5 16:13:16 CET 2020


There are doing the same thing.
---
 include/vlc/libvlc_media_player.h       | 35 +++++++++----------------
 lib/media_player.c                      |  2 +-
 modules/video_output/win32/direct3d11.c |  2 +-
 modules/video_output/win32/direct3d9.c  |  2 +-
 4 files changed, 16 insertions(+), 25 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 095b562e690..18cf027a4e6 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -546,12 +546,22 @@ typedef struct
 } libvlc_video_output_cfg_t;
 
 /**
- * Callback prototype called on video size changes
+ * Callback prototype called on video size changes.
+ * Update the rendering output setup.
  *
- * \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() [IN]
+ * \param opaque private pointer passed to the @a libvlc_video_set_output_callbacks() or
+ *         @a libvlc_video_direct3d_device_setup_cb() [IN]
  * \param cfg configuration of the video that will be rendered [IN]
  * \param output configuration describing with how the rendering is setup [OUT]
  * \version LibVLC 4.0.0 or later
+ *
+ * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
+ *       uses to render. The host must set a Render target and call Present()
+ *       when it needs the drawing from VLC to be done. This object is not valid
+ *       anymore after Cleanup is called.
+ *
+ * Tone mapping, range and color conversion will be done depending on the values
+ * set in the output structure.
  */
 typedef bool (*libvlc_video_update_output_cb)(void* opaque, const libvlc_video_render_cfg_t *cfg,
                                               libvlc_video_output_cfg_t *output );
@@ -740,25 +750,6 @@ typedef void( *libvlc_video_direct3d_set_resize_cb )( void *opaque,
                                                       void (*report_size_change)(void *report_opaque, unsigned width, unsigned height),
                                                       void *report_opaque );
 
-/** Update the rendering output setup.
- *
- * \param opaque private pointer set on the opaque parameter of @a libvlc_video_direct3d_device_setup_cb() [IN]
- * \param cfg configuration of the video that will be rendered [IN]
- * \param output configuration describing with how the rendering is setup [OUT]
- * \version LibVLC 4.0.0 or later
- *
- * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
- *       uses to render. The host must set a Render target and call Present()
- *       when it needs the drawing from VLC to be done. This object is not valid
- *       anymore after Cleanup is called.
- *
- * Tone mapping, range and color conversion will be done depending on the values
- * set in the output structure.
- */
-typedef bool( *libvlc_video_direct3d_update_output_cb )( void *opaque,
-                                                         const libvlc_video_render_cfg_t *cfg,
-                                                         libvlc_video_output_cfg_t *output );
-
 /** Tell the host the rendering for the given plane is about to start
  *
  * \param opaque private pointer set on the opaque parameter of @a libvlc_video_direct3d_device_setup_cb() [IN]
@@ -808,7 +799,7 @@ bool libvlc_video_direct3d_set_callbacks( libvlc_media_player_t *mp,
                                          libvlc_video_direct3d_device_setup_cb setup_cb,
                                          libvlc_video_direct3d_device_cleanup_cb cleanup_cb,
                                          libvlc_video_direct3d_set_resize_cb resize_cb,
-                                         libvlc_video_direct3d_update_output_cb update_output_cb,
+                                         libvlc_video_update_output_cb update_output_cb,
                                          libvlc_video_swap_cb swap_cb,
                                          libvlc_video_makeCurrent_cb makeCurrent_cb,
                                          libvlc_video_frameMetadata_cb metadata_cb,
diff --git a/lib/media_player.c b/lib/media_player.c
index 2ea8e15cef6..211b12704a3 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1078,7 +1078,7 @@ bool libvlc_video_direct3d_set_callbacks(libvlc_media_player_t *mp,
                                          libvlc_video_direct3d_device_setup_cb setup_cb,
                                          libvlc_video_direct3d_device_cleanup_cb cleanup_cb,
                                          libvlc_video_direct3d_set_resize_cb resize_cb,
-                                         libvlc_video_direct3d_update_output_cb update_output_cb,
+                                         libvlc_video_update_output_cb update_output_cb,
                                          libvlc_video_swap_cb swap_cb,
                                          libvlc_video_makeCurrent_cb makeCurrent_cb,
                                          libvlc_video_frameMetadata_cb metadata_cb,
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index ab5abe7f54d..b40423da130 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -119,7 +119,7 @@ struct vout_display_sys_t
 
     /* outside rendering */
     void *outside_opaque;
-    libvlc_video_direct3d_update_output_cb   updateOutputCb;
+    libvlc_video_update_output_cb            updateOutputCb;
     libvlc_video_swap_cb                     swapCb;
     libvlc_video_makeCurrent_cb              startEndRenderingCb;
     libvlc_video_frameMetadata_cb            sendMetadataCb;
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 14445f8cd2c..ed047ef30d6 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -171,7 +171,7 @@ struct vout_display_sys_t
 
     /* outside rendering */
     void *outside_opaque;
-    libvlc_video_direct3d_update_output_cb   updateOutputCb;
+    libvlc_video_update_output_cb            updateOutputCb;
     libvlc_video_swap_cb                     swapCb;
     libvlc_video_makeCurrent_cb              startEndRenderingCb;
 };
-- 
2.17.1



More information about the vlc-devel mailing list