[vlc-commits] direct3d9: request the presentation parameters with a d3d9_decoder_device_t
Steve Lhomme
git at videolan.org
Thu Feb 13 09:31:41 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 12 12:23:19 2020 +0100| [30c394d175de589cc08659e9e53c2854eede1756] | committer: Steve Lhomme
direct3d9: request the presentation parameters with a d3d9_decoder_device_t
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30c394d175de589cc08659e9e53c2854eede1756
---
modules/video_chroma/d3d9_fmt.c | 7 +++----
modules/video_chroma/d3d9_fmt.h | 2 +-
modules/video_output/win32/direct3d9.c | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index c7fd35318e..ef08f2aaa1 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -134,7 +134,7 @@ d3d9_handle_t *hd3d = &sys->dec_device.hd3d;
out->adapterId = AdapterToUse;
/* TODO only create a device for the decoder dimensions */
D3DPRESENT_PARAMETERS d3dpp;
- if (D3D9_FillPresentationParameters(hd3d, out, &d3dpp))
+ if (D3D9_FillPresentationParameters(&sys->dec_device, &d3dpp))
{
msg_Err(o, "Could not get presentation parameters");
goto error;
@@ -203,8 +203,7 @@ void D3D9_ReleaseDevice(d3d9_decoder_device_t *dec_dev)
* It setup vout_display_sys_t::d3dpp and vout_display_sys_t::rect_display
* from the default adapter.
*/
-int D3D9_FillPresentationParameters(d3d9_handle_t *hd3d,
- const d3d9_device_t *d3ddev,
+int D3D9_FillPresentationParameters(const d3d9_decoder_device_t *dec_dev,
D3DPRESENT_PARAMETERS *d3dpp)
{
/*
@@ -212,7 +211,7 @@ int D3D9_FillPresentationParameters(d3d9_handle_t *hd3d,
** buffer of the same format
*/
D3DDISPLAYMODE d3ddm;
- HRESULT hr = IDirect3D9_GetAdapterDisplayMode(hd3d->obj, d3ddev->adapterId, &d3ddm);
+ HRESULT hr = IDirect3D9_GetAdapterDisplayMode(dec_dev->hd3d.obj, dec_dev->d3ddev.adapterId, &d3ddm);
if (FAILED(hr))
return VLC_EGENERIC;
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index fc2602656d..45ced1306c 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -143,7 +143,7 @@ void D3D9_CloneExternal(d3d9_handle_t *, IDirect3D9 *);
void D3D9_Destroy(d3d9_handle_t *);
-int D3D9_FillPresentationParameters(d3d9_handle_t *, const d3d9_device_t *, D3DPRESENT_PARAMETERS *);
+int D3D9_FillPresentationParameters(const d3d9_decoder_device_t *, D3DPRESENT_PARAMETERS *);
void d3d9_pic_context_destroy(picture_context_t *);
picture_context_t *d3d9_pic_context_copy(picture_context_t *);
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 3533839747..2d218842cc 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -848,7 +848,7 @@ static int Direct3D9Reset(vout_display_t *vd, const video_format_t *fmtp)
d3d9_device_t *p_d3d9_dev = &sys->d3d9_device->d3ddev;
D3DPRESENT_PARAMETERS d3dpp;
- if (D3D9_FillPresentationParameters(&sys->d3d9_device->hd3d, p_d3d9_dev, &d3dpp))
+ if (D3D9_FillPresentationParameters(sys->d3d9_device, &d3dpp))
{
msg_Err(vd, "Could not get presentation parameters to reset device");
return VLC_EGENERIC;
More information about the vlc-commits
mailing list