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
4f29ddf7
Commit
4f29ddf7
authored
Sep 26, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/tests: Add some tests for unconnected filter state change.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
084cb90f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
222 additions
and
0 deletions
+222
-0
audiorecord.c
dlls/qcap/tests/audiorecord.c
+53
-0
avico.c
dlls/qcap/tests/avico.c
+53
-0
avimux.c
dlls/qcap/tests/avimux.c
+58
-0
smartteefilter.c
dlls/qcap/tests/smartteefilter.c
+58
-0
No files found.
dlls/qcap/tests/audiorecord.c
View file @
4f29ddf7
...
...
@@ -245,6 +245,58 @@ static void test_property_bag(IMoniker *mon)
IPropertyBag_Release
(
devenum_bag
);
}
static
void
test_unconnected_filter_state
(
IBaseFilter
*
filter
)
{
FILTER_STATE
state
;
HRESULT
hr
;
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
}
START_TEST
(
audiorecord
)
{
ICreateDevEnum
*
devenum
;
...
...
@@ -285,6 +337,7 @@ START_TEST(audiorecord)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
test_interfaces
(
filter
);
test_unconnected_filter_state
(
filter
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
dlls/qcap/tests/avico.c
View file @
4f29ddf7
...
...
@@ -655,6 +655,58 @@ static void test_enum_media_types(IBaseFilter *filter)
IPin_Release
(
pin
);
}
static
void
test_unconnected_filter_state
(
IBaseFilter
*
filter
)
{
FILTER_STATE
state
;
HRESULT
hr
;
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
}
START_TEST
(
avico
)
{
static
const
WCHAR
test_display_name
[]
=
{
'@'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
':'
,
...
...
@@ -697,6 +749,7 @@ START_TEST(avico)
test_pin_info
(
filter
);
test_media_types
(
filter
);
test_enum_media_types
(
filter
);
test_unconnected_filter_state
(
filter
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
dlls/qcap/tests/avimux.c
View file @
4f29ddf7
...
...
@@ -798,6 +798,63 @@ static void test_seeking(void)
ok
(
!
ref
,
"Got unexpected refcount %d.
\n
"
,
ref
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_avi_mux
();
FILTER_STATE
state
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
avimux
)
{
CoInitialize
(
NULL
);
...
...
@@ -810,6 +867,7 @@ START_TEST(avimux)
test_media_types
();
test_enum_media_types
();
test_seeking
();
test_unconnected_filter_state
();
CoUninitialize
();
}
dlls/qcap/tests/smartteefilter.c
View file @
4f29ddf7
...
...
@@ -2154,6 +2154,63 @@ end:
IEnumMediaTypes_Release
(
enumMediaTypes
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_smart_tee
();
FILTER_STATE
state
;
HRESULT
hr
;
ULONG
ref
;
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Pause
(
filter
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Run
(
filter
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
state
==
State_Running
,
"Got state %u.
\n
"
,
state
);
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %u.
\n
"
,
state
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_smart_tee_filter_aggregation
(
void
)
{
SourceFilter
*
sourceFilter
=
create_video_SourceFilter
();
...
...
@@ -2381,6 +2438,7 @@ START_TEST(smartteefilter)
test_find_pin
();
test_pin_info
();
test_enum_media_types
();
test_unconnected_filter_state
();
test_smart_tee_filter_aggregation
();
test_smart_tee_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