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
b37d3f23
Commit
b37d3f23
authored
Mar 11, 2024
by
Santino Mazza
Committed by
Alexandre Julliard
Mar 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/topoloader: Preserve input topology id.
parent
4da091ed
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
13 deletions
+21
-13
mf_private.h
dlls/mf/mf_private.h
+1
-0
mf.c
dlls/mf/tests/mf.c
+2
-2
topology.c
dlls/mf/topology.c
+15
-10
topology_loader.c
dlls/mf/topology_loader.c
+3
-1
No files found.
dlls/mf/mf_private.h
View file @
b37d3f23
...
@@ -118,6 +118,7 @@ extern HRESULT urlmon_scheme_handler_construct(REFIID riid, void **obj);
...
@@ -118,6 +118,7 @@ extern HRESULT urlmon_scheme_handler_construct(REFIID riid, void **obj);
extern
BOOL
mf_is_sample_copier_transform
(
IMFTransform
*
transform
);
extern
BOOL
mf_is_sample_copier_transform
(
IMFTransform
*
transform
);
extern
BOOL
mf_is_sar_sink
(
IMFMediaSink
*
sink
);
extern
BOOL
mf_is_sar_sink
(
IMFMediaSink
*
sink
);
extern
HRESULT
create_topology
(
TOPOID
id
,
IMFTopology
**
topology
);
extern
HRESULT
topology_node_get_object
(
IMFTopologyNode
*
node
,
REFIID
riid
,
void
**
obj
);
extern
HRESULT
topology_node_get_object
(
IMFTopologyNode
*
node
,
REFIID
riid
,
void
**
obj
);
extern
HRESULT
topology_node_get_type_handler
(
IMFTopologyNode
*
node
,
DWORD
stream
,
BOOL
output
,
IMFMediaTypeHandler
**
handler
);
extern
HRESULT
topology_node_get_type_handler
(
IMFTopologyNode
*
node
,
DWORD
stream
,
BOOL
output
,
IMFMediaTypeHandler
**
handler
);
extern
HRESULT
topology_node_init_media_type
(
IMFTopologyNode
*
node
,
DWORD
stream
,
BOOL
output
,
IMFMediaType
**
type
);
extern
HRESULT
topology_node_init_media_type
(
IMFTopologyNode
*
node
,
DWORD
stream
,
BOOL
output
,
IMFMediaType
**
type
);
dlls/mf/tests/mf.c
View file @
b37d3f23
...
@@ -4179,7 +4179,7 @@ static void test_topology_loader(void)
...
@@ -4179,7 +4179,7 @@ static void test_topology_loader(void)
{
{
IMFTopology_GetTopologyID
(
topology
,
&
oldtopoid
);
IMFTopology_GetTopologyID
(
topology
,
&
oldtopoid
);
IMFTopology_GetTopologyID
(
full_topology
,
&
newtopoid
);
IMFTopology_GetTopologyID
(
full_topology
,
&
newtopoid
);
todo_wine
ok
(
oldtopoid
==
newtopoid
,
"Expected the same topology id. %llu == %llu
\n
"
,
oldtopoid
,
newtopoid
);
ok
(
oldtopoid
==
newtopoid
,
"Expected the same topology id. %llu == %llu
\n
"
,
oldtopoid
,
newtopoid
);
ok
(
topology
!=
full_topology
,
"Expected a different object for the resolved topology.
\n
"
);
ok
(
topology
!=
full_topology
,
"Expected a different object for the resolved topology.
\n
"
);
hr
=
IMFTopology_GetCount
(
full_topology
,
&
count
);
hr
=
IMFTopology_GetCount
(
full_topology
,
&
count
);
...
@@ -4331,7 +4331,7 @@ todo_wine {
...
@@ -4331,7 +4331,7 @@ todo_wine {
ok
(
full_topology
!=
topology2
,
"Unexpected instance.
\n
"
);
ok
(
full_topology
!=
topology2
,
"Unexpected instance.
\n
"
);
IMFTopology_GetTopologyID
(
topology2
,
&
oldtopoid
);
IMFTopology_GetTopologyID
(
topology2
,
&
oldtopoid
);
IMFTopology_GetTopologyID
(
full_topology
,
&
newtopoid
);
IMFTopology_GetTopologyID
(
full_topology
,
&
newtopoid
);
todo_wine
ok
(
oldtopoid
==
newtopoid
,
"Expected the same topology id. %llu == %llu
\n
"
,
oldtopoid
,
newtopoid
);
ok
(
oldtopoid
==
newtopoid
,
"Expected the same topology id. %llu == %llu
\n
"
,
oldtopoid
,
newtopoid
);
hr
=
IMFTopology_GetUINT32
(
topology2
,
&
IID_IMFTopology
,
&
value
);
hr
=
IMFTopology_GetUINT32
(
topology2
,
&
IID_IMFTopology
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
dlls/mf/topology.c
View file @
b37d3f23
...
@@ -866,19 +866,11 @@ static TOPOID topology_generate_id(void)
...
@@ -866,19 +866,11 @@ static TOPOID topology_generate_id(void)
return
next_topology_id
;
return
next_topology_id
;
}
}
/***********************************************************************
HRESULT
create_topology
(
TOPOID
id
,
IMFTopology
**
topology
)
* MFCreateTopology (mf.@)
*/
HRESULT
WINAPI
MFCreateTopology
(
IMFTopology
**
topology
)
{
{
struct
topology
*
object
;
struct
topology
*
object
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%p.
\n
"
,
topology
);
if
(
!
topology
)
return
E_POINTER
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
@@ -892,13 +884,26 @@ HRESULT WINAPI MFCreateTopology(IMFTopology **topology)
...
@@ -892,13 +884,26 @@ HRESULT WINAPI MFCreateTopology(IMFTopology **topology)
return
hr
;
return
hr
;
}
}
object
->
id
=
topology_generate_id
()
;
object
->
id
=
id
;
*
topology
=
&
object
->
IMFTopology_iface
;
*
topology
=
&
object
->
IMFTopology_iface
;
return
S_OK
;
return
S_OK
;
}
}
/***********************************************************************
* MFCreateTopology (mf.@)
*/
HRESULT
WINAPI
MFCreateTopology
(
IMFTopology
**
topology
)
{
TRACE
(
"%p.
\n
"
,
topology
);
if
(
!
topology
)
return
E_POINTER
;
return
create_topology
(
topology_generate_id
(),
topology
);
}
static
HRESULT
WINAPI
topology_node_QueryInterface
(
IMFTopologyNode
*
iface
,
REFIID
riid
,
void
**
out
)
static
HRESULT
WINAPI
topology_node_QueryInterface
(
IMFTopologyNode
*
iface
,
REFIID
riid
,
void
**
out
)
{
{
struct
topology_node
*
node
=
impl_from_IMFTopologyNode
(
iface
);
struct
topology_node
*
node
=
impl_from_IMFTopologyNode
(
iface
);
...
...
dlls/mf/topology_loader.c
View file @
b37d3f23
...
@@ -721,6 +721,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
...
@@ -721,6 +721,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
unsigned
short
i
=
0
;
unsigned
short
i
=
0
;
IMFStreamSink
*
sink
;
IMFStreamSink
*
sink
;
IUnknown
*
object
;
IUnknown
*
object
;
TOPOID
topoid
;
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
=
E_FAIL
;
FIXME
(
"iface %p, input_topology %p, ret_topology %p, current_topology %p stub!
\n
"
,
FIXME
(
"iface %p, input_topology %p, ret_topology %p, current_topology %p stub!
\n
"
,
...
@@ -763,7 +764,8 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
...
@@ -763,7 +764,8 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
return
hr
;
return
hr
;
}
}
if
(
FAILED
(
hr
=
MFCreateTopology
(
&
output_topology
)))
IMFTopology_GetTopologyID
(
input_topology
,
&
topoid
);
if
(
FAILED
(
hr
=
create_topology
(
topoid
,
&
output_topology
)))
return
hr
;
return
hr
;
IMFTopology_CopyAllItems
(
input_topology
,
(
IMFAttributes
*
)
output_topology
);
IMFTopology_CopyAllItems
(
input_topology
,
(
IMFAttributes
*
)
output_topology
);
...
...
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