Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a1d3a7f7
Commit
a1d3a7f7
authored
May 28, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Return stub IMFSourceResolver from MFCreateSourceResolver().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
008a2fa0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
210 additions
and
3 deletions
+210
-3
mf.spec
dlls/mf/mf.spec
+1
-1
main.c
dlls/mfplat/main.c
+167
-1
mfplat.spec
dlls/mfplat/mfplat.spec
+1
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+39
-0
mfidl.idl
include/mfidl.idl
+2
-0
No files found.
dlls/mf/mf.spec
View file @
a1d3a7f7
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
@ stub MFCreateSequencerSource
@ stub MFCreateSequencerSource
@ stub MFCreateSequencerSourceRemoteStream
@ stub MFCreateSequencerSourceRemoteStream
@ stub MFCreateSimpleTypeHandler
@ stub MFCreateSimpleTypeHandler
@ st
ub
MFCreateSourceResolver
@ st
dcall MFCreateSourceResolver(ptr) mfplat.
MFCreateSourceResolver
@ stub MFCreateStandardQualityManager
@ stub MFCreateStandardQualityManager
@ stub MFCreateTopoLoader
@ stub MFCreateTopoLoader
@ stub MFCreateTopology
@ stub MFCreateTopology
...
...
dlls/mfplat/main.c
View file @
a1d3a7f7
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "initguid.h"
#include "initguid.h"
#include "mfapi.h"
#include "mfapi.h"
#include "mfidl.h"
#include "mferror.h"
#include "mferror.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -869,7 +870,7 @@ static const IMFAttributesVtbl mfattributes_vtbl =
...
@@ -869,7 +870,7 @@ static const IMFAttributesVtbl mfattributes_vtbl =
};
};
/***********************************************************************
/***********************************************************************
* MF
MF
CreateAttributes (mfplat.@)
* MFCreateAttributes (mfplat.@)
*/
*/
HRESULT
WINAPI
MFCreateAttributes
(
IMFAttributes
**
attributes
,
UINT32
size
)
HRESULT
WINAPI
MFCreateAttributes
(
IMFAttributes
**
attributes
,
UINT32
size
)
{
{
...
@@ -887,3 +888,168 @@ HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
...
@@ -887,3 +888,168 @@ HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
*
attributes
=
&
object
->
IMFAttributes_iface
;
*
attributes
=
&
object
->
IMFAttributes_iface
;
return
S_OK
;
return
S_OK
;
}
}
typedef
struct
_mfsourceresolver
{
IMFSourceResolver
IMFSourceResolver_iface
;
LONG
ref
;
}
mfsourceresolver
;
static
inline
mfsourceresolver
*
impl_from_IMFSourceResolver
(
IMFSourceResolver
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
mfsourceresolver
,
IMFSourceResolver_iface
);
}
static
HRESULT
WINAPI
mfsourceresolver_QueryInterface
(
IMFSourceResolver
*
iface
,
REFIID
riid
,
void
**
obj
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
TRACE
(
"(%p->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFSourceResolver
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
&
This
->
IMFSourceResolver_iface
;
}
else
{
*
obj
=
NULL
;
FIXME
(
"unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
obj
);
return
S_OK
;
}
static
ULONG
WINAPI
mfsourceresolver_AddRef
(
IMFSourceResolver
*
iface
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
mfsourceresolver_Release
(
IMFSourceResolver
*
iface
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
mfsourceresolver_CreateObjectFromURL
(
IMFSourceResolver
*
iface
,
const
WCHAR
*
url
,
DWORD
flags
,
IPropertyStore
*
props
,
MF_OBJECT_TYPE
*
obj_type
,
IUnknown
**
object
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%s, %#x, %p, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
url
),
flags
,
props
,
obj_type
,
object
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_CreateObjectFromByteStream
(
IMFSourceResolver
*
iface
,
IMFByteStream
*
stream
,
const
WCHAR
*
url
,
DWORD
flags
,
IPropertyStore
*
props
,
MF_OBJECT_TYPE
*
obj_type
,
IUnknown
**
object
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%p, %s, %#x, %p, %p, %p): stub
\n
"
,
This
,
stream
,
debugstr_w
(
url
),
flags
,
props
,
obj_type
,
object
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_BeginCreateObjectFromURL
(
IMFSourceResolver
*
iface
,
const
WCHAR
*
url
,
DWORD
flags
,
IPropertyStore
*
props
,
IUnknown
**
cancel_cookie
,
IMFAsyncCallback
*
callback
,
IUnknown
*
unk_state
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%s, %#x, %p, %p, %p, %p): stub
\n
"
,
This
,
debugstr_w
(
url
),
flags
,
props
,
cancel_cookie
,
callback
,
unk_state
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_EndCreateObjectFromURL
(
IMFSourceResolver
*
iface
,
IMFAsyncResult
*
result
,
MF_OBJECT_TYPE
*
obj_type
,
IUnknown
**
object
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%p, %p, %p): stub
\n
"
,
This
,
result
,
obj_type
,
object
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_BeginCreateObjectFromByteStream
(
IMFSourceResolver
*
iface
,
IMFByteStream
*
stream
,
const
WCHAR
*
url
,
DWORD
flags
,
IPropertyStore
*
props
,
IUnknown
**
cancel_cookie
,
IMFAsyncCallback
*
callback
,
IUnknown
*
unk_state
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%p, %s, %#x, %p, %p, %p, %p): stub
\n
"
,
This
,
stream
,
debugstr_w
(
url
),
flags
,
props
,
cancel_cookie
,
callback
,
unk_state
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_EndCreateObjectFromByteStream
(
IMFSourceResolver
*
iface
,
IMFAsyncResult
*
result
,
MF_OBJECT_TYPE
*
obj_type
,
IUnknown
**
object
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%p, %p, %p): stub
\n
"
,
This
,
result
,
obj_type
,
object
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
mfsourceresolver_CancelObjectCreation
(
IMFSourceResolver
*
iface
,
IUnknown
*
cancel_cookie
)
{
mfsourceresolver
*
This
=
impl_from_IMFSourceResolver
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
cancel_cookie
);
return
E_NOTIMPL
;
}
static
const
IMFSourceResolverVtbl
mfsourceresolvervtbl
=
{
mfsourceresolver_QueryInterface
,
mfsourceresolver_AddRef
,
mfsourceresolver_Release
,
mfsourceresolver_CreateObjectFromURL
,
mfsourceresolver_CreateObjectFromByteStream
,
mfsourceresolver_BeginCreateObjectFromURL
,
mfsourceresolver_EndCreateObjectFromURL
,
mfsourceresolver_BeginCreateObjectFromByteStream
,
mfsourceresolver_EndCreateObjectFromByteStream
,
mfsourceresolver_CancelObjectCreation
,
};
/***********************************************************************
* MFCreateSourceResolver (mfplat.@)
*/
HRESULT
WINAPI
MFCreateSourceResolver
(
IMFSourceResolver
**
resolver
)
{
mfsourceresolver
*
object
;
TRACE
(
"%p
\n
"
,
resolver
);
if
(
!
resolver
)
return
E_POINTER
;
object
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
object
)
);
if
(
!
object
)
return
E_OUTOFMEMORY
;
object
->
IMFSourceResolver_iface
.
lpVtbl
=
&
mfsourceresolvervtbl
;
object
->
ref
=
1
;
*
resolver
=
&
object
->
IMFSourceResolver_iface
;
return
S_OK
;
}
dlls/mfplat/mfplat.spec
View file @
a1d3a7f7
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
@ stub MFCreateSample
@ stub MFCreateSample
@ stub MFCreateSocket
@ stub MFCreateSocket
@ stub MFCreateSocketListener
@ stub MFCreateSocketListener
@ st
ub MFCreateSourceResolver
@ st
dcall MFCreateSourceResolver(ptr)
@ stub MFCreateStreamDescriptor
@ stub MFCreateStreamDescriptor
@ stub MFCreateSystemTimeSource
@ stub MFCreateSystemTimeSource
@ stub MFCreateSystemUnderlyingClock
@ stub MFCreateSystemUnderlyingClock
...
...
dlls/mfplat/tests/mfplat.c
View file @
a1d3a7f7
...
@@ -30,10 +30,13 @@
...
@@ -30,10 +30,13 @@
#include "initguid.h"
#include "initguid.h"
#include "mfapi.h"
#include "mfapi.h"
#include "mfidl.h"
#include "mferror.h"
#include "mferror.h"
#include "wine/test.h"
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
pMFCreateSourceResolver
)(
IMFSourceResolver
**
resolver
);
DEFINE_GUID
(
MFT_CATEGORY_OTHER
,
0x90175d57
,
0xb7ea
,
0x4901
,
0xae
,
0xb3
,
0x93
,
0x3a
,
0x87
,
0x47
,
0x75
,
0x6f
);
DEFINE_GUID
(
MFT_CATEGORY_OTHER
,
0x90175d57
,
0xb7ea
,
0x4901
,
0xae
,
0xb3
,
0x93
,
0x3a
,
0x87
,
0x47
,
0x75
,
0x6f
);
DEFINE_GUID
(
DUMMY_CLSID
,
0x12345678
,
0x1234
,
0x1234
,
0x12
,
0x13
,
0x14
,
0x15
,
0x16
,
0x17
,
0x18
,
0x19
);
DEFINE_GUID
(
DUMMY_CLSID
,
0x12345678
,
0x1234
,
0x1234
,
0x12
,
0x13
,
0x14
,
0x15
,
0x16
,
0x17
,
0x18
,
0x19
);
...
@@ -154,12 +157,48 @@ if(0)
...
@@ -154,12 +157,48 @@ if(0)
ok
(
ret
==
S_OK
||
broken
(
ret
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)),
"got %x
\n
"
,
ret
);
ok
(
ret
==
S_OK
||
broken
(
ret
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)),
"got %x
\n
"
,
ret
);
}
}
static
void
test_source_resolver
(
void
)
{
IMFSourceResolver
*
resolver
,
*
resolver2
;
HRESULT
hr
;
if
(
!
pMFCreateSourceResolver
)
{
win_skip
(
"MFCreateSourceResolver() not found
\n
"
);
return
;
}
hr
=
pMFCreateSourceResolver
(
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
hr
=
pMFCreateSourceResolver
(
&
resolver
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
pMFCreateSourceResolver
(
&
resolver2
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
ok
(
resolver
!=
resolver2
,
"Expected new instance
\n
"
);
IMFSourceResolver_Release
(
resolver
);
IMFSourceResolver_Release
(
resolver2
);
}
static
void
init_functions
(
void
)
{
HMODULE
mod
=
GetModuleHandleA
(
"mfplat.dll"
);
#define X(f) if (!(p##f = (void*)GetProcAddress(mod, #f))) return;
X
(
MFCreateSourceResolver
);
#undef X
}
START_TEST
(
mfplat
)
START_TEST
(
mfplat
)
{
{
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
init_functions
();
test_register
();
test_register
();
test_source_resolver
();
CoUninitialize
();
CoUninitialize
();
}
}
include/mfidl.idl
View file @
a1d3a7f7
...
@@ -162,3 +162,5 @@ interface IMFSourceResolver : IUnknown
...
@@ -162,3 +162,5 @@ interface IMFSourceResolver : IUnknown
[
out
]
MF_OBJECT_TYPE
*
obj_type
,
[
out
]
IUnknown
**
object
)
;
[
out
]
MF_OBJECT_TYPE
*
obj_type
,
[
out
]
IUnknown
**
object
)
;
[
local
]
HRESULT
CanceObjectCreation
(
[
in
]
IUnknown
*
cancel_cookie
)
;
[
local
]
HRESULT
CanceObjectCreation
(
[
in
]
IUnknown
*
cancel_cookie
)
;
}
}
cpp_quote
(
"HRESULT WINAPI MFCreateSourceResolver(IMFSourceResolver **resolver);"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment