[FFmpeg-devel] [PATCH] dxva2 mingw

jony 10walls
Sat Feb 19 13:28:52 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/19/2011 20:12, M?ns Rullg?rd wrote:
> V?ctor Paesa <victorpaesa at googlemail.com> writes:
> 
>> Hi,
>>
>> 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
>>>>> mingw
>>>>>
>>>>> 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
>>> ?DXVA2_ConfigPictureDecode?
>>
>> 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.
> 

Hi,

_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)

iQEcBAEBAgAGBQJNX7eCAAoJEG5FGoM+9J7NgZ0H/1ehoCHRAjZL+PtNgpz54bCG
vHXBUy8NCKawqWtzFW7yLWnAnYQkpCcHpaewYkRJrXq3hVLQOOMZ9fh8o46cVD7N
wsyYdE8+HovkuPRR1Q2gxn1Fu8RxuYpjuT/tIhgBAy7t0kLYdW4xbGOt7zp4803Y
RTTVmosRiTl3YTqXyYgy9h24f3y033YLsiXelef+BC5i6kNGdJnaP7eb78r2IkKb
ZkgJRg717+NX1mS1SaKiqo78nXrRS71tvVOvl2D3GgAtO6Nd5b/goqduJ+qQMvGk
fvfXAiN1yTRINnMINE3FtegToBsJEsC8mGD2HPzFeOoap+Q9FzhYevQQxTwMmLo=
=12JO
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x3EF49ECD.asc
Type: application/pgp-keys
Size: 1705 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110219/83e6490b/attachment.key>



More information about the ffmpeg-devel mailing list