[vlc-commits] vout: direct3d: allow the setup callback to return a different opaque pointer
Steve Lhomme
git at videolan.org
Fri May 10 11:25:22 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri May 10 11:16:58 2019 +0200| [eb93e6e0a83e1923d020d86dbcbd143b8680331f] | committer: Steve Lhomme
vout: direct3d: allow the setup callback to return a different opaque pointer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eb93e6e0a83e1923d020d86dbcbd143b8680331f
---
modules/video_output/win32/d3d_render.h | 2 +-
modules/video_output/win32/direct3d11.c | 6 +++---
modules/video_output/win32/direct3d9.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/video_output/win32/d3d_render.h b/modules/video_output/win32/d3d_render.h
index 062d1d7e5d..790b9b9ced 100644
--- a/modules/video_output/win32/d3d_render.h
+++ b/modules/video_output/win32/d3d_render.h
@@ -49,7 +49,7 @@ struct output_cfg_t {
video_transfer_func_t transfer; /** video transfer function */
};
-typedef bool (*d3d_device_setup_cb)(void* opaque, const struct device_cfg_t*, struct device_setup_t* );
+typedef bool (*d3d_device_setup_cb)(void** opaque, const struct device_cfg_t*, struct device_setup_t* );
typedef void (*d3d_device_cleanup_cb)(void* opaque);
typedef bool (*d3d_update_output_cb)(void* opaque, const struct direct3d_cfg_t *cfg, struct output_cfg_t *out);
typedef void (*d3d_swap_cb)(void* opaque);
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index df8cd6b4e7..4d5ab7a0d2 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -528,9 +528,9 @@ static bool UpdateSwapchain( struct d3d11_local_swapchain *display, const struct
return true;
}
-static bool LocalSwapchainSetupDevice( void *opaque, const struct device_cfg_t *cfg, struct device_setup_t *out )
+static bool LocalSwapchainSetupDevice( void **opaque, const struct device_cfg_t *cfg, struct device_setup_t *out )
{
- struct d3d11_local_swapchain *display = opaque;
+ struct d3d11_local_swapchain *display = *opaque;
HRESULT hr;
#if VLC_WINSTORE_APP
ID3D11DeviceContext *legacy_ctx = var_InheritInteger( display->obj, "winrt-d3dcontext" ); /* LEGACY */
@@ -1328,7 +1328,7 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmtp)
};
struct device_setup_t out;
ID3D11DeviceContext *d3d11_ctx = NULL;
- if ( sys->setupDeviceCb( sys->outside_opaque, &cfg, &out ) )
+ if ( sys->setupDeviceCb( &sys->outside_opaque, &cfg, &out ) )
d3d11_ctx = out.device_context;
if ( d3d11_ctx == NULL )
{
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 554b206f78..ff571cf26f 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1626,7 +1626,7 @@ static int FindShadersCallback(const char *name, char ***values, char ***descs)
}
-static bool LocalSwapchainSetupDevice( void *opaque, const struct device_cfg_t *cfg, struct device_setup_t *out )
+static bool LocalSwapchainSetupDevice( void **opaque, const struct device_cfg_t *cfg, struct device_setup_t *out )
{
return false; /* don't use an "external" D3D9 device */
}
@@ -1702,7 +1702,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
};
struct device_setup_t device_setup;
IDirect3DDevice9 *d3d9_device = NULL;
- if ( sys->setupDeviceCb( sys->outside_opaque, &surface_cfg, &device_setup ) )
+ if ( sys->setupDeviceCb( &sys->outside_opaque, &surface_cfg, &device_setup ) )
d3d9_device = device_setup.device_context;
if ( d3d9_device == NULL && sys->setupDeviceCb != LocalSwapchainSetupDevice )
{
More information about the vlc-commits
mailing list