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
202e9592
Commit
202e9592
authored
Feb 25, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Add IMFTopoLoader stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8f9db431
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
1 deletion
+121
-1
mf.spec
dlls/mf/mf.spec
+1
-1
mf.c
dlls/mf/tests/mf.c
+15
-0
topology.c
dlls/mf/topology.c
+93
-0
mfidl.idl
include/mfidl.idl
+12
-0
No files found.
dlls/mf/mf.spec
View file @
202e9592
...
...
@@ -59,7 +59,7 @@
@ stub MFCreateSimpleTypeHandler
@ stdcall MFCreateSourceResolver(ptr) mfplat.MFCreateSourceResolver
@ stub MFCreateStandardQualityManager
@ st
ub MFCreateTopoLoader
@ st
dcall MFCreateTopoLoader(ptr)
@ stdcall MFCreateTopology(ptr)
@ stdcall MFCreateTopologyNode(long ptr)
@ stub MFCreateTranscodeProfile
...
...
dlls/mf/tests/mf.c
View file @
202e9592
...
...
@@ -469,9 +469,24 @@ static void test_media_session(void)
ok
(
hr
==
S_OK
,
"Shutdown failure, hr %#x.
\n
"
,
hr
);
}
static
void
test_topology_loader
(
void
)
{
IMFTopoLoader
*
loader
;
HRESULT
hr
;
hr
=
MFCreateTopoLoader
(
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
MFCreateTopoLoader
(
&
loader
);
ok
(
hr
==
S_OK
,
"Failed to create topology loader, hr %#x.
\n
"
,
hr
);
IMFTopoLoader_Release
(
loader
);
}
START_TEST
(
mf
)
{
test_topology
();
test_topology_loader
();
test_MFGetService
();
test_MFCreateSequencerSource
();
test_media_session
();
...
...
dlls/mf/topology.c
View file @
202e9592
...
...
@@ -52,6 +52,12 @@ struct topology_node
TOPOID
id
;
};
struct
topology_loader
{
IMFTopoLoader
IMFTopoLoader_iface
;
LONG
refcount
;
};
struct
seq_source
{
IMFSequencerSource
IMFSequencerSource_iface
;
...
...
@@ -68,6 +74,11 @@ static struct topology_node *impl_from_IMFTopologyNode(IMFTopologyNode *iface)
return
CONTAINING_RECORD
(
iface
,
struct
topology_node
,
IMFTopologyNode_iface
);
}
static
struct
topology_loader
*
impl_from_IMFTopoLoader
(
IMFTopoLoader
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
topology_loader
,
IMFTopoLoader_iface
);
}
static
struct
seq_source
*
impl_from_IMFSequencerSource
(
IMFSequencerSource
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
seq_source
,
IMFSequencerSource_iface
);
...
...
@@ -1212,6 +1223,88 @@ HRESULT WINAPI MFCreateTopologyNode(MF_TOPOLOGY_TYPE node_type, IMFTopologyNode
return
S_OK
;
}
static
HRESULT
WINAPI
topology_loader_QueryInterface
(
IMFTopoLoader
*
iface
,
REFIID
riid
,
void
**
out
)
{
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFTopoLoader
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
out
=
iface
;
IMFTopoLoader_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"Unsupported %s.
\n
"
,
debugstr_guid
(
riid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
topology_loader_AddRef
(
IMFTopoLoader
*
iface
)
{
struct
topology_loader
*
loader
=
impl_from_IMFTopoLoader
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
loader
->
refcount
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
refcount
);
return
refcount
;
}
static
ULONG
WINAPI
topology_loader_Release
(
IMFTopoLoader
*
iface
)
{
struct
topology_loader
*
loader
=
impl_from_IMFTopoLoader
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
loader
->
refcount
);
TRACE
(
"(%p) refcount=%u
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
{
heap_free
(
loader
);
}
return
refcount
;
}
static
HRESULT
WINAPI
topology_loader_Load
(
IMFTopoLoader
*
iface
,
IMFTopology
*
input_topology
,
IMFTopology
**
output_topology
,
IMFTopology
*
current_topology
)
{
FIXME
(
"%p, %p, %p, %p.
\n
"
,
iface
,
input_topology
,
output_topology
,
current_topology
);
return
E_NOTIMPL
;
}
static
const
IMFTopoLoaderVtbl
topologyloadervtbl
=
{
topology_loader_QueryInterface
,
topology_loader_AddRef
,
topology_loader_Release
,
topology_loader_Load
,
};
/***********************************************************************
* MFCreateTopoLoader (mf.@)
*/
HRESULT
WINAPI
MFCreateTopoLoader
(
IMFTopoLoader
**
loader
)
{
struct
topology_loader
*
object
;
TRACE
(
"%p.
\n
"
,
loader
);
if
(
!
loader
)
return
E_POINTER
;
object
=
heap_alloc
(
sizeof
(
*
object
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
object
->
IMFTopoLoader_iface
.
lpVtbl
=
&
topologyloadervtbl
;
object
->
refcount
=
1
;
*
loader
=
&
object
->
IMFTopoLoader_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
seq_source_QueryInterface
(
IMFSequencerSource
*
iface
,
REFIID
riid
,
void
**
out
)
{
struct
seq_source
*
seq_source
=
impl_from_IMFSequencerSource
(
iface
);
...
...
include/mfidl.idl
View file @
202e9592
...
...
@@ -118,6 +118,17 @@ interface IMFTopology : IMFAttributes
[
object
,
uuid
(
de9a6157
-
f660
-
4643
-
b56a
-
df9f7998c7cd
),
local
,
]
interface
IMFTopoLoader
:
IUnknown
{
HRESULT
Load
(
[
in
]
IMFTopology
*
input_topology
,
[
out
]
IMFTopology
**
output_topology
,
[
in
]
IMFTopology
*
current_topology
)
;
}
[
object
,
uuid
(
90377834
-
21
d0
-
4
dee
-
8214
-
ba2e3e6c1127
),
]
interface
IMFMediaSession
:
IMFMediaEventGenerator
...
...
@@ -313,6 +324,7 @@ cpp_quote("HRESULT WINAPI MFCreateStreamDescriptor(DWORD identifier, DWORD cMedi
cpp_quote
(
" IMFMediaType **types, IMFStreamDescriptor **descriptor);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateTopology(IMFTopology **topology);"
)
cpp_quote
(
"HRESULT WINAPI MFCreateTopologyNode(MF_TOPOLOGY_TYPE node_type, IMFTopologyNode **node);"
)
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);"
)
...
...
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