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
d6c7cfe2
Commit
d6c7cfe2
authored
Nov 19, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/tests: Test (dis)connecting while not stopped.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa8e69a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
nullrenderer.c
dlls/qedit/tests/nullrenderer.c
+17
-0
samplegrabber.c
dlls/qedit/tests/samplegrabber.c
+31
-0
No files found.
dlls/qedit/tests/nullrenderer.c
View file @
d6c7cfe2
...
...
@@ -803,6 +803,7 @@ static void test_connect_pin(void)
IBaseFilter
*
filter
=
create_null_renderer
();
struct
testfilter
source
;
IMemAllocator
*
allocator
;
IMediaControl
*
control
;
IFilterGraph2
*
graph
;
IMemInputPin
*
input
;
AM_MEDIA_TYPE
mt
;
...
...
@@ -816,6 +817,7 @@ static void test_connect_pin(void)
&
IID_IFilterGraph2
,
(
void
**
)
&
graph
);
IFilterGraph2_AddFilter
(
graph
,
&
source
.
filter
.
IBaseFilter_iface
,
L"source"
);
IFilterGraph2_AddFilter
(
graph
,
filter
,
L"sink"
);
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaControl
,
(
void
**
)
&
control
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
...
...
@@ -827,6 +829,13 @@ static void test_connect_pin(void)
hr
=
IPin_ConnectionMediaType
(
pin
,
&
mt
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
source
.
source
.
pin
.
IPin_iface
,
pin
,
&
req_mt
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
source
.
source
.
pin
.
IPin_iface
,
pin
,
&
req_mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -839,6 +848,13 @@ static void test_connect_pin(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
memcmp
(
&
mt
,
&
req_mt
,
sizeof
(
AM_MEDIA_TYPE
)),
"Media types didn't match.
\n
"
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
pin
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_QueryInterface
(
pin
,
&
IID_IMemInputPin
,
(
void
**
)
&
input
);
test_allocator
(
input
);
...
...
@@ -875,6 +891,7 @@ static void test_connect_pin(void)
IMemInputPin_Release
(
input
);
IPin_Release
(
pin
);
IMediaControl_Release
(
control
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ref
=
IBaseFilter_Release
(
filter
);
...
...
dlls/qedit/tests/samplegrabber.c
View file @
d6c7cfe2
...
...
@@ -769,6 +769,7 @@ static void test_connect_pin(void)
IPin
*
sink
,
*
source
,
*
peer
;
IEnumMediaTypes
*
enummt
;
ISampleGrabber
*
grabber
;
IMediaControl
*
control
;
AM_MEDIA_TYPE
mt
,
*
pmt
;
IFilterGraph2
*
graph
;
HRESULT
hr
;
...
...
@@ -781,6 +782,7 @@ static void test_connect_pin(void)
IFilterGraph2_AddFilter
(
graph
,
&
testsource
.
filter
.
IBaseFilter_iface
,
L"source"
);
IFilterGraph2_AddFilter
(
graph
,
&
testsink
.
filter
.
IBaseFilter_iface
,
L"sink"
);
IFilterGraph2_AddFilter
(
graph
,
filter
,
L"sample grabber"
);
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaControl
,
(
void
**
)
&
control
);
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
sink
);
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
source
);
IBaseFilter_QueryInterface
(
filter
,
&
IID_ISampleGrabber
,
(
void
**
)
&
grabber
);
...
...
@@ -802,6 +804,13 @@ static void test_connect_pin(void)
hr
=
IPin_ConnectionMediaType
(
sink
,
&
mt
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
testsource
.
source
.
pin
.
IPin_iface
,
sink
,
&
req_mt
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
&
testsource
.
source
.
pin
.
IPin_iface
,
sink
,
&
req_mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -814,6 +823,13 @@ static void test_connect_pin(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
compare_media_types
(
&
mt
,
&
req_mt
),
"Media types didn't match.
\n
"
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
sink
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
ISampleGrabber_GetConnectedMediaType
(
grabber
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -874,6 +890,13 @@ static void test_connect_pin(void)
/* Exact connection. */
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
.
sink
.
pin
.
IPin_iface
,
&
req_mt
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
req_mt
.
bTemporalCompression
=
FALSE
;
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
.
sink
.
pin
.
IPin_iface
,
&
req_mt
);
ok
(
hr
==
VFW_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -893,6 +916,13 @@ static void test_connect_pin(void)
ok
(
compare_media_types
(
&
testsink
.
sink
.
pin
.
mt
,
&
req_mt
),
"Media types didn't match.
\n
"
);
ok
(
compare_media_types
(
&
testsource
.
source
.
pin
.
mt
,
&
testsink
.
sink
.
pin
.
mt
),
"Media types didn't match.
\n
"
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
source
);
ok
(
hr
==
VFW_E_NOT_STOPPED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
source
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterGraph2_Disconnect
(
graph
,
source
);
...
...
@@ -1025,6 +1055,7 @@ static void test_connect_pin(void)
IPin_Release
(
sink
);
IPin_Release
(
source
);
IMediaControl_Release
(
control
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ISampleGrabber_Release
(
grabber
);
...
...
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