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
aa8e69a6
Commit
aa8e69a6
authored
Nov 19, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/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
2945f467
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
3 deletions
+48
-3
filewriter.c
dlls/qcap/tests/filewriter.c
+14
-0
smartteefilter.c
dlls/qcap/tests/smartteefilter.c
+34
-3
No files found.
dlls/qcap/tests/filewriter.c
View file @
aa8e69a6
...
...
@@ -768,6 +768,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
==
VFW_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x.
\n
"
,
hr
);
req_mt
.
majortype
=
MEDIATYPE_Stream
;
...
...
@@ -783,6 +790,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_OK
,
"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
);
todo_wine
ok
(
hr
==
VFW_E_NO_ALLOCATOR
,
"Got hr %#x.
\n
"
,
hr
);
CoCreateInstance
(
&
CLSID_MemoryAllocator
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMemAllocator
,
(
void
**
)
&
allocator
);
...
...
dlls/qcap/tests/smartteefilter.c
View file @
aa8e69a6
...
...
@@ -2519,7 +2519,7 @@ static void test_source_media_types(AM_MEDIA_TYPE req_mt, const AM_MEDIA_TYPE *s
}
static
void
test_source_connection
(
AM_MEDIA_TYPE
req_mt
,
IFilterGraph2
*
graph
,
struct
testfilter
*
testsink
,
IPin
*
source
)
IMediaControl
*
control
,
struct
testfilter
*
testsink
,
IPin
*
source
)
{
const
AM_MEDIA_TYPE
sink_mt
=
req_mt
;
AM_MEDIA_TYPE
mt
;
...
...
@@ -2536,6 +2536,13 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
/* 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
);
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
->
sink
.
pin
.
IPin_iface
,
&
req_mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -2549,6 +2556,13 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
ok
(
compare_media_types
(
&
mt
,
&
req_mt
),
"Media types didn't match.
\n
"
);
ok
(
compare_media_types
(
&
testsink
->
sink
.
pin
.
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
,
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
);
...
...
@@ -2662,6 +2676,7 @@ static void test_connect_pin(void)
IPin
*
sink
,
*
capture
,
*
preview
,
*
peer
;
AM_MEDIA_TYPE
mt
,
*
mts
[
3
];
IEnumMediaTypes
*
enummt
;
IMediaControl
*
control
;
IFilterGraph2
*
graph
;
HRESULT
hr
;
ULONG
ref
;
...
...
@@ -2673,6 +2688,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"Input"
,
&
sink
);
IBaseFilter_FindPin
(
filter
,
L"Capture"
,
&
capture
);
IBaseFilter_FindPin
(
filter
,
L"Preview"
,
&
preview
);
...
...
@@ -2709,6 +2725,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
);
...
...
@@ -2729,8 +2752,15 @@ static void test_connect_pin(void)
test_source_media_types
(
req_mt
,
&
testsource
.
source_mt
,
capture
);
test_source_media_types
(
req_mt
,
&
testsource
.
source_mt
,
preview
);
test_source_connection
(
req_mt
,
graph
,
&
testsink
,
capture
);
test_source_connection
(
req_mt
,
graph
,
&
testsink
,
preview
);
test_source_connection
(
req_mt
,
graph
,
control
,
&
testsink
,
capture
);
test_source_connection
(
req_mt
,
graph
,
control
,
&
testsink
,
preview
);
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
=
IFilterGraph2_Disconnect
(
graph
,
sink
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -2750,6 +2780,7 @@ static void test_connect_pin(void)
IPin_Release
(
sink
);
IPin_Release
(
capture
);
IPin_Release
(
preview
);
IMediaControl_Release
(
control
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ref
=
IBaseFilter_Release
(
filter
);
...
...
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