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
657449e1
Commit
657449e1
authored
Apr 02, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Get session topo_node from their IMFTopologyNode directly.
parent
8ad97c1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
33 deletions
+19
-33
session.c
dlls/mf/session.c
+19
-33
No files found.
dlls/mf/session.c
View file @
657449e1
...
...
@@ -856,14 +856,18 @@ static void session_clear_presentation(struct media_session *session)
}
}
static
struct
topo_node
*
session_get_
node_by_id
(
const
struct
media_session
*
session
,
TOPOID
id
)
static
struct
topo_node
*
session_get_
topo_node
(
const
struct
media_session
*
session
,
IMFTopologyNode
*
node
)
{
struct
topo_node
*
node
;
struct
topo_node
*
topo_node
;
TOPOID
id
;
LIST_FOR_EACH_ENTRY
(
node
,
&
session
->
presentation
.
nodes
,
struct
topo_node
,
entry
)
if
(
FAILED
(
IMFTopologyNode_GetTopoNodeID
(
node
,
&
id
)))
return
NULL
;
LIST_FOR_EACH_ENTRY
(
topo_node
,
&
session
->
presentation
.
nodes
,
struct
topo_node
,
entry
)
{
if
(
node
->
node_id
==
id
)
return
node
;
if
(
topo_
node
->
node_id
==
id
)
return
topo_
node
;
}
return
NULL
;
...
...
@@ -3136,7 +3140,6 @@ static HRESULT transform_get_external_output_sample(const struct media_session *
struct
topo_node
*
topo_node
;
unsigned
int
buffer_size
;
DWORD
downstream_input
;
TOPOID
node_id
;
HRESULT
hr
;
if
(
FAILED
(
IMFTopologyNode_GetOutput
(
transform
->
node
,
output_index
,
&
downstream_node
,
&
downstream_input
)))
...
...
@@ -3145,11 +3148,9 @@ static HRESULT transform_get_external_output_sample(const struct media_session *
return
MF_E_UNEXPECTED
;
}
IMFTopologyNode_GetTopoNodeID
(
downstream_node
,
&
node_id
);
topo_node
=
session_get_topo_node
(
session
,
downstream_node
);
IMFTopologyNode_Release
(
downstream_node
);
topo_node
=
session_get_node_by_id
(
session
,
node_id
);
if
(
topo_node
->
type
==
MF_TOPOLOGY_OUTPUT_NODE
&&
topo_node
->
u
.
sink
.
allocator
)
{
hr
=
IMFVideoSampleAllocator_AllocateSample
(
topo_node
->
u
.
sink
.
allocator
,
sample
);
...
...
@@ -3366,19 +3367,14 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
IMFSample
*
sample
)
{
struct
topo_node
*
topo_node
;
MF_TOPOLOGY_TYPE
node_type
;
TOPOID
node_id
;
HRESULT
hr
;
if
(
session
->
quality_manager
)
IMFQualityManager_NotifyProcessInput
(
session
->
quality_manager
,
node
,
input
,
sample
);
IMFTopologyNode_GetNodeType
(
node
,
&
node_type
);
IMFTopologyNode_GetTopoNodeID
(
node
,
&
node_id
);
topo_node
=
session_get_node_by_id
(
session
,
node_id
);
topo_node
=
session_get_topo_node
(
session
,
node
);
switch
(
node_
type
)
switch
(
topo_node
->
type
)
{
case
MF_TOPOLOGY_OUTPUT_NODE
:
if
(
topo_node
->
u
.
sink
.
requests
)
...
...
@@ -3403,7 +3399,7 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
transform_node_deliver_samples
(
session
,
topo_node
);
break
;
case
MF_TOPOLOGY_TEE_NODE
:
FIXME
(
"Unhandled downstream node type %d.
\n
"
,
node_
type
);
FIXME
(
"Unhandled downstream node type %d.
\n
"
,
topo_node
->
type
);
break
;
default:
;
...
...
@@ -3413,22 +3409,17 @@ static void session_deliver_sample_to_node(struct media_session *session, IMFTop
static
void
session_deliver_pending_samples
(
struct
media_session
*
session
,
IMFTopologyNode
*
node
)
{
struct
topo_node
*
topo_node
;
MF_TOPOLOGY_TYPE
node_type
;
TOPOID
node_id
;
IMFTopologyNode_GetNodeType
(
node
,
&
node_type
);
IMFTopologyNode_GetTopoNodeID
(
node
,
&
node_id
);
topo_node
=
session_get_topo_node
(
session
,
node
);
topo_node
=
session_get_node_by_id
(
session
,
node_id
);
switch
(
node_type
)
switch
(
topo_node
->
type
)
{
case
MF_TOPOLOGY_TRANSFORM_NODE
:
transform_node_pull_samples
(
session
,
topo_node
);
transform_node_deliver_samples
(
session
,
topo_node
);
break
;
default:
FIXME
(
"Unexpected node type %u.
\n
"
,
node_
type
);
FIXME
(
"Unexpected node type %u.
\n
"
,
topo_node
->
type
);
}
}
...
...
@@ -3437,18 +3428,13 @@ static HRESULT session_request_sample_from_node(struct media_session *session, I
{
IMFTopologyNode
*
down_node
;
struct
topo_node
*
topo_node
;
MF_TOPOLOGY_TYPE
node_type
;
HRESULT
hr
=
S_OK
;
IMFSample
*
sample
;
TOPOID
node_id
;
DWORD
input
;
IMFTopologyNode_GetNodeType
(
node
,
&
node_type
);
IMFTopologyNode_GetTopoNodeID
(
node
,
&
node_id
);
topo_node
=
session_get_topo_node
(
session
,
node
);
topo_node
=
session_get_node_by_id
(
session
,
node_id
);
switch
(
node_type
)
switch
(
topo_node
->
type
)
{
case
MF_TOPOLOGY_SOURCESTREAM_NODE
:
if
(
FAILED
(
hr
=
IMFMediaStream_RequestSample
(
topo_node
->
object
.
source_stream
,
NULL
)))
...
...
@@ -3484,7 +3470,7 @@ static HRESULT session_request_sample_from_node(struct media_session *session, I
break
;
}
case
MF_TOPOLOGY_TEE_NODE
:
FIXME
(
"Unhandled upstream node type %d.
\n
"
,
node_
type
);
FIXME
(
"Unhandled upstream node type %d.
\n
"
,
topo_node
->
type
);
default:
hr
=
E_UNEXPECTED
;
}
...
...
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