[vlc-devel] [PATCH 12/18] libvlc: rename libvlc_video_direct3d_device_cfg_t / libvlc_video_setup_device_info_t

Steve Lhomme robux4 at ycbcr.xyz
Tue Feb 4 16:26:07 CET 2020


To more generic names.

No functional changes.
---
 doc/libvlc/QtGL/qtvlcwidget.cpp   |  4 ++--
 doc/libvlc/d3d11_player.cpp       |  2 +-
 doc/libvlc/d3d9_player.c          |  2 +-
 doc/libvlc/sdl_opengl_player.cpp  |  4 ++--
 include/vlc/libvlc_media_player.h | 10 +++++-----
 modules/hw/d3d11/d3d11_device.c   |  4 ++--
 modules/hw/d3d9/d3d9_device.c     |  4 ++--
 modules/video_output/vgl.c        |  4 ++--
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/doc/libvlc/QtGL/qtvlcwidget.cpp b/doc/libvlc/QtGL/qtvlcwidget.cpp
index 575eb418aeb..b8291f6dbc8 100644
--- a/doc/libvlc/QtGL/qtvlcwidget.cpp
+++ b/doc/libvlc/QtGL/qtvlcwidget.cpp
@@ -64,8 +64,8 @@ public:
     }
 
     // This callback is called during initialisation.
-    static bool setup(void** data, const libvlc_video_direct3d_device_cfg_t *cfg,
-                      libvlc_video_direct3d_device_setup_t *out)
+    static bool setup(void** data, const libvlc_video_setup_device_cfg_t *cfg,
+                      libvlc_video_setup_device_info_t *out)
     {
         if (!QOpenGLContext::supportsThreadedOpenGL())
             return false;
diff --git a/doc/libvlc/d3d11_player.cpp b/doc/libvlc/d3d11_player.cpp
index d6feba29aa0..26c3aba8bfa 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 17dfc51d1b2..ce09ff0251f 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/doc/libvlc/sdl_opengl_player.cpp b/doc/libvlc/sdl_opengl_player.cpp
index c84938041b6..5ab8ef871e4 100644
--- a/doc/libvlc/sdl_opengl_player.cpp
+++ b/doc/libvlc/sdl_opengl_player.cpp
@@ -160,8 +160,8 @@ public:
     }
 
     // This callback is called during initialisation.
-    static bool setup(void** data, const libvlc_video_direct3d_device_cfg_t *cfg,
-                      libvlc_video_direct3d_device_setup_t *out)
+    static bool setup(void** data, const libvlc_video_setup_device_cfg_t *cfg,
+                      libvlc_video_setup_device_info_t *out)
     {
         VLCVideo** that = static_cast<VLCVideo**>(data);
         (*that)->m_width = 0;
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 6cdab23d59c..68c19b99a28 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -506,13 +506,13 @@ void libvlc_video_set_format_callbacks( libvlc_media_player_t *mp,
 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
 {
     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;
 
 /**
  * Callback prototype called to initialize user data.
@@ -524,7 +524,7 @@ typedef struct
  *               passed to all the other callbacks set on @a libvlc_video_direct3d_set_callbacks()
  *               or @a libvlc_video_set_output_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
  *
@@ -537,8 +537,8 @@ typedef struct
  * The ID3D11Device used to create ID3D11DeviceContext must have multithreading enabled.
  */
 typedef bool( *libvlc_video_output_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 );
 
 
 /**
diff --git a/modules/hw/d3d11/d3d11_device.c b/modules/hw/d3d11/d3d11_device.c
index 80674b19a35..544599bc8fd 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 b02a5aa6cb0..a25f42add7a 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 ))
diff --git a/modules/video_output/vgl.c b/modules/video_output/vgl.c
index 5f61bf2963e..4ba13a78622 100644
--- a/modules/video_output/vgl.c
+++ b/modules/video_output/vgl.c
@@ -142,8 +142,8 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height)
 
     if( sys->setupCb )
     {
-        libvlc_video_direct3d_device_cfg_t setup_cfg = {};
-        libvlc_video_direct3d_device_setup_t configured_cfg;
+        libvlc_video_setup_device_cfg_t setup_cfg = {};
+        libvlc_video_setup_device_info_t configured_cfg;
         if( !sys->setupCb(&sys->opaque, &setup_cfg, &configured_cfg) )
         {
             msg_Err( gl, "user setup failed" );
-- 
2.17.1



More information about the vlc-devel mailing list