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
4a9893d4
Commit
4a9893d4
authored
Jan 30, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Rename the "pClock" member of struct strmbase_filter to "clock".
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6f71e2c4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
39 deletions
+41
-39
dsoundrender.c
dlls/quartz/dsoundrender.c
+4
-4
filter.c
dlls/strmbase/filter.c
+26
-24
qualitycontrol.c
dlls/strmbase/qualitycontrol.c
+6
-6
renderer.c
dlls/strmbase/renderer.c
+4
-4
strmbase.h
include/wine/strmbase.h
+1
-1
No files found.
dlls/quartz/dsoundrender.c
View file @
4a9893d4
...
...
@@ -141,9 +141,9 @@ static HRESULT DSoundRender_GetWritePos(DSoundRenderImpl *This, DWORD *ret_write
DSoundRender_UpdatePositions
(
This
,
&
writepos
,
&
min_writepos
);
playpos
=
This
->
last_playpos
;
if
(
This
->
renderer
.
filter
.
pC
lock
)
if
(
This
->
renderer
.
filter
.
c
lock
)
{
IReferenceClock_GetTime
(
This
->
renderer
.
filter
.
pC
lock
,
&
cur
);
IReferenceClock_GetTime
(
This
->
renderer
.
filter
.
c
lock
,
&
cur
);
cur
-=
This
->
renderer
.
stream_start
;
}
else
write_at
=
-
1
;
...
...
@@ -363,10 +363,10 @@ static HRESULT WINAPI DSoundRender_DoRenderSample(struct strmbase_renderer *ifac
TRACE
(
"Sample data ptr = %p, size = %d
\n
"
,
pbSrcStream
,
cbSrcStream
);
hr
=
DSoundRender_SendSampleData
(
This
,
tStart
,
tStop
,
pbSrcStream
,
cbSrcStream
);
if
(
This
->
renderer
.
filter
.
state
==
State_Running
&&
This
->
renderer
.
filter
.
pC
lock
&&
tStart
>=
0
)
{
if
(
This
->
renderer
.
filter
.
state
==
State_Running
&&
This
->
renderer
.
filter
.
c
lock
&&
tStart
>=
0
)
{
REFERENCE_TIME
jitter
,
now
=
0
;
Quality
q
;
IReferenceClock_GetTime
(
This
->
renderer
.
filter
.
pC
lock
,
&
now
);
IReferenceClock_GetTime
(
This
->
renderer
.
filter
.
c
lock
,
&
now
);
jitter
=
now
-
This
->
renderer
.
stream_start
-
tStart
;
if
(
jitter
<=
-
DSoundRenderer_Max_Fill
)
jitter
+=
DSoundRenderer_Max_Fill
;
...
...
dlls/strmbase/filter.c
View file @
4a9893d4
...
...
@@ -380,36 +380,38 @@ static HRESULT WINAPI filter_GetState(IBaseFilter *iface, DWORD timeout, FILTER_
return
hr
;
}
static
HRESULT
WINAPI
filter_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
pC
lock
)
static
HRESULT
WINAPI
filter_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
c
lock
)
{
struct
strmbase_filter
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pClock
);
struct
strmbase_filter
*
filter
=
impl_from_IBaseFilter
(
iface
);
EnterCriticalSection
(
&
This
->
csFilter
);
{
if
(
This
->
pClock
)
IReferenceClock_Release
(
This
->
pClock
);
This
->
pClock
=
pClock
;
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
TRACE
(
"filter %p, clock %p.
\n
"
,
filter
,
clock
);
EnterCriticalSection
(
&
filter
->
csFilter
);
if
(
filter
->
clock
)
IReferenceClock_Release
(
filter
->
clock
);
filter
->
clock
=
clock
;
if
(
filter
->
clock
)
IReferenceClock_AddRef
(
filter
->
clock
);
LeaveCriticalSection
(
&
filter
->
csFilter
);
return
S_OK
;
}
static
HRESULT
WINAPI
filter_GetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
**
ppC
lock
)
static
HRESULT
WINAPI
filter_GetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
**
c
lock
)
{
struct
strmbase_filter
*
This
=
impl_from_IBaseFilter
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppClock
);
struct
strmbase_filter
*
filter
=
impl_from_IBaseFilter
(
iface
);
EnterCriticalSection
(
&
This
->
csFilter
);
{
*
ppClock
=
This
->
pClock
;
if
(
This
->
pClock
)
IReferenceClock_AddRef
(
This
->
pClock
);
}
LeaveCriticalSection
(
&
This
->
csFilter
);
TRACE
(
"filter %p, clock %p.
\n
"
,
filter
,
clock
);
EnterCriticalSection
(
&
filter
->
csFilter
);
*
clock
=
filter
->
clock
;
if
(
filter
->
clock
)
IReferenceClock_AddRef
(
filter
->
clock
);
LeaveCriticalSection
(
&
filter
->
csFilter
);
return
S_OK
;
}
...
...
@@ -528,8 +530,8 @@ void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer,
void
strmbase_filter_cleanup
(
struct
strmbase_filter
*
This
)
{
if
(
This
->
pC
lock
)
IReferenceClock_Release
(
This
->
pC
lock
);
if
(
This
->
c
lock
)
IReferenceClock_Release
(
This
->
c
lock
);
This
->
IBaseFilter_iface
.
lpVtbl
=
NULL
;
DeleteCriticalSection
(
&
This
->
csFilter
);
...
...
dlls/strmbase/qualitycontrol.c
View file @
4a9893d4
...
...
@@ -160,7 +160,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv)
TRACE
(
"%p
\n
"
,
priv
);
if
(
!
priv
->
pin
->
filter
->
pC
lock
||
priv
->
current_rstart
<
0
)
if
(
!
priv
->
pin
->
filter
->
c
lock
||
priv
->
current_rstart
<
0
)
return
;
start
=
priv
->
current_rstart
;
...
...
@@ -276,7 +276,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
if
(
start
>=
0
)
{
REFERENCE_TIME
now
;
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pC
lock
,
&
now
);
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
c
lock
,
&
now
);
This
->
current_jitter
=
(
now
-
This
->
clockstart
)
-
start
;
}
else
...
...
@@ -291,10 +291,10 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
else
This
->
rendered
++
;
if
(
!
This
->
pin
->
filter
->
pC
lock
)
if
(
!
This
->
pin
->
filter
->
c
lock
)
return
;
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pC
lock
,
&
This
->
start
);
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
c
lock
,
&
This
->
start
);
TRACE
(
"Starting at %s.
\n
"
,
debugstr_time
(
This
->
start
));
}
...
...
@@ -305,8 +305,8 @@ void QualityControlRender_EndRender(QualityControlImpl *This)
TRACE
(
"%p
\n
"
,
This
);
if
(
!
This
->
pin
->
filter
->
pC
lock
||
This
->
start
<
0
||
FAILED
(
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
pC
lock
,
&
This
->
stop
)))
if
(
!
This
->
pin
->
filter
->
c
lock
||
This
->
start
<
0
||
FAILED
(
IReferenceClock_GetTime
(
This
->
pin
->
filter
->
c
lock
,
&
This
->
stop
)))
return
;
elapsed
=
This
->
start
-
This
->
stop
;
...
...
dlls/strmbase/renderer.c
View file @
4a9893d4
...
...
@@ -331,7 +331,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
SetEvent
(
This
->
state_event
);
/* Wait for render Time */
if
(
This
->
filter
.
pC
lock
&&
SUCCEEDED
(
IMediaSample_GetTime
(
pSample
,
&
start
,
&
stop
)))
if
(
This
->
filter
.
c
lock
&&
SUCCEEDED
(
IMediaSample_GetTime
(
pSample
,
&
start
,
&
stop
)))
{
hr
=
S_FALSE
;
RendererPosPassThru_RegisterMediaTime
(
This
->
pPosition
,
start
);
...
...
@@ -345,20 +345,20 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
REFERENCE_TIME
now
;
DWORD_PTR
cookie
;
IReferenceClock_GetTime
(
This
->
filter
.
pC
lock
,
&
now
);
IReferenceClock_GetTime
(
This
->
filter
.
c
lock
,
&
now
);
if
(
now
-
This
->
stream_start
-
start
<=
-
10000
)
{
HANDLE
handles
[
2
]
=
{
This
->
advise_event
,
This
->
flush_event
};
DWORD
ret
;
IReferenceClock_AdviseTime
(
This
->
filter
.
pC
lock
,
This
->
stream_start
,
IReferenceClock_AdviseTime
(
This
->
filter
.
c
lock
,
This
->
stream_start
,
start
,
(
HEVENT
)
This
->
advise_event
,
&
cookie
);
LeaveCriticalSection
(
&
This
->
csRenderLock
);
ret
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
INFINITE
);
IReferenceClock_Unadvise
(
This
->
filter
.
pC
lock
,
cookie
);
IReferenceClock_Unadvise
(
This
->
filter
.
c
lock
,
cookie
);
if
(
ret
==
1
)
{
...
...
include/wine/strmbase.h
View file @
4a9893d4
...
...
@@ -129,7 +129,7 @@ struct strmbase_filter
CRITICAL_SECTION
csFilter
;
FILTER_STATE
state
;
IReferenceClock
*
pC
lock
;
IReferenceClock
*
c
lock
;
WCHAR
name
[
128
];
IFilterGraph
*
graph
;
CLSID
clsid
;
...
...
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