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
38d75c42
Commit
38d75c42
authored
Nov 10, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Notify renderer host about mixer latency.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4ec280e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
presenter.c
dlls/evr/presenter.c
+22
-0
No files found.
dlls/evr/presenter.c
View file @
38d75c42
...
...
@@ -131,6 +131,13 @@ static struct video_presenter *impl_from_IMFVideoPositionMapper(IMFVideoPosition
return
CONTAINING_RECORD
(
iface
,
struct
video_presenter
,
IMFVideoPositionMapper_iface
);
}
static
void
video_presenter_notify_renderer
(
struct
video_presenter
*
presenter
,
LONG
event
,
LONG_PTR
param1
,
LONG_PTR
param2
)
{
if
(
presenter
->
event_sink
)
IMediaEventSink_Notify
(
presenter
->
event_sink
,
event
,
param1
,
param2
);
}
static
unsigned
int
get_gcd
(
unsigned
int
a
,
unsigned
int
b
)
{
unsigned
int
m
;
...
...
@@ -329,6 +336,9 @@ static HRESULT video_presenter_process_input(struct video_presenter *presenter)
while
(
hr
==
S_OK
)
{
LONGLONG
mixing_started
,
mixing_finished
;
MFTIME
systime
;
if
(
!
(
presenter
->
flags
&
PRESENTER_MIXER_HAS_INPUT
))
break
;
...
...
@@ -341,6 +351,9 @@ static HRESULT video_presenter_process_input(struct video_presenter *presenter)
memset
(
&
buffer
,
0
,
sizeof
(
buffer
));
buffer
.
pSample
=
sample
;
if
(
presenter
->
clock
)
IMFClock_GetCorrelatedTime
(
presenter
->
clock
,
0
,
&
mixing_started
,
&
systime
);
if
(
FAILED
(
hr
=
IMFTransform_ProcessOutput
(
presenter
->
mixer
,
0
,
1
,
&
buffer
,
&
status
)))
{
/* FIXME: failure path probably needs to handle some errors specifically */
...
...
@@ -350,6 +363,15 @@ static HRESULT video_presenter_process_input(struct video_presenter *presenter)
}
else
{
if
(
presenter
->
clock
)
{
LONGLONG
latency
;
IMFClock_GetCorrelatedTime
(
presenter
->
clock
,
0
,
&
mixing_finished
,
&
systime
);
latency
=
mixing_finished
-
mixing_started
;
video_presenter_notify_renderer
(
presenter
,
EC_PROCESSING_LATENCY
,
(
LONG_PTR
)
&
latency
,
0
);
}
if
(
buffer
.
pEvents
)
IMFCollection_Release
(
buffer
.
pEvents
);
...
...
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