Commit c255d973 authored by Laurent Aimar's avatar Laurent Aimar

Do not use types not existing in official dxva2api.h header.

As reported on ffmpeg-devel ML.
parent 103f5b1b
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#ifdef HAVE_LIBAVCODEC_AVCODEC_H #ifdef HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h> # include <libavcodec/avcodec.h>
# ifdef HAVE_AVCODEC_DXVA2 # ifdef HAVE_AVCODEC_DXVA2
# define DXVA2API_USE_BITFIELDS
# include <libavcodec/dxva2.h> # include <libavcodec/dxva2.h>
# endif # endif
#elif defined(HAVE_FFMPEG_AVCODEC_H) #elif defined(HAVE_FFMPEG_AVCODEC_H)
...@@ -224,17 +225,17 @@ typedef struct ...@@ -224,17 +225,17 @@ typedef struct
/* Device manager */ /* Device manager */
UINT token; UINT token;
LPDIRECT3DDEVICEMANAGER9 devmng; IDirect3DDeviceManager9 *devmng;
HANDLE device; HANDLE device;
/* Video service */ /* Video service */
LPDIRECTXVIDEODECODERSERVICE vs; IDirectXVideoDecoderService *vs;
GUID input; GUID input;
D3DFORMAT render; D3DFORMAT render;
/* Video decoder */ /* Video decoder */
DXVA2_ConfigPictureDecode cfg; DXVA2_ConfigPictureDecode cfg;
LPDIRECTXVIDEODECODER decoder; IDirectXVideoDecoder *decoder;
/* Option conversion */ /* Option conversion */
D3DFORMAT output; D3DFORMAT output;
...@@ -610,7 +611,7 @@ static int D3dCreateDeviceManager(vlc_va_dxva2_t *va) ...@@ -610,7 +611,7 @@ static int D3dCreateDeviceManager(vlc_va_dxva2_t *va)
msg_Dbg(va->log, "OurDirect3DCreateDeviceManager9 Success!"); msg_Dbg(va->log, "OurDirect3DCreateDeviceManager9 Success!");
UINT token; UINT token;
LPDIRECT3DDEVICEMANAGER9 devmng; IDirect3DDeviceManager9 *devmng;
if (FAILED(CreateDeviceManager9(&token, &devmng))) { if (FAILED(CreateDeviceManager9(&token, &devmng))) {
msg_Err(va->log, " OurDirect3DCreateDeviceManager9 failed"); msg_Err(va->log, " OurDirect3DCreateDeviceManager9 failed");
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -663,7 +664,7 @@ static int DxCreateVideoService(vlc_va_dxva2_t *va) ...@@ -663,7 +664,7 @@ static int DxCreateVideoService(vlc_va_dxva2_t *va)
} }
va->device = device; va->device = device;
LPDIRECTXVIDEODECODERSERVICE vs; IDirectXVideoDecoderService *vs;
hr = IDirect3DDeviceManager9_GetVideoService(va->devmng, device, hr = IDirect3DDeviceManager9_GetVideoService(va->devmng, device,
&IID_IDirectXVideoDecoderService, &IID_IDirectXVideoDecoderService,
&vs); &vs);
...@@ -879,7 +880,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va, ...@@ -879,7 +880,7 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
} }
/* Create the decoder */ /* Create the decoder */
LPDIRECTXVIDEODECODER decoder; IDirectXVideoDecoder *decoder;
if (FAILED(IDirectXVideoDecoderService_CreateVideoDecoder(va->vs, if (FAILED(IDirectXVideoDecoderService_CreateVideoDecoder(va->vs,
&va->input, &va->input,
&dsc, &dsc,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment