Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9008b2c9
Commit
9008b2c9
authored
Nov 12, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/session: Query and initialize sample allocators for capable output nodes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0066be78
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
session.c
dlls/mf/session.c
+32
-1
No files found.
dlls/mf/session.c
View file @
9008b2c9
...
...
@@ -171,6 +171,7 @@ struct topo_node
struct
{
unsigned
int
requests
;
IMFVideoSampleAllocator
*
allocator
;
}
sink
;
struct
{
...
...
@@ -742,6 +743,10 @@ static void release_topo_node(struct topo_node *node)
heap_free
(
node
->
u
.
transform
.
input_map
);
heap_free
(
node
->
u
.
transform
.
output_map
);
break
;
case
MF_TOPOLOGY_OUTPUT_NODE
:
if
(
node
->
u
.
sink
.
allocator
)
IMFVideoSampleAllocator_Release
(
node
->
u
.
sink
.
allocator
);
break
;
default:
;
}
...
...
@@ -1185,10 +1190,25 @@ static HRESULT session_set_transform_stream_info(struct topo_node *node)
return
hr
;
}
static
HRESULT
session_get_stream_sink_type
(
IMFStreamSink
*
sink
,
IMFMediaType
**
media_type
)
{
IMFMediaTypeHandler
*
handler
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
IMFStreamSink_GetMediaTypeHandler
(
sink
,
&
handler
)))
{
hr
=
IMFMediaTypeHandler_GetCurrentMediaType
(
handler
,
media_type
);
IMFMediaTypeHandler_Release
(
handler
);
}
return
hr
;
}
static
HRESULT
session_append_node
(
struct
media_session
*
session
,
IMFTopologyNode
*
node
)
{
struct
topo_node
*
topo_node
;
IMFMediaSink
*
media_sink
;
IMFMediaType
*
media_type
;
IMFStreamDescriptor
*
sd
;
HRESULT
hr
=
S_OK
;
IUnknown
*
object
;
...
...
@@ -1217,7 +1237,18 @@ static HRESULT session_append_node(struct media_session *session, IMFTopologyNod
if
(
FAILED
(
hr
=
IMFStreamSink_GetMediaSink
(
topo_node
->
object
.
sink_stream
,
&
media_sink
)))
break
;
hr
=
session_add_media_sink
(
session
,
node
,
media_sink
);
if
(
SUCCEEDED
(
hr
=
session_add_media_sink
(
session
,
node
,
media_sink
)))
{
if
(
SUCCEEDED
(
session_get_stream_sink_type
(
topo_node
->
object
.
sink_stream
,
&
media_type
)))
{
if
(
SUCCEEDED
(
MFGetService
(
topo_node
->
object
.
object
,
&
MR_VIDEO_ACCELERATION_SERVICE
,
&
IID_IMFVideoSampleAllocator
,
(
void
**
)
&
topo_node
->
u
.
sink
.
allocator
)))
{
IMFVideoSampleAllocator_InitializeSampleAllocator
(
topo_node
->
u
.
sink
.
allocator
,
2
,
media_type
);
}
IMFMediaType_Release
(
media_type
);
}
}
IMFMediaSink_Release
(
media_sink
);
break
;
...
...
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