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
55110df7
Commit
55110df7
authored
Apr 16, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Reinitialize presenter on clock change.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
77052268
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
18 deletions
+37
-18
evr.c
dlls/mf/evr.c
+37
-18
No files found.
dlls/mf/evr.c
View file @
55110df7
...
...
@@ -169,18 +169,31 @@ static struct video_stream *impl_from_stream_IMFAttributes(IMFAttributes *iface)
return
CONTAINING_RECORD
(
iface
,
struct
video_stream
,
IMFAttributes_iface
);
}
static
void
video_renderer_release
_services
(
struct
video_renderer
*
renderer
)
static
HRESULT
video_renderer_init_presenter
_services
(
struct
video_renderer
*
renderer
)
{
IMFTopologyServiceLookupClient
*
lookup_client
;
HRESULT
hr
;
if
(
renderer
->
flags
&
EVR_MIXER_INITED_SERVICES
&&
SUCCEEDED
(
IMFTransform_QueryInterface
(
renderer
->
mixer
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
)))
if
(
SUCCEEDED
(
hr
=
IMFVideoPresenter_QueryInterface
(
renderer
->
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
)))
{
IMFTopologyServiceLookupClient_ReleaseServicePointers
(
lookup_client
);
renderer
->
flags
|=
EVR_INIT_SERVICES
;
if
(
SUCCEEDED
(
hr
=
IMFTopologyServiceLookupClient_InitServicePointers
(
lookup_client
,
&
renderer
->
IMFTopologyServiceLookup_iface
)))
{
renderer
->
flags
|=
EVR_PRESENTER_INITED_SERVICES
;
}
renderer
->
flags
&=
~
EVR_INIT_SERVICES
;
IMFTopologyServiceLookupClient_Release
(
lookup_client
);
renderer
->
flags
&=
~
EVR_MIXER_INITED_SERVICES
;
}
return
hr
;
}
static
void
video_renderer_release_presenter_services
(
struct
video_renderer
*
renderer
)
{
IMFTopologyServiceLookupClient
*
lookup_client
;
if
(
renderer
->
flags
&
EVR_PRESENTER_INITED_SERVICES
&&
SUCCEEDED
(
IMFVideoPresenter_QueryInterface
(
renderer
->
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
)))
{
...
...
@@ -190,6 +203,21 @@ static void video_renderer_release_services(struct video_renderer *renderer)
}
}
static
void
video_renderer_release_services
(
struct
video_renderer
*
renderer
)
{
IMFTopologyServiceLookupClient
*
lookup_client
;
if
(
renderer
->
flags
&
EVR_MIXER_INITED_SERVICES
&&
SUCCEEDED
(
IMFTransform_QueryInterface
(
renderer
->
mixer
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
)))
{
IMFTopologyServiceLookupClient_ReleaseServicePointers
(
lookup_client
);
IMFTopologyServiceLookupClient_Release
(
lookup_client
);
renderer
->
flags
&=
~
EVR_MIXER_INITED_SERVICES
;
}
video_renderer_release_presenter_services
(
renderer
);
}
static
HRESULT
WINAPI
video_stream_sink_QueryInterface
(
IMFStreamSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_stream
*
stream
=
impl_from_IMFStreamSink
(
iface
);
...
...
@@ -1280,12 +1308,15 @@ static void video_renderer_set_presentation_clock(struct video_renderer *rendere
IMFPresentationClock_RemoveClockStateSink
(
renderer
->
clock
,
&
renderer
->
IMFClockStateSink_iface
);
IMFPresentationClock_Release
(
renderer
->
clock
);
}
video_renderer_release_presenter_services
(
renderer
);
renderer
->
clock
=
clock
;
if
(
renderer
->
clock
)
{
IMFPresentationClock_AddRef
(
renderer
->
clock
);
IMFPresentationClock_AddClockStateSink
(
renderer
->
clock
,
&
renderer
->
IMFClockStateSink_iface
);
}
video_renderer_init_presenter_services
(
renderer
);
}
static
HRESULT
WINAPI
video_renderer_sink_SetPresentationClock
(
IMFMediaSink
*
iface
,
IMFPresentationClock
*
clock
)
...
...
@@ -1579,7 +1610,6 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
static
HRESULT
video_renderer_configure_presenter
(
struct
video_renderer
*
renderer
)
{
IMFTopologyServiceLookupClient
*
lookup_client
;
IMFVideoDisplayControl
*
control
;
HRESULT
hr
;
...
...
@@ -1589,18 +1619,7 @@ static HRESULT video_renderer_configure_presenter(struct video_renderer *rendere
IMFVideoDisplayControl_Release
(
control
);
}
if
(
SUCCEEDED
(
hr
=
IMFVideoPresenter_QueryInterface
(
renderer
->
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
)))
{
renderer
->
flags
|=
EVR_INIT_SERVICES
;
if
(
SUCCEEDED
(
hr
=
IMFTopologyServiceLookupClient_InitServicePointers
(
lookup_client
,
&
renderer
->
IMFTopologyServiceLookup_iface
)))
{
renderer
->
flags
|=
EVR_PRESENTER_INITED_SERVICES
;
}
renderer
->
flags
&=
~
EVR_INIT_SERVICES
;
IMFTopologyServiceLookupClient_Release
(
lookup_client
);
}
hr
=
video_renderer_init_presenter_services
(
renderer
);
if
(
FAILED
(
MFGetService
((
IUnknown
*
)
renderer
->
presenter
,
&
MR_VIDEO_ACCELERATION_SERVICE
,
&
IID_IUnknown
,
(
void
**
)
&
renderer
->
device_manager
)))
...
...
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