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
aa88c5d6
Commit
aa88c5d6
authored
Sep 05, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Get rid of the "pCritSec" member of BasePin.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
28a51155
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
86 deletions
+78
-86
dsoundrender.c
dlls/quartz/dsoundrender.c
+2
-2
parser.c
dlls/quartz/parser.c
+10
-10
pin.c
dlls/quartz/pin.c
+24
-25
pin.c
dlls/strmbase/pin.c
+24
-26
renderer.c
dlls/strmbase/renderer.c
+4
-4
gstdemux.c
dlls/winegstreamer/gstdemux.c
+6
-8
qtsplitter.c
dlls/wineqtdecoder/qtsplitter.c
+8
-10
strmbase.h
include/wine/strmbase.h
+0
-1
No files found.
dlls/quartz/dsoundrender.c
View file @
aa88c5d6
...
...
@@ -505,9 +505,9 @@ static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface)
if
(
This
->
threadid
)
{
PostThreadMessageW
(
This
->
threadid
,
WM_APP
,
0
,
0
);
LeaveCriticalSection
(
This
->
renderer
.
sink
.
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
WaitForSingleObject
(
This
->
advisethread
,
INFINITE
);
EnterCriticalSection
(
This
->
renderer
.
sink
.
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
CloseHandle
(
This
->
advisethread
);
}
if
(
This
->
dsbuffer
)
...
...
dlls/quartz/parser.c
View file @
aa88c5d6
...
...
@@ -552,9 +552,9 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin,
ParserImpl
*
parser
=
impl_from_IBaseFilter
(
&
This
->
pin
.
pin
.
filter
->
IBaseFilter_iface
);
/* Set the allocator to our input pin's */
EnterCriticalSection
(
This
->
pin
.
pin
.
pCritSec
);
EnterCriticalSection
(
&
parser
->
filter
.
csFilter
);
This
->
alloc
=
parser
->
pInputPin
->
pAlloc
;
LeaveCriticalSection
(
This
->
pin
.
pin
.
pCritSec
);
LeaveCriticalSection
(
&
parser
->
filter
.
csFilter
);
return
BaseOutputPinImpl_Connect
(
iface
,
pReceivePin
,
pmt
);
}
...
...
@@ -623,22 +623,22 @@ static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface)
TRACE
(
"()
\n
"
);
EnterCriticalSection
(
&
This
->
thread_lock
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pin
.
pConnectedTo
)
{
FILTER_STATE
state
;
ParserImpl
*
Parser
=
impl_from_IBaseFilter
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
hr
=
IBaseFilter_GetState
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
,
INFINITE
,
&
state
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
SUCCEEDED
(
hr
)
&&
(
state
==
State_Stopped
)
&&
SUCCEEDED
(
Parser
->
fnDisconnect
(
Parser
)))
{
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
PullPin_Disconnect
(
iface
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
hr
=
Parser_RemoveOutputPins
(
impl_from_IBaseFilter
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
));
}
else
...
...
@@ -647,7 +647,7 @@ static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface)
else
hr
=
S_FALSE
;
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
LeaveCriticalSection
(
&
This
->
thread_lock
);
return
hr
;
...
...
@@ -664,9 +664,9 @@ static HRESULT WINAPI Parser_PullPin_ReceiveConnection(IPin * iface, IPin * pRec
{
BasePin
*
This
=
(
BasePin
*
)
iface
;
EnterCriticalSection
(
This
->
pCritSec
);
EnterCriticalSection
(
&
This
->
filter
->
csFilter
);
Parser_RemoveOutputPins
(
impl_from_IBaseFilter
(
&
This
->
filter
->
IBaseFilter_iface
));
LeaveCriticalSection
(
This
->
pCritSec
);
LeaveCriticalSection
(
&
This
->
filter
->
csFilter
);
}
return
hr
;
...
...
dlls/quartz/pin.c
View file @
aa88c5d6
...
...
@@ -174,7 +174,6 @@ static HRESULT PullPin_Init(const IPinVtbl *PullPin_Vtbl, struct strmbase_filter
/* Common attributes */
pPinImpl
->
pin
.
IPin_iface
.
lpVtbl
=
PullPin_Vtbl
;
pPinImpl
->
pin
.
pConnectedTo
=
NULL
;
pPinImpl
->
pin
.
pCritSec
=
&
filter
->
csFilter
;
wcscpy
(
pPinImpl
->
pin
.
name
,
name
);
pPinImpl
->
pin
.
dir
=
PINDIR_INPUT
;
pPinImpl
->
pin
.
filter
=
filter
;
...
...
@@ -244,7 +243,7 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
This
,
iface
,
pReceivePin
,
pmt
);
dump_AM_MEDIA_TYPE
(
pmt
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
!
This
->
pin
.
pConnectedTo
)
{
ALLOCATOR_PROPERTIES
props
;
...
...
@@ -323,7 +322,7 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
}
else
hr
=
VFW_E_ALREADY_CONNECTED
;
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -382,7 +381,7 @@ static void PullPin_Flush(PullPin *This)
if
(
This
->
pReader
)
{
/* Do not allow state to change while flushing */
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
/* Flush outstanding samples */
IAsyncReader_BeginFlush
(
This
->
pReader
);
...
...
@@ -404,7 +403,7 @@ static void PullPin_Flush(PullPin *This)
IAsyncReader_EndFlush
(
This
->
pReader
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
}
}
...
...
@@ -435,9 +434,9 @@ static void PullPin_Thread_Process(PullPin *This)
if
(
FAILED
(
hr
))
ERR
(
"Request error: %x
\n
"
,
hr
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
SetEvent
(
This
->
hEventStateChanged
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
SUCCEEDED
(
hr
))
do
...
...
@@ -505,19 +504,19 @@ static void PullPin_Thread_Pause(PullPin *This)
{
PullPin_Flush
(
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
This
->
state
=
Req_Sleepy
;
SetEvent
(
This
->
hEventStateChanged
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
}
static
void
PullPin_Thread_Stop
(
PullPin
*
This
)
{
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
SetEvent
(
This
->
hEventStateChanged
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
IPin_Release
(
&
This
->
pin
.
IPin_iface
);
...
...
@@ -562,7 +561,7 @@ static HRESULT PullPin_InitProcessing(PullPin * This)
DWORD
dwThreadId
;
WaitForSingleObject
(
This
->
hEventStateChanged
,
INFINITE
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
assert
(
!
This
->
hThread
);
assert
(
This
->
state
==
Req_Die
);
...
...
@@ -584,7 +583,7 @@ static HRESULT PullPin_InitProcessing(PullPin * This)
SetEvent
(
This
->
hEventStateChanged
);
/* If assert fails, that means a command was not processed before the thread previously terminated */
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
}
TRACE
(
" -- %x
\n
"
,
hr
);
...
...
@@ -625,7 +624,7 @@ HRESULT PullPin_PauseProcessing(PullPin * This)
PullPin_WaitForStateChange
(
This
,
INFINITE
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
assert
(
!
This
->
stop_playback
);
assert
(
This
->
state
==
Req_Run
||
This
->
state
==
Req_Sleepy
);
...
...
@@ -652,7 +651,7 @@ HRESULT PullPin_PauseProcessing(PullPin * This)
}
while
(
pSample
);
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
}
return
S_OK
;
...
...
@@ -700,10 +699,10 @@ HRESULT WINAPI PullPin_EndOfStream(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
iface
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
hr
=
SendFurther
(
iface
,
deliver_endofstream
,
NULL
,
NULL
);
SetEvent
(
This
->
hEventStateChanged
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -713,11 +712,11 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface)
PullPin
*
This
=
impl_PullPin_from_IPin
(
iface
);
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
SendFurther
(
iface
,
deliver_beginflush
,
NULL
,
NULL
);
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
EnterCriticalSection
(
&
This
->
thread_lock
);
{
...
...
@@ -733,11 +732,11 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface)
}
LeaveCriticalSection
(
&
This
->
thread_lock
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
This
->
fnCleanProc
(
This
->
pUserData
);
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
S_OK
;
}
...
...
@@ -749,9 +748,9 @@ HRESULT WINAPI PullPin_EndFlush(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
iface
);
/* Send further first: Else a race condition might terminate processing early */
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
SendFurther
(
iface
,
deliver_endflush
,
NULL
,
NULL
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
EnterCriticalSection
(
&
This
->
thread_lock
);
{
...
...
@@ -779,7 +778,7 @@ HRESULT WINAPI PullPin_Disconnect(IPin *iface)
TRACE
(
"()
\n
"
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
FAILED
(
hr
=
IMemAllocator_Decommit
(
This
->
pAlloc
)))
ERR
(
"Allocator decommit failed with error %x. Possible memory leak
\n
"
,
hr
);
...
...
@@ -797,7 +796,7 @@ HRESULT WINAPI PullPin_Disconnect(IPin *iface)
else
hr
=
S_FALSE
;
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
WaitForSingleObject
(
This
->
hThread
,
INFINITE
);
CloseHandle
(
This
->
hThread
);
...
...
dlls/strmbase/pin.c
View file @
aa88c5d6
...
...
@@ -184,7 +184,7 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pCritSec
);
EnterCriticalSection
(
&
This
->
filter
->
csFilter
);
{
if
(
This
->
pConnectedTo
)
{
...
...
@@ -197,7 +197,7 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
else
hr
=
S_FALSE
;
}
LeaveCriticalSection
(
This
->
pCritSec
);
LeaveCriticalSection
(
&
This
->
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -209,7 +209,7 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppPin
);
EnterCriticalSection
(
This
->
pCritSec
);
EnterCriticalSection
(
&
This
->
filter
->
csFilter
);
{
if
(
This
->
pConnectedTo
)
{
...
...
@@ -223,7 +223,7 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
*
ppPin
=
NULL
;
}
}
LeaveCriticalSection
(
This
->
pCritSec
);
LeaveCriticalSection
(
&
This
->
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -235,7 +235,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pmt
);
EnterCriticalSection
(
This
->
pCritSec
);
EnterCriticalSection
(
&
This
->
filter
->
csFilter
);
{
if
(
This
->
pConnectedTo
)
{
...
...
@@ -248,7 +248,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
hr
=
VFW_E_NOT_CONNECTED
;
}
}
LeaveCriticalSection
(
This
->
pCritSec
);
LeaveCriticalSection
(
&
This
->
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -384,7 +384,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
* catches the obvious case */
assert
(
pReceivePin
!=
iface
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
/* if we have been a specific type to connect with, then we can either connect
* with that or fail. We cannot choose different AM_MEDIA_TYPE */
...
...
@@ -447,7 +447,7 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
}
/* if not found */
}
/* if negotiate media type */
}
/* if succeeded */
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
TRACE
(
" -- %x
\n
"
,
hr
);
return
hr
;
...
...
@@ -466,7 +466,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pMemInputPin
)
{
...
...
@@ -484,7 +484,7 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
else
hr
=
S_FALSE
;
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -542,7 +542,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa
PIN_INFO
pinInfo
;
HRESULT
hr
;
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
!
This
->
pin
.
pConnectedTo
||
!
This
->
pMemInputPin
)
hr
=
VFW_E_NOT_CONNECTED
;
...
...
@@ -556,7 +556,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa
hr
=
IPin_QueryPinInfo
(
This
->
pin
.
pConnectedTo
,
&
pinInfo
);
}
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -582,14 +582,14 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This)
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
!
This
->
pin
.
pConnectedTo
||
!
This
->
pMemInputPin
)
hr
=
VFW_E_NOT_CONNECTED
;
else
hr
=
IMemAllocator_Commit
(
This
->
pAllocator
);
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
TRACE
(
"--> %08x
\n
"
,
hr
);
return
hr
;
...
...
@@ -602,14 +602,14 @@ HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This)
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
!
This
->
pin
.
pConnectedTo
||
!
This
->
pMemInputPin
)
hr
=
VFW_E_NOT_CONNECTED
;
else
hr
=
IMemAllocator_Decommit
(
This
->
pAllocator
);
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
TRACE
(
"--> %08x
\n
"
,
hr
);
return
hr
;
...
...
@@ -709,7 +709,6 @@ void strmbase_source_init(BaseOutputPin *pin, const IPinVtbl *vtbl, struct strmb
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
pin
->
pin
.
IPin_iface
.
lpVtbl
=
vtbl
;
pin
->
pin
.
pCritSec
=
&
filter
->
csFilter
;
pin
->
pin
.
dRate
=
1
.
0
;
pin
->
pin
.
filter
=
filter
;
pin
->
pin
.
dir
=
PINDIR_OUTPUT
;
...
...
@@ -779,7 +778,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
pReceivePin
,
pmt
);
dump_AM_MEDIA_TYPE
(
pmt
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pin
.
pConnectedTo
)
hr
=
VFW_E_ALREADY_CONNECTED
;
...
...
@@ -806,7 +805,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
IPin_AddRef
(
pReceivePin
);
}
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -823,12 +822,12 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
This
->
flushing
)
hr
=
S_FALSE
;
else
This
->
end_of_stream
=
TRUE
;
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
if
(
hr
==
S_OK
)
hr
=
SendFurther
(
iface
,
deliver_endofstream
,
NULL
,
NULL
);
...
...
@@ -846,11 +845,11 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
HRESULT
hr
;
TRACE
(
"(%p) semi-stub
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
This
->
flushing
=
TRUE
;
hr
=
SendFurther
(
iface
,
deliver_beginflush
,
NULL
,
NULL
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -866,11 +865,11 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
HRESULT
hr
;
TRACE
(
"(%p)->()
\n
"
,
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
This
->
flushing
=
This
->
end_of_stream
=
FALSE
;
hr
=
SendFurther
(
iface
,
deliver_endflush
,
NULL
,
NULL
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
return
hr
;
}
...
...
@@ -1037,7 +1036,6 @@ void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl, struct strmbase
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
pin
->
pin
.
IPin_iface
.
lpVtbl
=
vtbl
;
pin
->
pin
.
pCritSec
=
&
filter
->
csFilter
;
pin
->
pin
.
dRate
=
1
.
0
;
pin
->
pin
.
filter
=
filter
;
pin
->
pin
.
dir
=
PINDIR_INPUT
;
...
...
dlls/strmbase/renderer.c
View file @
aa88c5d6
...
...
@@ -52,14 +52,14 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin *iface, IPin
TRACE
(
"iface %p, peer %p, mt %p.
\n
"
,
iface
,
peer
,
mt
);
EnterCriticalSection
(
filter
->
sink
.
pin
.
pCritSec
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
hr
=
BaseInputPinImpl_ReceiveConnection
(
iface
,
peer
,
mt
);
if
(
SUCCEEDED
(
hr
))
{
if
(
filter
->
pFuncsTable
->
pfnCompleteConnect
)
hr
=
filter
->
pFuncsTable
->
pfnCompleteConnect
(
filter
,
peer
);
}
LeaveCriticalSection
(
filter
->
sink
.
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
...
...
@@ -71,7 +71,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
TRACE
(
"iface %p.
\n
"
,
iface
);
EnterCriticalSection
(
filter
->
sink
.
pin
.
pCritSec
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
hr
=
BasePinImpl_Disconnect
(
iface
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -79,7 +79,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
hr
=
filter
->
pFuncsTable
->
pfnBreakConnect
(
filter
);
}
BaseRendererImpl_ClearPendingSample
(
filter
);
LeaveCriticalSection
(
filter
->
sink
.
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
...
...
dlls/winegstreamer/gstdemux.c
View file @
aa88c5d6
...
...
@@ -1287,7 +1287,6 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *outer, HRESULT *phr)
lstrcpynW
(
This
->
pInputPin
.
pin
.
name
,
wcsInputPinName
,
ARRAY_SIZE
(
This
->
pInputPin
.
pin
.
name
));
This
->
pInputPin
.
pin
.
IPin_iface
.
lpVtbl
=
&
GST_InputPin_Vtbl
;
This
->
pInputPin
.
pin
.
pConnectedTo
=
NULL
;
This
->
pInputPin
.
pin
.
pCritSec
=
&
This
->
filter
.
csFilter
;
ZeroMemory
(
&
This
->
pInputPin
.
pin
.
mtCurrent
,
sizeof
(
AM_MEDIA_TYPE
));
*
phr
=
S_OK
;
...
...
@@ -1744,14 +1743,12 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *base, IMemInputPi
static
void
free_source_pin
(
GSTOutPin
*
pin
)
{
EnterCriticalSection
(
pin
->
pin
.
pin
.
pCritSec
);
if
(
pin
->
pin
.
pin
.
pConnectedTo
)
{
if
(
SUCCEEDED
(
IMemAllocator_Decommit
(
pin
->
pin
.
pAllocator
)))
IPin_Disconnect
(
pin
->
pin
.
pin
.
pConnectedTo
);
IPin_Disconnect
(
&
pin
->
pin
.
pin
.
IPin_iface
);
}
LeaveCriticalSection
(
pin
->
pin
.
pin
.
pCritSec
);
if
(
pin
->
their_src
)
{
...
...
@@ -1881,7 +1878,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
mark_wine_thread
();
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
if
(
!
This
->
pin
.
pConnectedTo
)
{
ALLOCATOR_PROPERTIES
props
;
IMemAllocator
*
pAlloc
=
NULL
;
...
...
@@ -1940,13 +1937,14 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
TRACE
(
"Size: %i
\n
"
,
props
.
cbBuffer
);
}
else
hr
=
VFW_E_ALREADY_CONNECTED
;
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
static
HRESULT
WINAPI
GSTInPin_Disconnect
(
IPin
*
iface
)
{
GSTInPin
*
This
=
impl_sink_from_IPin
(
iface
);
GSTImpl
*
filter
=
impl_from_strmbase_filter
(
This
->
pin
.
filter
);
HRESULT
hr
;
FILTER_STATE
state
;
...
...
@@ -1954,8 +1952,8 @@ static HRESULT WINAPI GSTInPin_Disconnect(IPin *iface)
mark_wine_thread
();
hr
=
IBaseFilter_GetState
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
,
INFINITE
,
&
state
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
hr
=
IBaseFilter_GetState
(
&
filter
->
filter
.
IBaseFilter_iface
,
INFINITE
,
&
state
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
if
(
This
->
pin
.
pConnectedTo
)
{
GSTImpl
*
Parser
=
impl_from_strmbase_filter
(
This
->
pin
.
filter
);
...
...
@@ -1969,7 +1967,7 @@ static HRESULT WINAPI GSTInPin_Disconnect(IPin *iface)
hr
=
VFW_E_NOT_STOPPED
;
}
else
hr
=
S_FALSE
;
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
...
...
dlls/wineqtdecoder/qtsplitter.c
View file @
aa88c5d6
...
...
@@ -317,7 +317,6 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
lstrcpynW
(
This
->
pInputPin
.
pin
.
name
,
wcsInputPinName
,
ARRAY_SIZE
(
This
->
pInputPin
.
pin
.
name
));
This
->
pInputPin
.
pin
.
IPin_iface
.
lpVtbl
=
&
QT_InputPin_Vtbl
;
This
->
pInputPin
.
pin
.
pConnectedTo
=
NULL
;
This
->
pInputPin
.
pin
.
pCritSec
=
&
This
->
filter
.
csFilter
;
SourceSeeking_Init
(
&
This
->
sourceSeeking
,
&
QT_Seeking_Vtbl
,
QTSplitter_ChangeStop
,
QTSplitter_ChangeStart
,
QTSplitter_ChangeRate
,
&
This
->
filter
.
csFilter
);
...
...
@@ -778,14 +777,12 @@ static const IBaseFilterVtbl QT_Vtbl = {
static
void
free_source_pin
(
QTOutPin
*
pin
)
{
EnterCriticalSection
(
pin
->
pin
.
pin
.
pCritSec
);
if
(
pin
->
pin
.
pin
.
pConnectedTo
)
{
if
(
SUCCEEDED
(
IMemAllocator_Decommit
(
pin
->
pin
.
pAllocator
)))
IPin_Disconnect
(
pin
->
pin
.
pin
.
pConnectedTo
);
IPin_Disconnect
(
&
pin
->
pin
.
pin
.
IPin_iface
);
}
LeaveCriticalSection
(
pin
->
pin
.
pin
.
pCritSec
);
DeleteMediaType
(
pin
->
pmt
);
strmbase_source_cleanup
(
&
pin
->
pin
);
...
...
@@ -1044,7 +1041,7 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
TRACE
(
"(%p/%p)->(%p, %p)
\n
"
,
This
,
iface
,
pReceivePin
,
pmt
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
This
->
pReader
=
NULL
;
if
(
This
->
pin
.
pConnectedTo
)
...
...
@@ -1061,19 +1058,19 @@ static HRESULT WINAPI QTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
hr
=
IPin_QueryInterface
(
pReceivePin
,
&
IID_IAsyncReader
,
(
LPVOID
*
)
&
This
->
pReader
);
if
(
FAILED
(
hr
))
{
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
TRACE
(
"Input source is not an AsyncReader
\n
"
);
return
hr
;
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
hr
=
QT_Process_Movie
(
filter
);
if
(
FAILED
(
hr
))
...
...
@@ -1129,11 +1126,12 @@ static HRESULT WINAPI QTInPin_Disconnect(IPin *iface)
{
HRESULT
hr
;
QTInPin
*
This
=
impl_from_IPin
(
iface
);
QTSplitter
*
filter
=
impl_from_strmbase_filter
(
This
->
pin
.
filter
);
FILTER_STATE
state
;
TRACE
(
"()
\n
"
);
hr
=
IBaseFilter_GetState
(
&
This
->
pin
.
filter
->
IBaseFilter_iface
,
INFINITE
,
&
state
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
hr
=
IBaseFilter_GetState
(
&
filter
->
filter
.
IBaseFilter_iface
,
INFINITE
,
&
state
);
EnterCriticalSection
(
&
filter
->
filter
.
csFilter
);
if
(
This
->
pin
.
pConnectedTo
)
{
QTSplitter
*
Parser
=
impl_from_strmbase_filter
(
This
->
pin
.
filter
);
...
...
@@ -1151,7 +1149,7 @@ static HRESULT WINAPI QTInPin_Disconnect(IPin *iface)
}
else
hr
=
S_FALSE
;
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
LeaveCriticalSection
(
&
filter
->
filter
.
csFilter
);
return
hr
;
}
...
...
include/wine/strmbase.h
View file @
aa88c5d6
...
...
@@ -31,7 +31,6 @@ void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
typedef
struct
BasePin
{
IPin
IPin_iface
;
CRITICAL_SECTION
*
pCritSec
;
struct
strmbase_filter
*
filter
;
PIN_DIRECTION
dir
;
WCHAR
name
[
128
];
...
...
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