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
935e3d12
Commit
935e3d12
authored
Aug 11, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Only enumerate types for decoders / converter if down type is missing.
parent
826a9ce1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
mf.c
dlls/mf/tests/mf.c
+2
-2
topology_loader.c
dlls/mf/topology_loader.c
+14
-9
No files found.
dlls/mf/tests/mf.c
View file @
935e3d12
...
...
@@ -2349,7 +2349,7 @@ static void test_topology_loader(void)
.
input_type
=
&
audio_pcm_44100
,
.
output_type
=
&
audio_pcm_48000
,
.
sink_method
=
MF_CONNECT_ALLOW_CONVERTER
,
.
source_method
=
-
1
,
.
current_input
=
&
audio_pcm_48000
,
.
expected_result
=
S_OK
,
.
flags
=
LOADER_EXPECTED_CONVERTER
|
LOADER_SET_ENUMERATE_SOURCE_TYPES
|
LOADER_TODO
,
.
flags
=
LOADER_EXPECTED_CONVERTER
|
LOADER_SET_ENUMERATE_SOURCE_TYPES
,
},
{
/* PCM -> PCM, different enumerated bps, no current type, sink allow decoder */
...
...
@@ -2432,7 +2432,7 @@ static void test_topology_loader(void)
/* RGB32 -> Any Video, no current output type, refuse input type */
.
input_type
=
&
video_i420_1280
,
.
output_type
=
&
video_dummy
,
.
sink_method
=
-
1
,
.
source_method
=
-
1
,
.
expected_result
=
S_OK
,
.
flags
=
LOADER_NO_CURRENT_OUTPUT
|
LOADER_SET_INVALID_INPUT
|
LOADER_EXPECTED_CONVERTER
|
LOADER_TODO
,
.
flags
=
LOADER_NO_CURRENT_OUTPUT
|
LOADER_SET_INVALID_INPUT
|
LOADER_EXPECTED_CONVERTER
,
},
};
...
...
dlls/mf/topology_loader.c
View file @
935e3d12
...
...
@@ -240,7 +240,7 @@ static HRESULT topology_branch_fill_media_type(IMFMediaType *up_type, IMFMediaTy
}
static
HRESULT
topology_branch_connect
(
IMFTopology
*
topology
,
MF_CONNECT_METHOD
method_mask
,
struct
topology_branch
*
branch
);
struct
topology_branch
*
branch
,
BOOL
enumerate_source_types
);
static
HRESULT
topology_branch_connect_down
(
IMFTopology
*
topology
,
MF_CONNECT_METHOD
method_mask
,
struct
topology_branch
*
branch
,
IMFMediaType
*
up_type
);
static
HRESULT
topology_branch_connect_indirect
(
IMFTopology
*
topology
,
MF_CONNECT_METHOD
method_mask
,
...
...
@@ -318,7 +318,7 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC
IMFTransform_Release
(
transform
);
if
(
SUCCEEDED
(
hr
))
hr
=
topology_branch_connect
(
topology
,
method_mask
,
&
down_branch
);
hr
=
topology_branch_connect
(
topology
,
method_mask
,
&
down_branch
,
!
down_type
);
if
(
SUCCEEDED
(
hr
))
hr
=
IMFTopology_AddNode
(
topology
,
node
);
if
(
SUCCEEDED
(
hr
))
...
...
@@ -411,9 +411,8 @@ static HRESULT topology_branch_foreach_up_types(IMFTopology *topology, MF_CONNEC
}
static
HRESULT
topology_branch_connect
(
IMFTopology
*
topology
,
MF_CONNECT_METHOD
method_mask
,
struct
topology_branch
*
branch
)
struct
topology_branch
*
branch
,
BOOL
enumerate_source_types
)
{
UINT32
enumerate_source_types
;
MF_CONNECT_METHOD
method
;
HRESULT
hr
;
...
...
@@ -422,8 +421,7 @@ static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD
if
(
FAILED
(
IMFTopologyNode_GetUINT32
(
branch
->
up
.
node
,
&
MF_TOPONODE_CONNECT_METHOD
,
&
method
)))
method
=
MF_CONNECT_DIRECT
;
if
(
SUCCEEDED
(
IMFTopology_GetUINT32
(
topology
,
&
MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES
,
&
enumerate_source_types
))
&&
enumerate_source_types
)
if
(
enumerate_source_types
)
{
if
(
method
&
MF_CONNECT_RESOLVE_INDEPENDENT_OUTPUTTYPES
)
hr
=
topology_branch_foreach_up_types
(
topology
,
method_mask
&
MF_CONNECT_ALLOW_DECODER
,
branch
);
...
...
@@ -456,7 +454,8 @@ static HRESULT topology_branch_connect(IMFTopology *topology, MF_CONNECT_METHOD
return
hr
;
}
static
HRESULT
topology_loader_resolve_branches
(
struct
topoloader_context
*
context
,
struct
list
*
branches
)
static
HRESULT
topology_loader_resolve_branches
(
struct
topoloader_context
*
context
,
struct
list
*
branches
,
BOOL
enumerate_source_types
)
{
struct
list
new_branches
=
LIST_INIT
(
new_branches
);
struct
topology_branch
*
branch
,
*
next
;
...
...
@@ -474,7 +473,8 @@ static HRESULT topology_loader_resolve_branches(struct topoloader_context *conte
else
if
(
FAILED
(
hr
=
topology_branch_clone_nodes
(
context
,
branch
)))
WARN
(
"Failed to clone nodes for branch %s
\n
"
,
debugstr_topology_branch
(
branch
));
else
hr
=
topology_branch_connect
(
context
->
output_topology
,
MF_CONNECT_ALLOW_DECODER
,
branch
);
hr
=
topology_branch_connect
(
context
->
output_topology
,
MF_CONNECT_ALLOW_DECODER
,
branch
,
enumerate_source_types
);
topology_branch_destroy
(
branch
);
if
(
FAILED
(
hr
))
...
...
@@ -639,6 +639,7 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
struct
list
branches
=
LIST_INIT
(
branches
);
struct
topoloader_context
context
=
{
0
};
struct
topology_branch
*
branch
,
*
next
;
UINT32
enumerate_source_types
;
IMFTopology
*
output_topology
;
MF_TOPOLOGY_TYPE
node_type
;
IMFTopologyNode
*
node
;
...
...
@@ -705,8 +706,12 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
if
(
SUCCEEDED
(
hr
)
&&
list_empty
(
&
branches
))
hr
=
MF_E_TOPO_UNSUPPORTED
;
if
(
FAILED
(
IMFTopology_GetUINT32
(
input_topology
,
&
MF_TOPOLOGY_ENUMERATE_SOURCE_TYPES
,
&
enumerate_source_types
)))
enumerate_source_types
=
0
;
while
(
SUCCEEDED
(
hr
)
&&
!
list_empty
(
&
branches
))
hr
=
topology_loader_resolve_branches
(
&
context
,
&
branches
);
hr
=
topology_loader_resolve_branches
(
&
context
,
&
branches
,
enumerate_source_types
);
LIST_FOR_EACH_ENTRY_SAFE
(
branch
,
next
,
&
branches
,
struct
topology_branch
,
entry
)
{
...
...
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