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
0d41926c
Commit
0d41926c
authored
Oct 01, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Partially implement topology cloning.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5dbe0e3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
8 deletions
+45
-8
mf.c
dlls/mf/tests/mf.c
+0
-1
topology.c
dlls/mf/topology.c
+45
-7
No files found.
dlls/mf/tests/mf.c
View file @
0d41926c
...
@@ -1308,7 +1308,6 @@ todo_wine {
...
@@ -1308,7 +1308,6 @@ todo_wine {
ok
(
value
==
MF_TOPOLOGY_RESOLUTION_SUCCEEDED
,
"Unexpected value %#x.
\n
"
,
value
);
ok
(
value
==
MF_TOPOLOGY_RESOLUTION_SUCCEEDED
,
"Unexpected value %#x.
\n
"
,
value
);
}
}
hr
=
IMFTopoLoader_Load
(
loader
,
full_topology
,
&
topology2
,
NULL
);
hr
=
IMFTopoLoader_Load
(
loader
,
full_topology
,
&
topology2
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to resolve topology, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to resolve topology, hr %#x.
\n
"
,
hr
);
ok
(
full_topology
!=
topology2
,
"Unexpected instance.
\n
"
);
ok
(
full_topology
!=
topology2
,
"Unexpected instance.
\n
"
);
...
...
dlls/mf/topology.c
View file @
0d41926c
...
@@ -111,6 +111,8 @@ static struct topology_node *unsafe_impl_from_IMFTopologyNode(IMFTopologyNode *i
...
@@ -111,6 +111,8 @@ static struct topology_node *unsafe_impl_from_IMFTopologyNode(IMFTopologyNode *i
return
impl_from_IMFTopologyNode
(
iface
);
return
impl_from_IMFTopologyNode
(
iface
);
}
}
static
struct
topology
*
unsafe_impl_from_IMFTopology
(
IMFTopology
*
iface
);
static
struct
topology_loader
*
impl_from_IMFTopoLoader
(
IMFTopoLoader
*
iface
)
static
struct
topology_loader
*
impl_from_IMFTopoLoader
(
IMFTopoLoader
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
struct
topology_loader
,
IMFTopoLoader_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
topology_loader
,
IMFTopoLoader_iface
);
...
@@ -574,14 +576,11 @@ static HRESULT topology_get_node_by_id(const struct topology *topology, TOPOID i
...
@@ -574,14 +576,11 @@ static HRESULT topology_get_node_by_id(const struct topology *topology, TOPOID i
return
MF_E_NOT_FOUND
;
return
MF_E_NOT_FOUND
;
}
}
static
HRESULT
WINAPI
topology_AddNode
(
IMFTopology
*
iface
,
IMFTopologyNode
*
node_iface
)
static
HRESULT
topology_add_node
(
struct
topology
*
topology
,
IMFTopologyNode
*
node_iface
)
{
{
struct
topology
*
topology
=
impl_from_IMFTopology
(
iface
);
struct
topology_node
*
node
=
unsafe_impl_from_IMFTopologyNode
(
node_iface
);
struct
topology_node
*
node
=
unsafe_impl_from_IMFTopologyNode
(
node_iface
);
struct
topology_node
*
match
;
struct
topology_node
*
match
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
node_iface
);
if
(
!
node
)
if
(
!
node
)
return
E_POINTER
;
return
E_POINTER
;
...
@@ -603,6 +602,15 @@ static HRESULT WINAPI topology_AddNode(IMFTopology *iface, IMFTopologyNode *node
...
@@ -603,6 +602,15 @@ static HRESULT WINAPI topology_AddNode(IMFTopology *iface, IMFTopologyNode *node
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
topology_AddNode
(
IMFTopology
*
iface
,
IMFTopologyNode
*
node
)
{
struct
topology
*
topology
=
impl_from_IMFTopology
(
iface
);
TRACE
(
"%p, %p.
\n
"
,
iface
,
node
);
return
topology_add_node
(
topology
,
node
);
}
static
HRESULT
WINAPI
topology_RemoveNode
(
IMFTopology
*
iface
,
IMFTopologyNode
*
node
)
static
HRESULT
WINAPI
topology_RemoveNode
(
IMFTopology
*
iface
,
IMFTopologyNode
*
node
)
{
{
struct
topology
*
topology
=
impl_from_IMFTopology
(
iface
);
struct
topology
*
topology
=
impl_from_IMFTopology
(
iface
);
...
@@ -672,11 +680,41 @@ static HRESULT WINAPI topology_Clear(IMFTopology *iface)
...
@@ -672,11 +680,41 @@ static HRESULT WINAPI topology_Clear(IMFTopology *iface)
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
topology_CloneFrom
(
IMFTopology
*
iface
,
IMFTopology
*
src
_topology
)
static
HRESULT
WINAPI
topology_CloneFrom
(
IMFTopology
*
iface
,
IMFTopology
*
src
)
{
{
FIXME
(
"(%p)->(%p)
\n
"
,
iface
,
src_topology
);
struct
topology
*
topology
=
impl_from_IMFTopology
(
iface
);
struct
topology
*
src_topology
=
unsafe_impl_from_IMFTopology
(
src
);
IMFTopologyNode
*
node
;
HRESULT
hr
;
size_t
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
src
);
topology_clear
(
topology
);
/* Clone nodes. */
for
(
i
=
0
;
i
<
src_topology
->
nodes
.
count
;
++
i
)
{
if
(
FAILED
(
hr
=
MFCreateTopologyNode
(
src_topology
->
nodes
.
nodes
[
i
]
->
node_type
,
&
node
)))
{
WARN
(
"Failed to create a node, hr %#x.
\n
"
,
hr
);
break
;
}
if
(
SUCCEEDED
(
hr
=
IMFTopologyNode_CloneFrom
(
node
,
&
src_topology
->
nodes
.
nodes
[
i
]
->
IMFTopologyNode_iface
)))
topology_add_node
(
topology
,
node
);
IMFTopologyNode_Release
(
node
);
}
FIXME
(
"Clone node connections.
\n
"
);
/* Copy attributes and id. */
hr
=
IMFTopology_CopyAllItems
(
src
,
(
IMFAttributes
*
)
&
topology
->
IMFTopology_iface
);
if
(
SUCCEEDED
(
hr
))
topology
->
id
=
src_topology
->
id
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
topology_GetNodeByID
(
IMFTopology
*
iface
,
TOPOID
id
,
IMFTopologyNode
**
ret
)
static
HRESULT
WINAPI
topology_GetNodeByID
(
IMFTopology
*
iface
,
TOPOID
id
,
IMFTopologyNode
**
ret
)
...
...
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