Christian Costa wrote:
>Index: dlls/quartz/quartz_private.h
>===================================================================
>RCS file: /home/wine/wine/dlls/quartz/quartz_private.h,v
>retrieving revision 1.24
>diff -u -r1.24 quartz_private.h
>--- dlls/quartz/quartz_private.h 6 May 2005 14:34:02 -0000 1.24
>+++ dlls/quartz/quartz_private.h 9 Jun 2005 21:54:23 -0000
>@@ -53,6 +53,9 @@
> HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv);
> HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv);
> HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv);
>+#ifdef HAVE_LIBAVCODEC
>+HRESULT FFMpegVideoWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv);
>+#endif
>
> HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum);
>
>@@ -81,5 +84,9 @@
> void DeleteMediaType(AM_MEDIA_TYPE * pmt);
> BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * pmt2, BOOL bWildcards);
> void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE * pmt);
>+
>+#ifdef HAVE_LIBAVCODEC
>+extern CLSID CLSID_FFMpegVideoWrapper;
>+#endif
>
> #endif /* __QUARTZ_PRIVATE_INCLUDED__ */
>Index: dlls/quartz/regsvr.c
>===================================================================
>RCS file: /home/wine/wine/dlls/quartz/regsvr.c,v
>retrieving revision 1.21
>diff -u -r1.21 regsvr.c
>--- dlls/quartz/regsvr.c 17 May 2005 14:41:37 -0000 1.21
>+++ dlls/quartz/regsvr.c 9 Jun 2005 21:54:36 -0000
>@@ -18,6 +18,8 @@
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> */
>
>+#include "config.h"
>+
> #define NONAMELESSUNION
> #define NONAMELESSSTRUCT
> #define COBJMACROS
>@@ -840,6 +842,10 @@
> return res;
> }
>
>+#ifdef HAVE_LIBAVCODEC
>+CLSID CLSID_FFMpegVideoWrapper = { 0x30355649, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x72 } };
>+#endif
>+
> /***********************************************************************
> * coclass list
> */
>@@ -928,6 +934,14 @@
> "quartz.dll",
> "Both"
> },
>+#ifdef HAVE_LIBAVCODEC
>+ { &CLSID_FFMpegVideoWrapper,
>+ "FFMpeg Video Wrapper",
>+ NULL,
>+ "quartz.dll",
>+ "Both"
>+ },
>+#endif
> { NULL } /* list terminator */
> };
>
>@@ -1118,6 +1132,26 @@
> { 0xFFFFFFFF },
> }
> },
>+ /* Wine specific filters */
>+#ifdef HAVE_LIBAVCODEC
>+ { &CLSID_FFMpegVideoWrapper,
>+ &CLSID_LegacyAmFilterCategory,
>+ {'F','F','M','p','e','g',' ','V','i','d','e','o',' ','W','r','a','p','p','e','r',0},
>+ 0x5FFFFF, /* Just below AVIDec */
>+ { { 0,
>+ { { &MEDIATYPE_Video, &GUID_NULL },
>+ { NULL }
>+ },
>+ },
>+ { REG_PINFLAG_B_OUTPUT,
>+ { { &MEDIATYPE_Video, &GUID_NULL },
>+ { NULL }
>+ },
>+ },
>+ { 0xFFFFFFFF },
>+ }
>+ },
>+#endif
> { NULL } /* list terminator */
> };
>
>Index: dlls/quartz/main.c
>===================================================================
>RCS file: /home/wine/wine/dlls/quartz/main.c,v
>retrieving revision 1.47
>diff -u -r1.47 main.c
>--- dlls/quartz/main.c 6 Jun 2005 19:50:36 -0000 1.47
>+++ dlls/quartz/main.c 9 Jun 2005 21:54:37 -0000
>@@ -72,7 +72,10 @@
> { &CLSID_AVIDec, AVIDec_create },
> { &CLSID_SystemClock, &QUARTZ_CreateSystemClock },
> { &CLSID_ACMWrapper, &ACMWrapper_create },
>- { &CLSID_WAVEParser, &WAVEParser_create }
>+ { &CLSID_WAVEParser, &WAVEParser_create },
>+#ifdef HAVE_LIBAVCODEC
>+ { &CLSID_FFMpegVideoWrapper, &FFMpegVideoWrapper_create },
>+#endif
> };
>
> static HRESULT WINAPI
>
>
I think it would be better to always register the
CLSID_FFMpegVideoWrapper class and just make FFMpegVideoWrapper_create
fail if the libraries or headers aren't present. This will allow people
to install these at a later date and after a recompile have the filter
working, without having to re-register the DLL. It will also have the
advantage of decreasing the number of ugly ifdefs everywhere.
--
Rob Shearman