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
d16bc95b
Commit
d16bc95b
authored
Jun 12, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Factor out strmbase_pin_init().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f59d0522
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
45 deletions
+29
-45
pin.c
dlls/strmbase/pin.c
+29
-45
No files found.
dlls/strmbase/pin.c
View file @
d16bc95b
...
...
@@ -728,26 +728,24 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BaseOutputPin *This, IPin *pR
return
hr
;
}
static
HRESULT
OutputPin_Init
(
const
IPinVtbl
*
OutputPin_Vtbl
,
const
PIN_INFO
*
pPinInfo
,
const
BaseOutputPinFuncTable
*
vtbl
,
LPCRITICAL_SECTION
pCritSec
,
BaseOutputPin
*
pPinImpl
)
{
TRACE
(
"(%p)
\n
"
,
pPinImpl
);
/* Common attributes */
pPinImpl
->
pin
.
IPin_iface
.
lpVtbl
=
OutputPin_Vtbl
;
pPinImpl
->
pin
.
refCount
=
1
;
pPinImpl
->
pin
.
pConnectedTo
=
NULL
;
pPinImpl
->
pin
.
pCritSec
=
pCritSec
;
pPinImpl
->
pin
.
tStart
=
0
;
pPinImpl
->
pin
.
tStop
=
0
;
pPinImpl
->
pin
.
dRate
=
1
.
0
;
Copy_PinInfo
(
&
pPinImpl
->
pin
.
pinInfo
,
pPinInfo
);
pPinImpl
->
pin
.
pFuncsTable
=
&
vtbl
->
base
;
ZeroMemory
(
&
pPinImpl
->
pin
.
mtCurrent
,
sizeof
(
AM_MEDIA_TYPE
));
/* Output pin attributes */
pPinImpl
->
pMemInputPin
=
NULL
;
pPinImpl
->
pAllocator
=
NULL
;
pPinImpl
->
pFuncsTable
=
vtbl
;
static
void
strmbase_pin_init
(
BasePin
*
pin
,
const
IPinVtbl
*
vtbl
,
const
BasePinFuncTable
*
func_table
,
const
PIN_INFO
*
info
,
CRITICAL_SECTION
*
cs
)
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
pin
->
IPin_iface
.
lpVtbl
=
vtbl
;
pin
->
refCount
=
1
;
pin
->
pCritSec
=
cs
;
pin
->
dRate
=
1
.
0
;
Copy_PinInfo
(
&
pin
->
pinInfo
,
info
);
pin
->
pFuncsTable
=
func_table
;
}
static
HRESULT
OutputPin_Init
(
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseOutputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
,
BaseOutputPin
*
pin
)
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
strmbase_pin_init
(
&
pin
->
pin
,
vtbl
,
&
func_table
->
base
,
info
,
cs
);
pin
->
pFuncsTable
=
func_table
;
return
S_OK
;
}
...
...
@@ -1111,31 +1109,17 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
MemInputPin_ReceiveCanBlock
};
static
HRESULT
InputPin_Init
(
const
IPinVtbl
*
InputPin_Vtbl
,
const
PIN_INFO
*
pPinInfo
,
const
BaseInputPinFuncTable
*
vtbl
,
LPCRITICAL_SECTION
pCritSec
,
IMemAllocator
*
allocator
,
BaseInputPin
*
pPinImpl
)
{
TRACE
(
"(%p)
\n
"
,
pPinImpl
);
/* Common attributes */
pPinImpl
->
pin
.
refCount
=
1
;
pPinImpl
->
pin
.
pConnectedTo
=
NULL
;
pPinImpl
->
pin
.
pCritSec
=
pCritSec
;
pPinImpl
->
pin
.
tStart
=
0
;
pPinImpl
->
pin
.
tStop
=
0
;
pPinImpl
->
pin
.
dRate
=
1
.
0
;
Copy_PinInfo
(
&
pPinImpl
->
pin
.
pinInfo
,
pPinInfo
);
ZeroMemory
(
&
pPinImpl
->
pin
.
mtCurrent
,
sizeof
(
AM_MEDIA_TYPE
));
pPinImpl
->
pin
.
pFuncsTable
=
&
vtbl
->
base
;
/* Input pin attributes */
pPinImpl
->
pFuncsTable
=
vtbl
;
pPinImpl
->
pAllocator
=
pPinImpl
->
preferred_allocator
=
allocator
;
if
(
pPinImpl
->
preferred_allocator
)
IMemAllocator_AddRef
(
pPinImpl
->
preferred_allocator
);
pPinImpl
->
pin
.
IPin_iface
.
lpVtbl
=
InputPin_Vtbl
;
pPinImpl
->
IMemInputPin_iface
.
lpVtbl
=
&
MemInputPin_Vtbl
;
pPinImpl
->
flushing
=
pPinImpl
->
end_of_stream
=
FALSE
;
static
HRESULT
InputPin_Init
(
const
IPinVtbl
*
vtbl
,
const
PIN_INFO
*
info
,
const
BaseInputPinFuncTable
*
func_table
,
CRITICAL_SECTION
*
cs
,
IMemAllocator
*
allocator
,
BaseInputPin
*
pin
)
{
memset
(
pin
,
0
,
sizeof
(
*
pin
));
strmbase_pin_init
(
&
pin
->
pin
,
vtbl
,
&
func_table
->
base
,
info
,
cs
);
pin
->
pFuncsTable
=
func_table
;
pin
->
pAllocator
=
pin
->
preferred_allocator
=
allocator
;
if
(
pin
->
preferred_allocator
)
IMemAllocator_AddRef
(
pin
->
preferred_allocator
);
pin
->
IMemInputPin_iface
.
lpVtbl
=
&
MemInputPin_Vtbl
;
return
S_OK
;
}
...
...
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