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
e88a2535
Commit
e88a2535
authored
Feb 22, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Assign node id on creation.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
50cef896
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
mf.c
dlls/mf/tests/mf.c
+4
-4
topology.c
dlls/mf/topology.c
+16
-4
No files found.
dlls/mf/tests/mf.c
View file @
e88a2535
...
...
@@ -57,11 +57,10 @@ static void test_topology(void)
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopologyNode_GetTopoNodeID
(
node
,
&
id
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get node id, hr %#x.
\n
"
,
hr
);
ok
(((
id
>>
32
)
==
GetCurrentProcessId
())
&&
!!
(
id
&
0xffff
),
"Unexpected node id %s.
\n
"
,
wine_dbgstr_longlong
(
id
));
hr
=
IMFTopologyNode_SetTopoNodeID
(
node2
,
id
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to set node id, hr %#x.
\n
"
,
hr
);
count
=
1
;
...
...
@@ -96,7 +95,6 @@ todo_wine {
/* Change node id, add it again. */
hr
=
IMFTopologyNode_SetTopoNodeID
(
node
,
++
id
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to set node id, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_GetNodeByID
(
topology
,
id
,
&
node2
);
...
...
@@ -148,7 +146,6 @@ todo_wine {
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_TEE_NODE
,
&
node2
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopologyNode_SetTopoNodeID
(
node2
,
id
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to set node id, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopology_RemoveNode
(
topology
,
node2
);
todo_wine
...
...
@@ -179,6 +176,9 @@ todo_wine {
todo_wine
ok
(
hr
==
S_OK
,
"Failed to clear topology, hr %#x.
\n
"
,
hr
);
hr
=
IMFTopologyNode_SetTopoNodeID
(
node
,
123
);
ok
(
hr
==
S_OK
,
"Failed to set node id, hr %#x.
\n
"
,
hr
);
IMFTopologyNode_Release
(
node
);
IMFTopology_Release
(
topology
);
}
...
...
dlls/mf/topology.c
View file @
e88a2535
...
...
@@ -32,6 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
static
LONG
next_node_id
;
struct
topology
{
IMFTopology
IMFTopology_iface
;
...
...
@@ -45,6 +47,7 @@ struct topology_node
LONG
refcount
;
IMFAttributes
*
attributes
;
MF_TOPOLOGY_TYPE
node_type
;
TOPOID
id
;
};
struct
seq_source
...
...
@@ -887,16 +890,24 @@ static HRESULT WINAPI topology_node_GetNodeType(IMFTopologyNode *iface, MF_TOPOL
static
HRESULT
WINAPI
topology_node_GetTopoNodeID
(
IMFTopologyNode
*
iface
,
TOPOID
*
id
)
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
id
);
struct
topology_node
*
node
=
impl_from_IMFTopologyNode
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
id
);
*
id
=
node
->
id
;
return
S_OK
;
}
static
HRESULT
WINAPI
topology_node_SetTopoNodeID
(
IMFTopologyNode
*
iface
,
TOPOID
id
)
{
FIXME
(
"(%p)->(%s)
\n
"
,
iface
,
wine_dbgstr_longlong
(
id
)
);
struct
topology_node
*
node
=
impl_from_IMFTopologyNode
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%s)
\n
"
,
iface
,
wine_dbgstr_longlong
(
id
));
node
->
id
=
id
;
return
S_OK
;
}
static
HRESULT
WINAPI
topology_node_GetInputCount
(
IMFTopologyNode
*
iface
,
DWORD
*
count
)
...
...
@@ -1058,6 +1069,7 @@ HRESULT WINAPI MFCreateTopologyNode(MF_TOPOLOGY_TYPE node_type, IMFTopologyNode
heap_free
(
object
);
return
hr
;
}
object
->
id
=
((
TOPOID
)
GetCurrentProcessId
()
<<
32
)
|
InterlockedIncrement
(
&
next_node_id
);
*
node
=
&
object
->
IMFTopologyNode_iface
;
...
...
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