[vlc-devel] [PATCH 13/21] libvlc: rename libvlc_video_direct3d_device_cfg_t / libvlc_video_setup_device_info_t

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


To more generic names.

No functional changes.
---
 doc/libvlc/d3d11_player.cpp       |  2 +-
 doc/libvlc/d3d9_player.c          |  2 +-
 include/vlc/libvlc_media_player.h | 10 +++++-----
 modules/hw/d3d11/d3d11_device.c   |  4 ++--
 modules/hw/d3d9/d3d9_device.c     |  4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/doc/libvlc/d3d11_player.cpp b/doc/libvlc/d3d11_player.cpp
index 85c2899dc63..c9bf86a3098 100644
--- a/doc/libvlc/d3d11_player.cpp
+++ b/doc/libvlc/d3d11_player.cpp
@@ -449,7 +449,7 @@ static bool SelectPlane_cb( void *opaque, size_t plane )
     return true;
 }
 
-static bool Setup_cb( void **opaque, const libvlc_video_direct3d_device_cfg_t *cfg, libvlc_video_direct3d_device_setup_t *out )
+static bool Setup_cb( void **opaque, const libvlc_video_setup_device_cfg_t *cfg, libvlc_video_setup_device_info_t *out )
 {
     struct render_context *ctx = static_cast<struct render_context *>(*opaque);
 
diff --git a/doc/libvlc/d3d9_player.c b/doc/libvlc/d3d9_player.c
index d2960d386bb..3e15caaedc8 100644
--- a/doc/libvlc/d3d9_player.c
+++ b/doc/libvlc/d3d9_player.c
@@ -200,7 +200,7 @@ static void release_direct3d(struct render_context *ctx)
     IDirect3D9_Release(ctx->d3d);
 }
 
-static bool Setup_cb( void **opaque, const libvlc_video_direct3d_device_cfg_t *cfg, libvlc_video_direct3d_device_setup_t *out )
+static bool Setup_cb( void **opaque, const libvlc_video_setup_device_cfg_t *cfg, libvlc_video_setup_device_info_t *out )
 {
     struct render_context *ctx = *opaque;
     out->device_context = ctx->d3d;
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 10a4ed75f0e..20c738569d6 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -699,7 +699,7 @@ typedef enum libvlc_video_direct3d_engine_t {
 typedef struct
 {
     bool hardware_decoding; /** set if D3D11_CREATE_DEVICE_VIDEO_SUPPORT is needed for D3D11 */
-} libvlc_video_direct3d_device_cfg_t;
+} libvlc_video_setup_device_cfg_t;
 
 typedef struct
 {
@@ -707,7 +707,7 @@ typedef struct
         void *device_context; /** ID3D11DeviceContext* for D3D11, IDirect3D9 * for D3D9 */
         int  adapter;         /** Adapter to use with the IDirect3D9 for D3D9 */
     };
-} libvlc_video_direct3d_device_setup_t;
+} libvlc_video_setup_device_info_t;
 
 /** Setup the rendering environment.
  *
@@ -715,7 +715,7 @@ typedef struct
  *               on input. The callback can change this value on output to be
  *               passed to all the other callbacks set on @a libvlc_video_direct3d_set_callbacks(). [IN/OUT]
  * \param cfg requested configuration of the video device [IN]
- * \param out libvlc_video_direct3d_device_setup_t* to fill [OUT]
+ * \param out libvlc_video_setup_device_info_t* to fill [OUT]
  * \return true on success
  * \version LibVLC 4.0.0 or later
  *
@@ -728,8 +728,8 @@ typedef struct
  * The ID3D11Device used to create ID3D11DeviceContext must have multithreading enabled.
  */
 typedef bool( *libvlc_video_direct3d_device_setup_cb )( void **opaque,
-                                                        const libvlc_video_direct3d_device_cfg_t *cfg,
-                                                        libvlc_video_direct3d_device_setup_t *out );
+                                                        const libvlc_video_setup_device_cfg_t *cfg,
+                                                        libvlc_video_setup_device_info_t *out );
 
 /** Cleanup the rendering environment initialized during \ref libvlc_video_direct3d_device_setup_cb.
  *
diff --git a/modules/hw/d3d11/d3d11_device.c b/modules/hw/d3d11/d3d11_device.c
index 23e0b1b534c..f078394fe3d 100644
--- a/modules/hw/d3d11/d3d11_device.c
+++ b/modules/hw/d3d11/d3d11_device.c
@@ -99,10 +99,10 @@ static int D3D11OpenDecoderDevice(vlc_decoder_device *device, bool forced, vout_
             /* decoder device coming from the external app */
             sys->external.opaque          = var_InheritAddress( device, "vout-cb-opaque" );
             sys->external.cleanupDeviceCb = var_InheritAddress( device, "vout-cb-cleanup" );
-            libvlc_video_direct3d_device_cfg_t cfg = {
+            libvlc_video_setup_device_cfg_t cfg = {
                 .hardware_decoding = true, /* always favor hardware decoding */
             };
-            libvlc_video_direct3d_device_setup_t out = { .device_context = NULL };
+            libvlc_video_setup_device_info_t out = { .device_context = NULL };
             if (!setupDeviceCb( &sys->external.opaque, &cfg, &out ))
             {
                 if (sys->external.cleanupDeviceCb)
diff --git a/modules/hw/d3d9/d3d9_device.c b/modules/hw/d3d9/d3d9_device.c
index fd205f3a281..fd61303103e 100644
--- a/modules/hw/d3d9/d3d9_device.c
+++ b/modules/hw/d3d9/d3d9_device.c
@@ -74,10 +74,10 @@ int D3D9OpenDecoderDevice(vlc_decoder_device *device, vout_window_t *wnd)
     if ( setupDeviceCb )
     {
         /* external rendering */
-        libvlc_video_direct3d_device_setup_t out = { .device_context = NULL, .adapter = 0 };
+        libvlc_video_setup_device_info_t out = { .device_context = NULL, .adapter = 0 };
         sys->opaque          = var_InheritAddress( device, "vout-cb-opaque" );
         sys->cleanupDeviceCb = var_InheritAddress( device, "vout-cb-cleanup" );
-        libvlc_video_direct3d_device_cfg_t cfg = {
+        libvlc_video_setup_device_cfg_t cfg = {
             .hardware_decoding = true, /* ignored anyway */
         };
         if (!setupDeviceCb( &sys->opaque, &cfg, &out ))
-- 
2.17.1



More information about the vlc-devel mailing list