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
9a760f94
Commit
9a760f94
authored
Oct 27, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Oct 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Retrieve the filter clock from the pin pointer.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db7eb332
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
33 deletions
+7
-33
qualitycontrol.c
dlls/strmbase/qualitycontrol.c
+6
-13
renderer.c
dlls/strmbase/renderer.c
+1
-18
strmbase_private.h
dlls/strmbase/strmbase_private.h
+0
-2
No files found.
dlls/strmbase/qualitycontrol.c
View file @
9a760f94
...
...
@@ -36,7 +36,6 @@ HRESULT QualityControlImpl_Create(struct strmbase_pin *pin, QualityControlImpl *
This
=
*
ppv
;
This
->
pin
=
pin
;
This
->
tonotify
=
NULL
;
This
->
clock
=
NULL
;
This
->
current_rstart
=
This
->
current_rstop
=
-
1
;
TRACE
(
"-> %p
\n
"
,
This
);
return
S_OK
;
...
...
@@ -125,13 +124,6 @@ void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
This
->
qos_handled
=
TRUE
;
/* Lie that will be corrected on first adjustment */
}
void
QualityControlRender_SetClock
(
QualityControlImpl
*
This
,
IReferenceClock
*
clock
)
{
TRACE
(
"%p %p
\n
"
,
This
,
clock
);
This
->
clock
=
clock
;
}
static
BOOL
QualityControlRender_IsLate
(
QualityControlImpl
*
This
,
REFERENCE_TIME
jitter
,
REFERENCE_TIME
start
,
REFERENCE_TIME
stop
)
{
...
...
@@ -168,7 +160,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv)
TRACE
(
"%p
\n
"
,
priv
);
if
(
!
priv
->
c
lock
||
priv
->
current_rstart
<
0
)
if
(
!
priv
->
pin
->
filter
->
pC
lock
||
priv
->
current_rstart
<
0
)
return
;
start
=
priv
->
current_rstart
;
...
...
@@ -284,7 +276,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
if
(
start
>=
0
)
{
REFERENCE_TIME
now
;
IReferenceClock_GetTime
(
This
->
c
lock
,
&
now
);
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pC
lock
,
&
now
);
This
->
current_jitter
=
(
now
-
This
->
clockstart
)
-
start
;
}
else
...
...
@@ -299,10 +291,10 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
else
This
->
rendered
++
;
if
(
!
This
->
c
lock
)
if
(
!
This
->
pin
->
filter
->
pC
lock
)
return
;
IReferenceClock_GetTime
(
This
->
c
lock
,
&
This
->
start
);
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pC
lock
,
&
This
->
start
);
TRACE
(
"Starting at %s.
\n
"
,
debugstr_time
(
This
->
start
));
}
...
...
@@ -313,7 +305,8 @@ void QualityControlRender_EndRender(QualityControlImpl *This)
TRACE
(
"%p
\n
"
,
This
);
if
(
!
This
->
clock
||
This
->
start
<
0
||
FAILED
(
IReferenceClock_GetTime
(
This
->
clock
,
&
This
->
stop
)))
if
(
!
This
->
pin
->
filter
->
pClock
||
This
->
start
<
0
||
FAILED
(
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pClock
,
&
This
->
stop
)))
return
;
elapsed
=
This
->
start
-
This
->
stop
;
...
...
dlls/strmbase/renderer.c
View file @
9a760f94
...
...
@@ -22,11 +22,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
static
inline
struct
strmbase_renderer
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_renderer
,
filter
.
IBaseFilter_iface
);
}
static
inline
struct
strmbase_renderer
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
strmbase_renderer
,
filter
);
...
...
@@ -436,18 +431,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
return
hr
;
}
static
HRESULT
WINAPI
BaseRendererImpl_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
clock
)
{
struct
strmbase_renderer
*
This
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
;
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
QualityControlRender_SetClock
(
This
->
qcimpl
,
clock
);
hr
=
BaseFilterImpl_SetSyncSource
(
iface
,
clock
);
LeaveCriticalSection
(
&
This
->
filter
.
csFilter
);
return
hr
;
}
static
const
IBaseFilterVtbl
strmbase_renderer_vtbl
=
{
BaseFilterImpl_QueryInterface
,
...
...
@@ -458,7 +441,7 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl =
BaseFilterImpl_Pause
,
BaseFilterImpl_Run
,
BaseFilterImpl_GetState
,
Base
Render
erImpl_SetSyncSource
,
Base
Filt
erImpl_SetSyncSource
,
BaseFilterImpl_GetSyncSource
,
BaseFilterImpl_EnumPins
,
BaseFilterImpl_FindPin
,
...
...
dlls/strmbase/strmbase_private.h
View file @
9a760f94
...
...
@@ -57,7 +57,6 @@ typedef struct QualityControlImpl {
IQualityControl
*
tonotify
;
/* Render stuff */
IReferenceClock
*
clock
;
REFERENCE_TIME
last_in_time
,
last_left
,
avg_duration
,
avg_pt
,
avg_render
,
start
,
stop
;
REFERENCE_TIME
current_jitter
,
current_rstart
,
current_rstop
,
clockstart
;
double
avg_rate
;
...
...
@@ -74,7 +73,6 @@ HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *se
HRESULT
WINAPI
QualityControlImpl_SetSink
(
IQualityControl
*
iface
,
IQualityControl
*
tonotify
);
void
QualityControlRender_Start
(
QualityControlImpl
*
This
,
REFERENCE_TIME
tStart
);
void
QualityControlRender_SetClock
(
QualityControlImpl
*
This
,
IReferenceClock
*
clock
);
void
QualityControlRender_DoQOS
(
QualityControlImpl
*
priv
);
void
QualityControlRender_BeginRender
(
QualityControlImpl
*
This
,
REFERENCE_TIME
start
,
REFERENCE_TIME
stop
);
void
QualityControlRender_EndRender
(
QualityControlImpl
*
This
);
...
...
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