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
fe70e7be
Commit
fe70e7be
authored
Oct 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Set the device manager for sample allocators.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8d10aa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
evr.c
dlls/mf/evr.c
+19
-0
No files found.
dlls/mf/evr.c
View file @
fe70e7be
...
...
@@ -83,6 +83,7 @@ struct video_renderer
IMFTransform
*
mixer
;
IMFVideoPresenter
*
presenter
;
IUnknown
*
device_manager
;
unsigned
int
flags
;
unsigned
int
state
;
...
...
@@ -539,7 +540,11 @@ static HRESULT WINAPI video_stream_get_service_GetService(IMFGetService *iface,
EnterCriticalSection
(
&
stream
->
cs
);
if
(
!
stream
->
allocator
)
{
hr
=
MFCreateVideoSampleAllocator
(
&
IID_IMFVideoSampleAllocator
,
(
void
**
)
&
stream
->
allocator
);
if
(
SUCCEEDED
(
hr
))
hr
=
IMFVideoSampleAllocator_SetDirectXManager
(
stream
->
allocator
,
stream
->
parent
->
device_manager
);
}
if
(
SUCCEEDED
(
hr
))
hr
=
IMFVideoSampleAllocator_QueryInterface
(
stream
->
allocator
,
riid
,
obj
);
...
...
@@ -667,6 +672,8 @@ static ULONG WINAPI video_renderer_sink_Release(IMFMediaSink *iface)
IMFTransform_Release
(
renderer
->
mixer
);
if
(
renderer
->
presenter
)
IMFVideoPresenter_Release
(
renderer
->
presenter
);
if
(
renderer
->
device_manager
)
IUnknown_Release
(
renderer
->
device_manager
);
if
(
renderer
->
clock
)
IMFPresentationClock_Release
(
renderer
->
clock
);
if
(
renderer
->
attributes
)
...
...
@@ -1183,6 +1190,12 @@ static HRESULT video_renderer_configure_presenter(struct video_renderer *rendere
IMFTopologyServiceLookupClient_Release
(
lookup_client
);
}
if
(
FAILED
(
MFGetService
((
IUnknown
*
)
renderer
->
presenter
,
&
MR_VIDEO_ACCELERATION_SERVICE
,
&
IID_IUnknown
,
(
void
**
)
&
renderer
->
device_manager
)))
{
WARN
(
"Failed to get device manager from the presenter.
\n
"
);
}
return
hr
;
}
...
...
@@ -1203,6 +1216,12 @@ static HRESULT video_renderer_initialize(struct video_renderer *renderer, IMFTra
renderer
->
presenter
=
NULL
;
}
if
(
renderer
->
device_manager
)
{
IUnknown_Release
(
renderer
->
device_manager
);
renderer
->
device_manager
=
NULL
;
}
renderer
->
mixer
=
mixer
;
IMFTransform_AddRef
(
renderer
->
mixer
);
...
...
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