Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2f166690
Commit
2f166690
authored
Mar 04, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Implement MFShutdownObject().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b22b28e2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
1 deletion
+97
-1
main.c
dlls/mf/main.c
+18
-0
mf.spec
dlls/mf/mf.spec
+1
-1
mf.c
dlls/mf/tests/mf.c
+61
-0
mfidl.idl
include/mfidl.idl
+17
-0
No files found.
dlls/mf/main.c
View file @
2f166690
...
...
@@ -74,3 +74,21 @@ HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID riid, void
IMFGetService_Release
(
gs
);
return
hr
;
}
/***********************************************************************
* MFShutdownObject (mf.@)
*/
HRESULT
WINAPI
MFShutdownObject
(
IUnknown
*
object
)
{
IMFShutdown
*
shutdown
;
TRACE
(
"%p.
\n
"
,
object
);
if
(
object
&&
SUCCEEDED
(
IUnknown_QueryInterface
(
object
,
&
IID_IMFShutdown
,
(
void
**
)
&
shutdown
)))
{
IMFShutdown_Shutdown
(
shutdown
);
IMFShutdown_Release
(
shutdown
);
}
return
S_OK
;
}
dlls/mf/mf.spec
View file @
2f166690
...
...
@@ -78,6 +78,6 @@
@ stub MFGetTopoNodeCurrentType
@ stub MFReadSequencerSegmentOffset
@ stub MFRequireProtectedEnvironment
@ st
ub MFShutdownObject
@ st
dcall MFShutdownObject(ptr)
@ stub MFTranscodeGetAudioOutputAvailableTypes
@ stub MergePropertyStore
dlls/mf/tests/mf.c
View file @
2f166690
...
...
@@ -502,6 +502,66 @@ static void test_topology_loader(void)
IMFTopoLoader_Release
(
loader
);
}
static
HRESULT
WINAPI
testshutdown_QueryInterface
(
IMFShutdown
*
iface
,
REFIID
riid
,
void
**
obj
)
{
if
(
IsEqualIID
(
riid
,
&
IID_IMFShutdown
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IMFShutdown_AddRef
(
iface
);
return
S_OK
;
}
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
testshutdown_AddRef
(
IMFShutdown
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
testshutdown_Release
(
IMFShutdown
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
testshutdown_Shutdown
(
IMFShutdown
*
iface
)
{
return
0xdead
;
}
static
HRESULT
WINAPI
testshutdown_GetShutdownStatus
(
IMFShutdown
*
iface
,
MFSHUTDOWN_STATUS
*
status
)
{
ok
(
0
,
"Unexpected call.
\n
"
);
return
E_NOTIMPL
;
}
static
const
IMFShutdownVtbl
testshutdownvtbl
=
{
testshutdown_QueryInterface
,
testshutdown_AddRef
,
testshutdown_Release
,
testshutdown_Shutdown
,
testshutdown_GetShutdownStatus
,
};
static
void
test_MFShutdownObject
(
void
)
{
IMFShutdown
testshutdown
=
{
&
testshutdownvtbl
};
IUnknown
testshutdown2
=
{
&
testservicevtbl
};
HRESULT
hr
;
hr
=
MFShutdownObject
(
NULL
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
MFShutdownObject
((
IUnknown
*
)
&
testshutdown
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
hr
=
MFShutdownObject
(
&
testshutdown2
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
}
START_TEST
(
mf
)
{
test_topology
();
...
...
@@ -509,4 +569,5 @@ START_TEST(mf)
test_MFGetService
();
test_MFCreateSequencerSource
();
test_media_session
();
test_MFShutdownObject
();
}
include/mfidl.idl
View file @
2f166690
...
...
@@ -329,6 +329,7 @@ cpp_quote("HRESULT WINAPI MFCreateTopoLoader(IMFTopoLoader **loader);")
cpp_quote
(
"HRESULT WINAPI MFGetSupportedMimeTypes(PROPVARIANT *array);"
)
cpp_quote
(
"HRESULT WINAPI MFGetService(IUnknown *object, REFGUID service, REFIID iid, void **obj);"
)
cpp_quote
(
"MFTIME WINAPI MFGetSystemTime(void);"
)
cpp_quote
(
"HRESULT WINAPI MFShutdownObject(IUnknown *object);"
)
[
object
,
...
...
@@ -381,6 +382,22 @@ interface IMFMediaSink : IUnknown
HRESULT
Shutdown
()
;
}
typedef
enum
_MFSHUTDOWN_STATUS
{
MFSHUTDOWN_INITIATED
,
MFSHUTDOWN_COMPLETED
,
}
MFSHUTDOWN_STATUS
;
[
object
,
uuid
(
97
ec2ea4
-
0
e42
-
4937
-
97
ac
-
9
d6d328824e1
)
]
interface
IMFShutdown
:
IUnknown
{
HRESULT
Shutdown
()
;
HRESULT
GetShutdownStatus
(
[
out
]
MFSHUTDOWN_STATUS
*
status
)
;
}
cpp_quote
(
"#define MF_RESOLUTION_MEDIASOURCE 0x00000001"
)
cpp_quote
(
"#define MF_RESOLUTION_BYTESTREAM 0x00000002"
)
cpp_quote
(
"#define MF_RESOLUTION_CONTENT_DOES_NOT_HAVE_TO_MATCH_EXTENSION_OR_MIME_TYPE 0x00000010"
)
...
...
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