Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
220d610b
Commit
220d610b
authored
Dec 10, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Dec 14, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Handle EndOfStream more elegantly in dsound renderer.
parent
351165e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
10 deletions
+37
-10
dsoundrender.c
dlls/quartz/dsoundrender.c
+37
-10
No files found.
dlls/quartz/dsoundrender.c
View file @
220d610b
...
...
@@ -226,6 +226,42 @@ end:
return
S_OK
;
}
static
HRESULT
DSoundRender_HandleEndOfStream
(
DSoundRenderImpl
*
This
)
{
HRESULT
hr
;
IMediaEventSink
*
pEventSink
;
while
(
1
)
{
DWORD
pos1
,
pos2
;
DSoundRender_UpdatePositions
(
This
,
&
pos1
,
&
pos2
);
if
(
pos1
==
pos2
)
break
;
This
->
in_loop
=
1
;
LeaveCriticalSection
(
&
This
->
filter
.
csFilter
);
WaitForSingleObject
(
This
->
blocked
,
10
);
EnterCriticalSection
(
&
This
->
filter
.
csFilter
);
This
->
in_loop
=
0
;
if
(
This
->
pInputPin
->
flushing
||
This
->
filter
.
state
!=
State_Running
)
{
SetEvent
(
This
->
state_change
);
return
S_FALSE
;
}
}
if
(
!
This
->
filter
.
filterInfo
.
pGraph
)
return
S_OK
;
hr
=
IFilterGraph_QueryInterface
(
This
->
filter
.
filterInfo
.
pGraph
,
&
IID_IMediaEventSink
,
(
LPVOID
*
)
&
pEventSink
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaEventSink_Notify
(
pEventSink
,
EC_COMPLETE
,
S_OK
,
(
LONG_PTR
)
This
);
IMediaEventSink_Release
(
pEventSink
);
}
return
hr
;
}
static
HRESULT
DSoundRender_SendSampleData
(
DSoundRenderImpl
*
This
,
REFERENCE_TIME
tStart
,
REFERENCE_TIME
tStop
,
const
BYTE
*
data
,
DWORD
size
)
{
HRESULT
hr
;
...
...
@@ -875,7 +911,6 @@ static HRESULT WINAPI DSoundRender_InputPin_EndOfStream(IPin * iface)
{
BaseInputPin
*
This
=
(
BaseInputPin
*
)
iface
;
DSoundRenderImpl
*
me
=
(
DSoundRenderImpl
*
)
This
->
pin
.
pinInfo
.
pFilter
;
IMediaEventSink
*
pEventSink
;
HRESULT
hr
;
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
...
...
@@ -889,15 +924,7 @@ static HRESULT WINAPI DSoundRender_InputPin_EndOfStream(IPin * iface)
return
hr
;
}
if
(
me
->
filter
.
filterInfo
.
pGraph
)
{
hr
=
IFilterGraph_QueryInterface
(
me
->
filter
.
filterInfo
.
pGraph
,
&
IID_IMediaEventSink
,
(
LPVOID
*
)
&
pEventSink
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IMediaEventSink_Notify
(
pEventSink
,
EC_COMPLETE
,
S_OK
,
(
LONG_PTR
)
me
);
IMediaEventSink_Release
(
pEventSink
);
}
}
hr
=
DSoundRender_HandleEndOfStream
(
me
);
MediaSeekingPassThru_EOS
(
me
->
seekthru_unk
);
SetEvent
(
me
->
state_change
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
...
...
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