[FFmpeg-devel] [PATCH] dxva2 mingw
Sat Feb 19 13:28:52 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 2/19/2011 20:12, M?ns Rullg?rd wrote:
> V?ctor Paesa <victorpaesa at googlemail.com> writes:
>> On Sat, Feb 19, 2011 at 04:06, Kyle wrote:
>>> On 2/18/2011 9:48 PM, M?ns Rullg?rd wrote:
>>>> Kyle<kshawkeye at gmail.com> writes:
>>>>> This patch needs to be applied to FFmpeg before dxva2 will build with
>>>>> diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
>>>>> index a9be7a0..23d4d87 100644
>>>>> --- a/libavcodec/dxva2_internal.h
>>>>> +++ b/libavcodec/dxva2_internal.h
>>>>> @@ -23,6 +23,8 @@
>>>>> #ifndef AVCODEC_DXVA_INTERNAL_H
>>>>> #define AVCODEC_DXVA_INTERNAL_H
>>>>> +#define _WIN32_WINNT 0x0600
>>>>> +#define COBJMACROS
>>>>> #include "dxva2.h"
>>>>> #include "avcodec.h"
>>>>> #include "mpegvideo.h"
>>>> Could you please explain why this is needed? I'm not disputing that it
>>>> is, nor am I rejecting the patch. I am simply curious to know the reason.
>>> FFmpeg fails to make with:
>>> CC libavcodec/dxva2.o
>>> In file included from libavcodec/dxva2_internal.h:26:0,
>>> from libavcodec/dxva2.c:23:
>>> libavcodec/dxva2.h:40:5: error: unknown type name ?IDirectXVideoDecoder?
>>> libavcodec/dxva2.h:45:5: error: unknown type name
>> Yes, the defines are needed, either there or in configure or as extra-cflags.
> I don't doubt they are needed, and I don't mind them being in that
> header, I only wanted to know what those macros mean. Apparently they
> are some kind of feature selection macros for Microsoft header files.
> Patch is OK.
_WIN32_WINNT allows you to use Vista features, since DXVA2 didn't exist
on anything earlier.
COBJMACROS allows you to use C macros to manipulate the interface
objects, instead of calling the function pointers manually and feeding
them the object to operate on.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (MingW32)
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1705 bytes
Desc: not available
More information about the ffmpeg-devel