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
b9393d08
Commit
b9393d08
authored
Mar 09, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Do not pretend to drop samples.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9107f591
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
37 deletions
+4
-37
renderer.c
dlls/strmbase/renderer.c
+3
-35
strmbase.h
include/wine/strmbase.h
+1
-2
No files found.
dlls/strmbase/renderer.c
View file @
b9393d08
...
...
@@ -59,39 +59,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
static
void
QualityControlRender_Start
(
struct
strmbase_qc
*
This
,
REFERENCE_TIME
tStart
)
{
This
->
last_
in_time
=
This
->
last_
left
=
This
->
avg_duration
=
This
->
avg_pt
=
-
1
;
This
->
last_left
=
This
->
avg_duration
=
This
->
avg_pt
=
-
1
;
This
->
clockstart
=
tStart
;
This
->
avg_rate
=
-
1
.
0
;
This
->
is_dropped
=
FALSE
;
}
static
BOOL
QualityControlRender_IsLate
(
struct
strmbase_qc
*
This
,
REFERENCE_TIME
jitter
,
REFERENCE_TIME
start
,
REFERENCE_TIME
stop
)
{
REFERENCE_TIME
max_lateness
=
200000
;
TRACE
(
"jitter %s, start %s, stop %s.
\n
"
,
debugstr_time
(
jitter
),
debugstr_time
(
start
),
debugstr_time
(
stop
));
/* we can add a valid stop time */
if
(
stop
>=
start
)
max_lateness
+=
stop
;
else
max_lateness
+=
start
;
/* if the jitter bigger than duration and lateness we are too late */
if
(
start
+
jitter
>
max_lateness
)
{
WARN
(
"buffer is too late %i > %i
\n
"
,
(
int
)((
start
+
jitter
)
/
10000
),
(
int
)(
max_lateness
/
10000
));
/* !!emergency!!, if we did not receive anything valid for more than a
* second, render it anyway so the user sees something */
if
(
This
->
last_in_time
<
0
||
start
-
This
->
last_in_time
<
10000000
)
return
TRUE
;
FIXME
(
"A lot of buffers are being dropped.
\n
"
);
FIXME
(
"There may be a timestamping problem, or this computer is too slow.
\n
"
);
}
This
->
last_in_time
=
start
;
return
FALSE
;
}
static
void
QualityControlRender_DoQOS
(
struct
strmbase_qc
*
priv
)
...
...
@@ -170,7 +140,7 @@ static void QualityControlRender_DoQOS(struct strmbase_qc *priv)
if
(
priv
->
last_left
>=
0
)
{
if
(
priv
->
is_dropped
||
priv
->
avg_rate
<
0
.
0
)
if
(
priv
->
avg_rate
<
0
.
0
)
{
priv
->
avg_rate
=
rate
;
}
...
...
@@ -231,9 +201,7 @@ static void QualityControlRender_BeginRender(struct strmbase_qc *This, REFERENCE
This
->
current_jitter
=
0
;
}
/* FIXME: This isn't correct; we don't drop samples, nor should. */
This
->
is_dropped
=
QualityControlRender_IsLate
(
This
,
This
->
current_jitter
,
start
,
stop
);
TRACE
(
"dropped %d, start %s, stop %s, jitter %s.
\n
"
,
This
->
is_dropped
,
TRACE
(
"start %s, stop %s, jitter %s.
\n
"
,
debugstr_time
(
start
),
debugstr_time
(
stop
),
debugstr_time
(
This
->
current_jitter
));
}
...
...
include/wine/strmbase.h
View file @
b9393d08
...
...
@@ -279,10 +279,9 @@ struct strmbase_qc
IQualityControl
*
tonotify
;
/* Render stuff */
REFERENCE_TIME
last_
in_time
,
last_
left
,
avg_duration
,
avg_pt
;
REFERENCE_TIME
last_left
,
avg_duration
,
avg_pt
;
REFERENCE_TIME
current_jitter
,
current_rstart
,
current_rstop
,
clockstart
;
double
avg_rate
;
BOOL
is_dropped
;
};
struct
strmbase_renderer
...
...
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