Module: wine Branch: master Commit: b6d3e2ba0e89f56854bbbb593c73725f002d0b9f URL: https://gitlab.winehq.org/wine/wine/-/commit/b6d3e2ba0e89f56854bbbb593c73725...
Author: Zebediah Figura zfigura@codeweavers.com Date: Wed Sep 6 12:40:53 2023 -0500
include: Do not import strmif.idl in mediaobj.idl.
This means that mfobjects.idl no longer pulls in mediaobj.idl. Since it still needs AM_MEDIA_TYPE to be declared (though not defined), add a typedef.
Reorder includes in a couple files to avoid multiple-definition errors. strmiids and mfplat were getting strmif.h through mfobjects.h, and dsdmo was getting it through dmo.h.
---
dlls/dsdmo/main.c | 1 + dlls/mfplat/mediatype.c | 1 + include/mediaobj.idl | 7 ++++++- include/mfapi.h | 1 + libs/strmiids/evr.c | 5 ++++- 5 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c index 2393b92185e..0879c4e0516 100644 --- a/dlls/dsdmo/main.c +++ b/dlls/dsdmo/main.c @@ -21,6 +21,7 @@ #include "mmreg.h" #include "mmsystem.h" #include "uuids.h" +#include "strmif.h" #include "initguid.h" #include "medparam.h" #include "dsound.h" diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index 16854c7a5a4..eed06ef02ef 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -22,6 +22,7 @@
#include "dxva2api.h" #include "uuids.h" +#include "strmif.h" #include "initguid.h" #include "ks.h" #include "ksmedia.h" diff --git a/include/mediaobj.idl b/include/mediaobj.idl index 4c2e4963174..127b95e7fc3 100644 --- a/include/mediaobj.idl +++ b/include/mediaobj.idl @@ -19,8 +19,10 @@
import "unknwn.idl"; import "objidl.idl"; -import "strmif.idl";
+cpp_quote("#ifdef __strmif_h__") +cpp_quote("typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;") +cpp_quote("#else") typedef struct _DMOMediaType { GUID majortype; @@ -34,6 +36,9 @@ typedef struct _DMOMediaType BYTE *pbFormat; } DMO_MEDIA_TYPE;
+typedef LONGLONG REFERENCE_TIME; +cpp_quote("#endif") + /***************************************************************************** * IEnumDMO interface */ diff --git a/include/mfapi.h b/include/mfapi.h index 3185fc6944f..105b093893f 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -507,6 +507,7 @@ typedef enum
struct tagVIDEOINFOHEADER; typedef struct tagVIDEOINFOHEADER VIDEOINFOHEADER; +typedef struct _AMMediaType AM_MEDIA_TYPE;
HRESULT WINAPI MFAddPeriodicCallback(MFPERIODICCALLBACK callback, IUnknown *context, DWORD *key); HRESULT WINAPI MFAllocateSerialWorkQueue(DWORD target_queue, DWORD *queue); diff --git a/libs/strmiids/evr.c b/libs/strmiids/evr.c index 74ec145e4d4..3213b054a46 100644 --- a/libs/strmiids/evr.c +++ b/libs/strmiids/evr.c @@ -16,9 +16,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-/* Don't define those GUIDs here */ +/* strmiids needs guids from evr.idl, but not the rest of the MF guids. + * We also need to avoid redefining the rest of the DirectShow guids from + * strmif.h. */ #include "propidl.h" #include "mfidl.h" +#include "strmif.h"
#include "initguid.h"