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
6f7d1065
Commit
6f7d1065
authored
Jun 17, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/renderer: Share pin and filter reference counts.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
19470fc8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
22 deletions
+30
-22
nullrenderer.c
dlls/qedit/tests/nullrenderer.c
+5
-5
dsoundrender.c
dlls/quartz/tests/dsoundrender.c
+3
-5
videorenderer.c
dlls/quartz/tests/videorenderer.c
+3
-5
vmr7.c
dlls/quartz/tests/vmr7.c
+2
-2
vmr9.c
dlls/quartz/tests/vmr9.c
+2
-2
renderer.c
dlls/strmbase/renderer.c
+15
-3
No files found.
dlls/qedit/tests/nullrenderer.c
View file @
6f7d1065
...
...
@@ -122,9 +122,9 @@ static void test_enum_pins(void)
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IPin_Release
(
pins
[
0
]);
...
...
@@ -226,7 +226,7 @@ static void test_pin_info(void)
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -236,9 +236,9 @@ static void test_pin_info(void)
ok
(
info
.
dir
==
PINDIR_INPUT
,
"Got direction %d.
\n
"
,
info
.
dir
);
ok
(
!
lstrcmpW
(
info
.
achName
,
sink_id
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IBaseFilter_Release
(
info
.
pFilter
);
hr
=
IPin_QueryDirection
(
pin
,
&
dir
);
...
...
dlls/quartz/tests/dsoundrender.c
View file @
6f7d1065
...
...
@@ -288,10 +288,8 @@ static void test_enum_pins(void)
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -399,7 +397,7 @@ static void test_pin_info(void)
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -409,9 +407,9 @@ static void test_pin_info(void)
ok
(
info
.
dir
==
PINDIR_INPUT
,
"Got direction %d.
\n
"
,
info
.
dir
);
ok
(
!
lstrcmpW
(
info
.
achName
,
sink_id
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IBaseFilter_Release
(
info
.
pFilter
);
hr
=
IPin_QueryDirection
(
pin
,
&
dir
);
...
...
dlls/quartz/tests/videorenderer.c
View file @
6f7d1065
...
...
@@ -221,10 +221,8 @@ static void test_enum_pins(void)
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -329,7 +327,7 @@ static void test_pin_info(void)
hr
=
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
...
...
@@ -340,9 +338,9 @@ static void test_pin_info(void)
todo_wine
ok
(
!
lstrcmpW
(
info
.
achName
,
sink_name
),
"Got name %s.
\n
"
,
wine_dbgstr_w
(
info
.
achName
));
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pin
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IBaseFilter_Release
(
info
.
pFilter
);
hr
=
IPin_QueryDirection
(
pin
,
&
dir
);
...
...
dlls/quartz/tests/vmr7.c
View file @
6f7d1065
...
...
@@ -427,9 +427,9 @@ static void test_enum_pins(void)
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IPin_Release
(
pins
[
0
]);
...
...
dlls/quartz/tests/vmr9.c
View file @
6f7d1065
...
...
@@ -435,9 +435,9 @@ static void test_enum_pins(void)
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IPin_Release
(
pins
[
0
]);
...
...
dlls/strmbase/renderer.c
View file @
6f7d1065
...
...
@@ -45,6 +45,18 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = {
QualityControlImpl_SetSink
};
static
ULONG
WINAPI
BaseRenderer_InputPin_AddRef
(
IPin
*
iface
)
{
BaseInputPin
*
pin
=
impl_BaseInputPin_from_IPin
(
iface
);
return
IBaseFilter_AddRef
(
pin
->
pin
.
pinInfo
.
pFilter
);
}
static
ULONG
WINAPI
BaseRenderer_InputPin_Release
(
IPin
*
iface
)
{
BaseInputPin
*
pin
=
impl_BaseInputPin_from_IPin
(
iface
);
return
IBaseFilter_Release
(
pin
->
pin
.
pinInfo
.
pFilter
);
}
static
HRESULT
WINAPI
BaseRenderer_InputPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
{
BaseInputPin
*
This
=
impl_BaseInputPin_from_IPin
(
iface
);
...
...
@@ -164,8 +176,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
static
const
IPinVtbl
BaseRenderer_InputPin_Vtbl
=
{
BaseInputPinImpl_QueryInterface
,
Base
PinImpl
_AddRef
,
Base
InputPinImpl
_Release
,
Base
Renderer_InputPin
_AddRef
,
Base
Renderer_InputPin
_Release
,
BaseInputPinImpl_Connect
,
BaseRenderer_InputPin_ReceiveConnection
,
BaseRenderer_InputPin_Disconnect
,
...
...
@@ -298,7 +310,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter)
IPin_Release
(
peer
);
}
IPin_Disconnect
(
&
filter
->
pInputPin
->
pin
.
IPin_iface
);
IPin_Release
(
&
filter
->
pInputPin
->
pin
.
IPin_iface
);
BaseInputPin_Destroy
(
filter
->
pInputPin
);
if
(
filter
->
pPosition
)
IUnknown_Release
(
filter
->
pPosition
);
...
...
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