[MPlayer-dev-eng] Compiling MPlayer under Wine

Ingo Brückl ib at wupperonline.de
Sat Oct 8 15:13:43 CEST 2011


I wrote on Sat, 08 Oct 2011 04:16:02 +0200:

> Reimar Döffinger wrote on Fri, 7 Oct 2011 19:11:59 +0200:

>> Wine's DEFINE_GUID is incompatible with that code.

> Oh. Now I see.

>> Ugly hack, but you could try changing
>> static DEFINE_GUID(CLSID_SampleGrabber
>> to
>> DEFINE_GUID(static CLSID_SampleGrabber
>> etc.

> Since Wine defines DEFINE_GUID using DECLSPEC_HIDDEN, this should be an
> un-ugly patch, shouldn't it?

#5: This is the final patch for stream/tvi_dshow.c, also handling the VARIANT
    issue.

#6: A new patch, necessary after stream/tvi_dshow.c compiles now, because a
    new error arised:

    loader/dshow/DS_Filter.o:(.rodata+0x10): multiple definition of `IID_IClassFactory'
    stream/tvi_dshow.o:(.rodata+0x10): first defined here
    loader/dshow/DS_Filter.o:(.rodata+0x0): multiple definition of `IID_IUnknown'
    stream/tvi_dshow.o:(.rodata+0x0): first defined here

    The Wine header not only declares these IIDs, but defines them, so
    redefining must be avoided.

Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winegcc.5.patch
Type: text/x-diff
Size: 11130 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20111008/d860c68b/attachment.bin>
-------------- next part --------------
--- loader/dshow/DS_Filter.c	2011-01-18 11:38:59.000000000 +0100
+++ /home/ib/mplayer/loader/dshow/DS_Filter.c	2011-10-08 17:47:25.000000000 +0200
@@ -16,6 +16,7 @@
 typedef long STDCALL (*GETCLASS) (const GUID*, const GUID*, void**);
 
 #ifndef WIN32_LOADER
+#ifndef __WINE__
 const GUID IID_IUnknown =
 {
     0x00000000, 0x0000, 0x0000,
@@ -26,6 +27,7 @@
     0x00000001, 0x0000, 0x0000,
     {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}
 };
+#endif
 
 HRESULT STDCALL CoInitialize(LPVOID pvReserved);
 void STDCALL CoUninitialize(void);


More information about the MPlayer-dev-eng mailing list