Added patch to return stub interface from mf.MFCreateMediaSession.

This commit is contained in:
Sebastian Lackner 2016-03-26 20:03:33 +01:00
parent 86f1e40597
commit 0e9f07b2b7
7 changed files with 687 additions and 2 deletions

View File

@ -0,0 +1,158 @@
From 105c927a195f2412e9eacaf07e6f904f7aa8f3a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 26 Mar 2016 04:20:03 +0100
Subject: include/mfidl.idl: Add IMFMediaSession interface and dependencies.
---
include/Makefile.in | 1 +
include/mfidl.idl | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+)
create mode 100644 include/mfidl.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index 8283616..2a9650d 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -85,6 +85,7 @@ IDL_SRCS = \
inspectable.idl \
mediaobj.idl \
metahost.idl \
+ mfidl.idl \
mfobjects.idl \
mimeinfo.idl \
mimeole.idl \
diff --git a/include/mfidl.idl b/include/mfidl.idl
new file mode 100644
index 0000000..3431260
--- /dev/null
+++ b/include/mfidl.idl
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2016 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "mfobjects.idl";
+
+typedef unsigned __int64 TOPOID;
+typedef LONGLONG MFTIME;
+
+typedef enum MF_TOPOLOGY_TYPE
+{
+ MF_TOPOLOGY_OUTPUT_NODE,
+ MF_TOPOLOGY_SOURCESTREAM_NODE,
+ MF_TOPOLOGY_TRANSFORM_NODE,
+ MF_TOPOLOGY_TEE_NODE,
+ MF_TOPOLOGY_MAX = 0xffffffff
+} MF_TOPOLOGY_TYPE;
+
+typedef enum _MFCLOCK_STATE
+{
+ MFCLOCK_STATE_INVALID,
+ MFCLOCK_STATE_RUNNING,
+ MFCLOCK_STATE_STOPPED,
+ MFCLOCK_STATE_PAUSED
+} MFCLOCK_STATE;
+
+typedef struct _MFCLOCK_PROPERTIES
+{
+ unsigned __int64 qwCorrelationRate;
+ GUID guidClockId;
+ DWORD dwClockFlags;
+ unsigned __int64 qwClockFrequency;
+ DWORD dwClockTolerance;
+ DWORD dwClockJitter;
+} MFCLOCK_PROPERTIES;
+
+[
+ object,
+ uuid(2eb1e945-18b8-4139-9b1a-d5d584818530),
+]
+interface IMFClock : IUnknown
+{
+ HRESULT GetClockCharacteristics([out] DWORD *characteristics);
+ HRESULT GetCorrelatedTime([in] DWORD reserved, [out] LONGLONG *clock_time, [out] MFTIME *system_time);
+ HRESULT GetContinuityKey([out] DWORD *key);
+ HRESULT GetState([in] DWORD reserved, [out] MFCLOCK_STATE *state);
+ HRESULT GetProperties([out] MFCLOCK_PROPERTIES *props);
+}
+
+[
+ object,
+ uuid(83cf873a-f6da-4bc8-823f-bacfd55dc430),
+]
+interface IMFTopologyNode : IMFAttributes
+{
+ HRESULT SetObject([in] IUnknown *object);
+ HRESULT GetObject([out] IUnknown **object);
+ HRESULT GetNodeType([out] MF_TOPOLOGY_TYPE *type);
+ HRESULT GetTopoNodeID([out] TOPOID *id);
+ HRESULT SetTopoNodeID([in] TOPOID id);
+ HRESULT GetInputCount([out] DWORD *count);
+ HRESULT GetOutputCount([out] DWORD *count);
+ [local] HRESULT ConnectOutput([in] DWORD output_index, [in] IMFTopologyNode *node, [in] DWORD input_index);
+ [local] HRESULT DisconnectOutput([in] DWORD index);
+ HRESULT GetInput([in] DWORD input_index, [out] IMFTopologyNode **node, [out] DWORD *output_index);
+ HRESULT GetOutput([in] DWORD output_index, [out] IMFTopologyNode **node, [out] DWORD *input_index);
+ [local] HRESULT SetOutputPrefType([in] DWORD index, [in] IMFMediaType *type);
+ [local] HRESULT GetOutputPrefType([in] DWORD output_index, [out] IMFMediaType **type);
+ [call_as(GetOutputPrefType)] HRESULT RemoteGetOutputPrefType([in] DWORD index, [out] DWORD *length,
+ [out, size_is(, *length)] BYTE **data);
+ [local] HRESULT SetInputPrefType([in] DWORD index, [in] IMFMediaType *type);
+ [local] HRESULT GetInputPrefType([in] DWORD index, [out] IMFMediaType **type);
+ [call_as(GetInputPrefType)] HRESULT RemoteGetInputPrefType([in] DWORD index, [out] DWORD *length,
+ [out, size_is(, *length)] BYTE **data);
+ HRESULT CloneFrom([in] IMFTopologyNode *node);
+}
+
+[
+ object,
+ uuid(83cf873a-f6da-4bc8-823f-bacfd55dc433),
+]
+interface IMFTopology : IMFAttributes
+{
+ HRESULT GetTopologyID([out] TOPOID *id);
+ [local] HRESULT AddNode([in] IMFTopologyNode *node);
+ [local] HRESULT RemoveNode([in] IMFTopologyNode *node);
+ HRESULT GetNodeCount([out] WORD *nodes);
+ HRESULT GetNode([in] WORD index, [out] IMFTopologyNode **node);
+ [local] HRESULT Clear();
+ HRESULT CloneFrom([in] IMFTopology *topology);
+ HRESULT GetNodeByID([in] TOPOID id, [out] IMFTopologyNode **node);
+ HRESULT GetSourceNodeCollection([out] IMFCollection **collection);
+ HRESULT GetOutputNodeCollection([out] IMFCollection **collection);
+}
+
+[
+ object,
+ uuid(90377834-21d0-4dee-8214-ba2e3e6c1127),
+]
+interface IMFMediaSession : IMFMediaEventGenerator
+{
+ HRESULT SetTopology([in] DWORD flags, [in] IMFTopology *topology);
+ HRESULT ClearTopologies();
+ HRESULT Start([in, unique] const GUID *format, [in, unique] const PROPVARIANT *start);
+ HRESULT Pause();
+ HRESULT Stop();
+ HRESULT Close();
+ HRESULT Shutdown();
+ HRESULT GetClock([out] IMFClock **clock);
+ HRESULT GetSessionCapabilities([out] DWORD *caps);
+ HRESULT GetFullTopology([in] DWORD flags, [in] TOPOID id, [out] IMFTopology **topology);
+}
--
2.7.1

View File

@ -0,0 +1,52 @@
From e10972fe82b97754ac4fcce78adb52e629b753f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 26 Mar 2016 04:22:16 +0100
Subject: mf: Add stub for MFCreateMediaSession.
---
dlls/mf/main.c | 15 +++++++++++++++
dlls/mf/mf.spec | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index 1b223ad..86f2774 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -21,6 +21,21 @@
#include "windef.h"
#include "winbase.h"
+#include "wine/debug.h"
+
+#include "mfidl.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mf);
+
+/***********************************************************************
+ * MFCreateMediaSession (mf.@)
+ */
+HRESULT WINAPI MFCreateMediaSession(IMFAttributes *configuration, IMFMediaSession **ms)
+{
+ FIXME("(%p, %p): stub\n", configuration, ms);
+
+ return E_NOTIMPL;
+}
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec
index 10b682a..546a697 100644
--- a/dlls/mf/mf.spec
+++ b/dlls/mf/mf.spec
@@ -39,7 +39,7 @@
@ stub MFCreateMP3MediaSink
@ stub MFCreateMPEG4MediaSink
@ stub MFCreateMediaProcessor
-@ stub MFCreateMediaSession
+@ stdcall MFCreateMediaSession(ptr ptr)
@ stub MFCreateNSCByteStreamPlugin
@ stub MFCreateNetSchemePlugin
@ stub MFCreatePMPHost
--
2.7.1

View File

@ -0,0 +1,27 @@
From 322b917bad2ab43eb5181a429f1360ce9aca384b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 26 Mar 2016 06:03:56 +0100
Subject: include/rpcndr.h: Fix definition of EXTERN_GUID.
---
include/rpcndr.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/rpcndr.h b/include/rpcndr.h
index f795566..9029950 100644
--- a/include/rpcndr.h
+++ b/include/rpcndr.h
@@ -45,9 +45,7 @@ extern "C" {
{ l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- const GUID DECLSPEC_SELECTANY name DECLSPEC_HIDDEN; \
- const GUID DECLSPEC_SELECTANY name = \
- { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
+ EXTERN_C const GUID name
#endif
#endif
--
2.7.1

View File

@ -0,0 +1,312 @@
From 5aba6883ef5c0566d489f04b912adbeccf2e2a57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 26 Mar 2016 06:05:20 +0100
Subject: mf: Implement IMFMediaSession stub interface.
---
dlls/mf/Makefile.in | 3 +-
dlls/mf/main.c | 5 +-
dlls/mf/mf_private.h | 28 +++++++
dlls/mf/session.c | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 254 insertions(+), 3 deletions(-)
create mode 100644 dlls/mf/mf_private.h
create mode 100644 dlls/mf/session.c
diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in
index d7fdb61..01e5fbf 100644
--- a/dlls/mf/Makefile.in
+++ b/dlls/mf/Makefile.in
@@ -1,4 +1,5 @@
MODULE = mf.dll
C_SRCS = \
- main.c
+ main.c \
+ session.c
diff --git a/dlls/mf/main.c b/dlls/mf/main.c
index 86f2774..702618f 100644
--- a/dlls/mf/main.c
+++ b/dlls/mf/main.c
@@ -23,7 +23,8 @@
#include "winbase.h"
#include "wine/debug.h"
-#include "mfidl.h"
+#include "initguid.h"
+#include "mf_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(mf);
@@ -34,7 +35,7 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *configuration, IMFMediaSessio
{
FIXME("(%p, %p): stub\n", configuration, ms);
- return E_NOTIMPL;
+ return create_session(ms);
}
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
diff --git a/dlls/mf/mf_private.h b/dlls/mf/mf_private.h
new file mode 100644
index 0000000..36c05e7
--- /dev/null
+++ b/dlls/mf/mf_private.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2016 Michael Müller
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_MF_MF_PRIVATE_H
+#define __WINE_MF_MF_PRIVATE_H
+
+#include "windef.h"
+#include "winbase.h"
+#include "mfidl.h"
+
+HRESULT create_session(IMFMediaSession **iface);
+
+#endif /* __WINE_MF_MF_PRIVATE_H */
diff --git a/dlls/mf/session.c b/dlls/mf/session.c
new file mode 100644
index 0000000..931e53a
--- /dev/null
+++ b/dlls/mf/session.c
@@ -0,0 +1,221 @@
+/*
+ * Copyright (C) 2016 Michael Müller
+ *
+ * iface library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * iface library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#define COBJMACROS
+#include "mf_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mf);
+
+struct media_session
+{
+ IMFMediaSession IMFMediaSession_iface;
+ LONG ref;
+};
+
+static inline struct media_session *impl_from_IMFMediaSession(IMFMediaSession *iface)
+{
+ return CONTAINING_RECORD(iface, struct media_session, IMFMediaSession_iface);
+}
+
+static HRESULT WINAPI session_QueryInterface(IMFMediaSession *iface, REFIID riid, void **ppvObject)
+{
+ struct media_session *This = impl_from_IMFMediaSession(iface);
+
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IMFMediaEventGenerator) ||
+ IsEqualGUID(riid, &IID_IMFMediaSession))
+ {
+ *ppvObject = iface;
+ }
+ else
+ {
+ TRACE("Unsupported interface %s\n", debugstr_guid(riid));
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IMFMediaSession_AddRef(iface);
+ return S_OK;
+}
+
+static ULONG WINAPI session_AddRef(IMFMediaSession *iface)
+{
+ struct media_session *This = impl_from_IMFMediaSession(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p)->(%d)\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI session_Release(IMFMediaSession *iface)
+{
+ struct media_session *This = impl_from_IMFMediaSession(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(%d)\n", This, ref);
+
+ if (!ref)
+ {
+ HeapFree(GetProcessHeap(), 0, This);
+ }
+
+ return ref;
+}
+
+static HRESULT WINAPI session_GetEvent(IMFMediaSession *iface, DWORD flags, IMFMediaEvent **event)
+{
+ FIXME("(%p, %d, %p): stub", iface, flags, event);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_BeginGetEvent(IMFMediaSession *iface, IMFAsyncCallback *callback, IUnknown *unk_state)
+{
+ FIXME("(%p, %p, %p): stub", iface, callback, unk_state);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_EndGetEvent(IMFMediaSession *iface, IMFAsyncResult *result, IMFMediaEvent **event)
+{
+ FIXME("(%p, %p, %p): stub", iface, result, event);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_QueueEvent(IMFMediaSession *iface, MediaEventType met, REFGUID extended_type, HRESULT status, const PROPVARIANT *value)
+{
+ FIXME("(%p, %d, %s, %x, %p): stub", iface, met, wine_dbgstr_guid(extended_type), status, value);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_SetTopology(IMFMediaSession *iface, DWORD flags, IMFTopology *topology)
+{
+ FIXME("(%p, %d, %p): stub", iface, flags, topology);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_ClearTopologies(IMFMediaSession *iface)
+{
+ FIXME("(%p): stub", iface);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_Start(IMFMediaSession *iface, const GUID *format, const PROPVARIANT *start)
+{
+ FIXME("(%p, %s, %p): stub", iface, wine_dbgstr_guid(format), start);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_Pause(IMFMediaSession *iface)
+{
+ FIXME("(%p): stub", iface);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_Stop(IMFMediaSession *iface)
+{
+ FIXME("(%p): stub", iface);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_Close(IMFMediaSession *iface)
+{
+ FIXME("(%p): stub", iface);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_Shutdown(IMFMediaSession *iface)
+{
+ FIXME("(%p): stub", iface);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_GetClock(IMFMediaSession *iface, IMFClock **clock)
+{
+ FIXME("(%p, %p): stub", iface, clock);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_GetSessionCapabilities(IMFMediaSession *iface, DWORD *caps)
+{
+ FIXME("(%p, %p): stub", iface, caps);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI session_GetFullTopology(IMFMediaSession *iface, DWORD flags, TOPOID id, IMFTopology **topology)
+{
+ FIXME("(%p, %d, %s, %p): stub", iface, flags, wine_dbgstr_longlong(id), topology);
+
+ return E_NOTIMPL;
+}
+
+static const IMFMediaSessionVtbl sessionVtbl =
+{
+ session_QueryInterface,
+ session_AddRef,
+ session_Release,
+ session_GetEvent,
+ session_BeginGetEvent,
+ session_EndGetEvent,
+ session_QueueEvent,
+ session_SetTopology,
+ session_ClearTopologies,
+ session_Start,
+ session_Pause,
+ session_Stop,
+ session_Close,
+ session_Shutdown,
+ session_GetClock,
+ session_GetSessionCapabilities,
+ session_GetFullTopology
+};
+
+HRESULT create_session(IMFMediaSession **iface)
+{
+ struct media_session *This;
+
+ This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This));
+ if (!This) return E_OUTOFMEMORY;
+
+ This->IMFMediaSession_iface.lpVtbl = &sessionVtbl;
+ This->ref = 1;
+
+ *iface = &This->IMFMediaSession_iface;
+ return S_OK;
+}
--
2.7.1

View File

@ -0,0 +1,122 @@
From 167ad8ca49542661a75697874f1375bd6a93ca74 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 26 Mar 2016 14:31:03 +0100
Subject: mfplat: Add stub for MFCreateSourceResolver.
---
dlls/mf/mf.spec | 2 +-
dlls/mfplat/main.c | 11 +++++++++++
dlls/mfplat/mfplat.spec | 2 +-
include/mfidl.idl | 40 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec
index 546a697..f70538e 100644
--- a/dlls/mf/mf.spec
+++ b/dlls/mf/mf.spec
@@ -57,7 +57,7 @@
@ stub MFCreateSequencerSource
@ stub MFCreateSequencerSourceRemoteStream
@ stub MFCreateSimpleTypeHandler
-@ stub MFCreateSourceResolver
+@ stdcall MFCreateSourceResolver(ptr) mfplat.MFCreateSourceResolver
@ stub MFCreateStandardQualityManager
@ stub MFCreateTopoLoader
@ stub MFCreateTopology
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 3d029d8..7daeded 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -30,6 +30,7 @@
#include "initguid.h"
#include "mfapi.h"
#include "mferror.h"
+#include "mfidl.h"
#include "wine/debug.h"
#include "wine/unicode.h"
@@ -522,3 +523,13 @@ HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
*ret = &plugin_control;
return S_OK;
}
+
+/***********************************************************************
+ * MFCreateSourceResolver (mfplat.@)
+ */
+HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **source_resolver)
+{
+ FIXME("(%p): stub\n", source_resolver);
+
+ return E_NOTIMPL;
+}
diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec
index cb16e8c..e1ef001 100644
--- a/dlls/mfplat/mfplat.spec
+++ b/dlls/mfplat/mfplat.spec
@@ -58,7 +58,7 @@
@ stub MFCreateSample
@ stub MFCreateSocket
@ stub MFCreateSocketListener
-@ stub MFCreateSourceResolver
+@ stdcall MFCreateSourceResolver(ptr)
@ stub MFCreateStreamDescriptor
@ stub MFCreateSystemTimeSource
@ stub MFCreateSystemUnderlyingClock
diff --git a/include/mfidl.idl b/include/mfidl.idl
index 3431260..a99b02e 100644
--- a/include/mfidl.idl
+++ b/include/mfidl.idl
@@ -48,6 +48,13 @@ typedef struct _MFCLOCK_PROPERTIES
DWORD dwClockJitter;
} MFCLOCK_PROPERTIES;
+typedef enum MF_OBJECT_TYPE
+{
+ MF_OBJECT_MEDIASOURCE,
+ MF_OBJECT_BYTESTREAM,
+ MF_OBJECT_INVALID
+} MF_OBJECT_TYPE;
+
[
object,
uuid(2eb1e945-18b8-4139-9b1a-d5d584818530),
@@ -124,3 +131,36 @@ interface IMFMediaSession : IMFMediaEventGenerator
HRESULT GetSessionCapabilities([out] DWORD *caps);
HRESULT GetFullTopology([in] DWORD flags, [in] TOPOID id, [out] IMFTopology **topology);
}
+
+[
+ object,
+ uuid(fbe5a32d-a497-4b61-bb85-97b1a848a6e3),
+]
+interface IMFSourceResolver : IUnknown
+{
+ [local] HRESULT CreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags, [in] IPropertyStore *props,
+ [out] MF_OBJECT_TYPE *type, [out] IUnknown **object);
+ [local] HRESULT CreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url,
+ [in] DWORD flags, [in] IPropertyStore *props,
+ [out] MF_OBJECT_TYPE *type, [out] IUnknown **object);
+ [local] HRESULT BeginCreateObjectFromURL([in] const WCHAR *url, [in] DWORD flags,
+ [in] IPropertyStore *props, [out] IUnknown **cancel_cookie,
+ [in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
+ [call_as(BeginCreateObjectFromURL)] HRESULT RemoteBeginCreateObjectFromURL([in, string] const WCHAR *url,
+ [in] DWORD flags, [in] IPropertyStore *props, [in] IMFRemoteAsyncCallback *callback);
+ [local] HRESULT EndCreateObjectFromURL([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *type,
+ [out] IUnknown **object);
+ [call_as(EndCreateObjectFromURL)] HRESULT RemoteEndCreateObjectFromURL([in] IUnknown *result,
+ [out] MF_OBJECT_TYPE *type, [out] IUnknown **object);
+ [local] HRESULT BeginCreateObjectFromByteStream([in] IMFByteStream *stream, [in] const WCHAR *url,
+ [in] DWORD flags, [in] IPropertyStore *props, [out] IUnknown **cancel_cookie,
+ [in] IMFAsyncCallback *callback, [in] IUnknown *unk_state);
+ [call_as(BeginCreateObjectFromByteStream)] HRESULT RemoteBeginCreateObjectFromByteStream(
+ [in] IMFByteStream *stream, [in, unique] const WCHAR *url, [in] DWORD flags,
+ [in, unique] IPropertyStore *props, [in] IMFRemoteAsyncCallback *callback);
+ [local] HRESULT EndCreateObjectFromByteStream([in] IMFAsyncResult *result, [out] MF_OBJECT_TYPE *type,
+ [out] IUnknown **object);
+ [call_as(EndCreateObjectFromByteStream)] HRESULT RemoteEndCreateObjectFromByteStream([in] IUnknown *result,
+ [out] MF_OBJECT_TYPE *type, [out] IUnknown **object);
+ [local] HRESULT CancelObjectCreation([in] IUnknown *cancel_cookie);
+}
--
2.7.1

View File

@ -1,3 +1,5 @@
Fixes: [37811] Add implementation for mfplat.MFTRegister
Fixes: [39309] Add implementation for mfplat.MFTEnum
Fixes: [39367] Return stub interface from mf.MFCreateMediaSession
Category: stable

View File

@ -4439,21 +4439,33 @@ fi
# | This patchset fixes the following Wine bugs:
# | * [#37811] Add implementation for mfplat.MFTRegister
# | * [#39309] Add implementation for mfplat.MFTEnum
# | * [#39367] Return stub interface from mf.MFCreateMediaSession
# |
# | Modified files:
# | * configure.ac, dlls/mfplat/Makefile.in, dlls/mfplat/main.c, dlls/mfplat/mfplat.spec, dlls/mfplat/tests/Makefile.in,
# | dlls/mfplat/tests/mfplat.c, loader/wine.inf.in
# | * configure.ac, dlls/mf/Makefile.in, dlls/mf/main.c, dlls/mf/mf.spec, dlls/mf/mf_private.h, dlls/mf/session.c,
# | dlls/mfplat/Makefile.in, dlls/mfplat/main.c, dlls/mfplat/mfplat.spec, dlls/mfplat/tests/Makefile.in,
# | dlls/mfplat/tests/mfplat.c, include/Makefile.in, include/mfidl.idl, include/rpcndr.h, loader/wine.inf.in
# |
if test "$enable_mfplat_MFTRegister" -eq 1; then
patch_apply mfplat-MFTRegister/0001-mfplat-Implement-MFTRegister.patch
patch_apply mfplat-MFTRegister/0002-mfplat-Implement-MFTUnregister.patch
patch_apply mfplat-MFTRegister/0003-mfplat-Implement-MFTEnum.patch
patch_apply mfplat-MFTRegister/0004-mfplat-tests-Add-tests.patch
patch_apply mfplat-MFTRegister/0005-include-mfidl.idl-Add-IMFMediaSession-interface-and-.patch
patch_apply mfplat-MFTRegister/0006-mf-Add-stub-for-MFCreateMediaSession.patch
patch_apply mfplat-MFTRegister/0007-include-rpcndr.h-Fix-definition-of-EXTERN_GUID.patch
patch_apply mfplat-MFTRegister/0008-mf-Implement-IMFMediaSession-stub-interface.patch
patch_apply mfplat-MFTRegister/0009-mfplat-Add-stub-for-MFCreateSourceResolver.patch
(
echo '+ { "Michael Müller", "mfplat: Implement MFTRegister.", 2 },';
echo '+ { "Michael Müller", "mfplat: Implement MFTUnregister.", 1 },';
echo '+ { "Michael Müller", "mfplat: Implement MFTEnum.", 1 },';
echo '+ { "Michael Müller", "mfplat/tests: Add tests.", 1 },';
echo '+ { "Michael Müller", "include/mfidl.idl: Add IMFMediaSession interface and dependencies.", 1 },';
echo '+ { "Michael Müller", "mf: Add stub for MFCreateMediaSession.", 1 },';
echo '+ { "Michael Müller", "include/rpcndr.h: Fix definition of EXTERN_GUID.", 1 },';
echo '+ { "Michael Müller", "mf: Implement IMFMediaSession stub interface.", 1 },';
echo '+ { "Michael Müller", "mfplat: Add stub for MFCreateSourceResolver.", 1 },';
) >> "$patchlist"
fi