Skip to content

Commit 5b39376

Browse files
committed
Merge commit 'a7c5fddac8137654cb503295c4dfb6492df43643'
* commit 'a7c5fddac8137654cb503295c4dfb6492df43643': avconv_dxva2: define all used GUIDs directly instead of relying on the dxva2api.h header Merged-by: Michael Niedermayer <[email protected]>
2 parents 37ce318 + a7c5fdd commit 5b39376

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

ffmpeg_dxva2.c

+14-13
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727

2828
#include <stdint.h>
2929

30-
/* initguid.h needs to be above d3d/dxva to ensure
31-
the GUIDs are initialized properly */
32-
#include <initguid.h>
33-
3430
#include <d3d9.h>
3531
#include <dxva2api.h>
3632

@@ -44,19 +40,24 @@
4440
#include "libavutil/imgutils.h"
4541
#include "libavutil/pixfmt.h"
4642

47-
typedef IDirect3D9* WINAPI pDirect3DCreate9(UINT);
48-
typedef HRESULT WINAPI pCreateDeviceManager9(UINT *, IDirect3DDeviceManager9 **);
49-
50-
/* GUIDs not defined in the common dxva2api.h in mingw-w64 */
51-
#ifndef _MSC_VER
52-
DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
53-
DEFINE_GUID(DXVA2_ModeVC1_D2010, 0x1b81beA4, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
54-
DEFINE_GUID(DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
55-
#endif
43+
/* define all the GUIDs used directly here,
44+
to avoid problems with inconsistent dxva2api.h versions in mingw-w64 and different MSVC version */
45+
#include <initguid.h>
46+
DEFINE_GUID(IID_IDirectXVideoDecoderService, 0xfc51a551,0xd5e7,0x11d9,0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
5647

48+
DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
49+
DEFINE_GUID(DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
50+
DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
51+
DEFINE_GUID(DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
5752
DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951,0x4C54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
53+
DEFINE_GUID(DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
54+
DEFINE_GUID(DXVA2_ModeVC1_D2010, 0x1b81beA4, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
55+
DEFINE_GUID(DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
5856
DEFINE_GUID(GUID_NULL, 0x00000000, 0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);
5957

58+
typedef IDirect3D9* WINAPI pDirect3DCreate9(UINT);
59+
typedef HRESULT WINAPI pCreateDeviceManager9(UINT *, IDirect3DDeviceManager9 **);
60+
6061
typedef struct dxva2_mode {
6162
const GUID *guid;
6263
enum AVCodecID codec;

0 commit comments

Comments
 (0)