Updated mfplat-MFCreateSample patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-08-28 19:28:13 +10:00
parent a043977b12
commit 412e20cd9a
3 changed files with 27 additions and 26 deletions

View File

@ -1,15 +1,15 @@
From 196f84dc6312d65fb3f5c2eeb3c7683eb295234e Mon Sep 17 00:00:00 2001
From 2c97bba1bdd02bb72d185635c7f162024be521b4 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 23 Aug 2018 12:22:07 +1000
Subject: [PATCH 1/3] mfplat: Forward IMFMediaType to IMFAttributes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/mfplat/main.c | 165 +++++++++++++----------------------------------------
1 file changed, 41 insertions(+), 124 deletions(-)
dlls/mfplat/main.c | 166 ++++++++++++---------------------------------
1 file changed, 42 insertions(+), 124 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index df61f3c..daae13c 100644
index df61f3cdc9..744f074b56 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -31,7 +31,7 @@
@ -34,19 +34,20 @@ index df61f3c..daae13c 100644
/***********************************************************************
* MFCreateAttributes (mfplat.@)
*/
@@ -903,10 +909,8 @@ HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
@@ -903,10 +909,9 @@ HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
if(!object)
return E_OUTOFMEMORY;
- object->ref = 1;
- object->IMFAttributes_iface.lpVtbl = &mfattributes_vtbl;
-
+ init_attribute_object(object, size);
- *attributes = &object->IMFAttributes_iface;
*attributes = &object->IMFAttributes_iface;
+
return S_OK;
}
@@ -1077,6 +1081,7 @@ HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver)
@@ -1077,6 +1082,7 @@ HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver)
typedef struct _mfmediatype
{
@ -54,7 +55,7 @@ index df61f3c..daae13c 100644
IMFMediaType IMFMediaType_iface;
LONG ref;
} mfmediatype;
@@ -1137,269 +1142,179 @@ static ULONG WINAPI mediatype_Release(IMFMediaType *iface)
@@ -1137,269 +1143,179 @@ static ULONG WINAPI mediatype_Release(IMFMediaType *iface)
static HRESULT WINAPI mediatype_GetItem(IMFMediaType *iface, REFGUID key, PROPVARIANT *value)
{
mfmediatype *This = impl_from_IMFMediaType(iface);
@ -353,7 +354,7 @@ index df61f3c..daae13c 100644
}
static HRESULT WINAPI mediatype_CopyAllItems(IMFMediaType *iface, IMFAttributes *dest)
@@ -1510,14 +1425,16 @@ HRESULT WINAPI MFCreateMediaType(IMFMediaType **type)
@@ -1510,14 +1426,16 @@ HRESULT WINAPI MFCreateMediaType(IMFMediaType **type)
if(!type)
return E_INVALIDARG;
@ -372,5 +373,5 @@ index df61f3c..daae13c 100644
}
--
1.9.1
2.18.0

View File

@ -1,18 +1,18 @@
From e6a5f46310c08c6d5ce5e59c0589c55b8b26acc7 Mon Sep 17 00:00:00 2001
From 5b24c81c4c5146f86ab94de67983ace35b967802 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 24 Aug 2018 09:48:43 +1000
Subject: [PATCH 2/3] mfplat: Forward IMFStreamDescriptor to IMFAttributes
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/mfplat/main.c | 154 ++++++++++++-----------------------------------------
dlls/mfplat/main.c | 154 ++++++++++-----------------------------------
1 file changed, 33 insertions(+), 121 deletions(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index daae13c..a8ff335 100644
index 744f074b56..ce5d446bfb 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -1598,6 +1598,7 @@ HRESULT WINAPI MFCreateEventQueue(IMFMediaEventQueue **queue)
@@ -1599,6 +1599,7 @@ HRESULT WINAPI MFCreateEventQueue(IMFMediaEventQueue **queue)
typedef struct _mfdescriptor
{
@ -20,7 +20,7 @@ index daae13c..a8ff335 100644
IMFStreamDescriptor IMFStreamDescriptor_iface;
LONG ref;
} mfdescriptor;
@@ -1658,269 +1659,179 @@ static ULONG WINAPI mfdescriptor_Release(IMFStreamDescriptor *iface)
@@ -1659,269 +1660,179 @@ static ULONG WINAPI mfdescriptor_Release(IMFStreamDescriptor *iface)
static HRESULT WINAPI mfdescriptor_GetItem(IMFStreamDescriptor *iface, REFGUID key, PROPVARIANT *value)
{
mfdescriptor *This = impl_from_IMFStreamDescriptor(iface);
@ -320,7 +320,7 @@ index daae13c..a8ff335 100644
}
static HRESULT WINAPI mfdescriptor_CopyAllItems(IMFStreamDescriptor *iface, IMFAttributes *dest)
@@ -2002,7 +1913,8 @@ HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD count,
@@ -2003,7 +1914,8 @@ HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD count,
object->ref = 1;
object->IMFStreamDescriptor_iface.lpVtbl = &mfdescriptor_vtbl;
@ -331,5 +331,5 @@ index daae13c..a8ff335 100644
return S_OK;
}
--
1.9.1
2.18.0

View File

@ -1,4 +1,4 @@
From 026fd3d295164d0caf4d6d3ba65927b6c94d61b8 Mon Sep 17 00:00:00 2001
From befe5cfba7094d1be9b71de2ea11b62de411fd7a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 24 Aug 2018 10:32:26 +1000
Subject: [PATCH 3/3] mfplat: Implement MFCreateSample
@ -6,17 +6,17 @@ Subject: [PATCH 3/3] mfplat: Implement MFCreateSample
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45617
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/mfplat/main.c | 445 +++++++++++++++++++++++++++++++++++++++++++++
dlls/mfplat/main.c | 445 +++++++++++++++++++++++++++++++++++++
dlls/mfplat/mfplat.spec | 2 +-
dlls/mfplat/tests/mfplat.c | 16 ++
include/mfapi.h | 1 +
4 files changed, 463 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index a8ff335..e429324 100644
index ce5d446bfb..5cc84a0566 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -1918,3 +1918,448 @@ HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD count,
@@ -1919,3 +1919,448 @@ HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD count,
return S_OK;
}
@ -466,7 +466,7 @@ index a8ff335..e429324 100644
+ return S_OK;
+}
diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec
index a66f4d1..0ad15a5 100644
index a66f4d1817..0ad15a5f10 100644
--- a/dlls/mfplat/mfplat.spec
+++ b/dlls/mfplat/mfplat.spec
@@ -55,7 +55,7 @@
@ -479,7 +479,7 @@ index a66f4d1..0ad15a5 100644
@ stub MFCreateSocketListener
@ stdcall MFCreateSourceResolver(ptr)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c
index f3a4521..f5a3197 100644
index f3a452179b..f5a3197d73 100644
--- a/dlls/mfplat/tests/mfplat.c
+++ b/dlls/mfplat/tests/mfplat.c
@@ -250,6 +250,21 @@ static void test_MFCreateAttributes(void)
@ -513,7 +513,7 @@ index f3a4521..f5a3197 100644
CoUninitialize();
}
diff --git a/include/mfapi.h b/include/mfapi.h
index 5aead1e..978726b 100644
index 5aead1e0bc..978726b358 100644
--- a/include/mfapi.h
+++ b/include/mfapi.h
@@ -67,6 +67,7 @@ HRESULT WINAPI MFCancelWorkItem(MFWORKITEM_KEY key);
@ -525,5 +525,5 @@ index 5aead1e..978726b 100644
HRESULT WINAPI MFTEnum(GUID category, UINT32 flags, MFT_REGISTER_TYPE_INFO *input_type,
MFT_REGISTER_TYPE_INFO *output_type, IMFAttributes *attributes,
--
1.9.1
2.18.0