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
c08ab0b9
Commit
c08ab0b9
authored
Sep 26, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/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
802ebaf9
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
549 additions
and
34 deletions
+549
-34
acmwrapper.c
dlls/quartz/tests/acmwrapper.c
+58
-0
avidec.c
dlls/quartz/tests/avidec.c
+58
-0
avisplit.c
dlls/quartz/tests/avisplit.c
+58
-0
dsoundrender.c
dlls/quartz/tests/dsoundrender.c
+58
-0
filesource.c
dlls/quartz/tests/filesource.c
+27
-34
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+58
-0
videorenderer.c
dlls/quartz/tests/videorenderer.c
+58
-0
vmr7.c
dlls/quartz/tests/vmr7.c
+58
-0
vmr9.c
dlls/quartz/tests/vmr9.c
+58
-0
waveparser.c
dlls/quartz/tests/waveparser.c
+58
-0
No files found.
dlls/quartz/tests/acmwrapper.c
View file @
c08ab0b9
...
...
@@ -441,6 +441,63 @@ todo_wine
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_acm_wrapper
();
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
);
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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
acmwrapper
)
{
CoInitialize
(
NULL
);
...
...
@@ -450,6 +507,7 @@ START_TEST(acmwrapper)
test_enum_pins
();
test_find_pin
();
test_pin_info
();
test_unconnected_filter_state
();
CoUninitialize
();
}
dlls/quartz/tests/avidec.c
View file @
c08ab0b9
...
...
@@ -618,6 +618,63 @@ static void test_enum_media_types(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_avi_dec
();
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
);
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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
avidec
)
{
BOOL
ret
;
...
...
@@ -634,6 +691,7 @@ START_TEST(avidec)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
CoUninitialize
();
...
...
dlls/quartz/tests/avisplit.c
View file @
c08ab0b9
...
...
@@ -1015,6 +1015,63 @@ fail:
DeleteFileW
(
filename
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_avi_splitter
();
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
(
avisplit
)
{
IBaseFilter
*
filter
;
...
...
@@ -1036,6 +1093,7 @@ START_TEST(avisplit)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
test_filter_graph
();
CoUninitialize
();
...
...
dlls/quartz/tests/dsoundrender.c
View file @
c08ab0b9
...
...
@@ -631,6 +631,63 @@ static void test_basefilter(void)
IBaseFilter_Release
(
base
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_dsound_render
();
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
);
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_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
);
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_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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
dsoundrender
)
{
IBaseFilter
*
filter
;
...
...
@@ -657,6 +714,7 @@ START_TEST(dsoundrender)
test_pin_info
();
test_basic_audio
();
test_enum_media_types
();
test_unconnected_filter_state
();
test_basefilter
();
CoUninitialize
();
...
...
dlls/quartz/tests/filesource.c
View file @
c08ab0b9
...
...
@@ -691,66 +691,59 @@ static void test_pin_info(void)
ok
(
ret
,
"Failed to delete file, error %u.
\n
"
,
GetLastError
());
}
static
void
test_filter_state
(
void
)
static
void
test_
unconnected_
filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_file_source
();
IMediaControl
*
control
;
IFilterGraph2
*
graph
;
FILTER_STATE
state
;
HRESULT
hr
;
ULONG
ref
;
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterGraph2
,
(
void
**
)
&
graph
);
IFilterGraph2_AddFilter
(
graph
,
filter
,
NULL
);
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaControl
,
(
void
**
)
&
control
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %
d
.
\n
"
,
state
);
ok
(
state
==
State_Stopped
,
"Got state %
u
.
\n
"
,
state
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
hr
=
IBaseFilter_Pause
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_
Running
,
"Got state %d
.
\n
"
,
state
);
ok
(
state
==
State_
Paused
,
"Got state %u
.
\n
"
,
state
);
hr
=
I
MediaControl_Stop
(
control
);
hr
=
I
BaseFilter_Run
(
filter
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_
Stopped
,
"Got state %d
.
\n
"
,
state
);
ok
(
state
==
State_
Running
,
"Got state %u
.
\n
"
,
state
);
hr
=
IMediaControl_Pause
(
control
);
todo_wine
hr
=
IBaseFilter_Pause
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %
d
.
\n
"
,
state
);
ok
(
state
==
State_Paused
,
"Got state %
u
.
\n
"
,
state
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
hr
=
IBaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_
Running
,
"Got state %d
.
\n
"
,
state
);
ok
(
state
==
State_
Stopped
,
"Got state %u
.
\n
"
,
state
);
hr
=
IMediaControl_Pause
(
control
);
todo_wine
hr
=
IBaseFilter_Run
(
filter
,
0
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_
Paused
,
"Got state %d
.
\n
"
,
state
);
ok
(
state
==
State_
Running
,
"Got state %u
.
\n
"
,
state
);
hr
=
I
MediaControl_Stop
(
control
);
hr
=
I
BaseFilter_Stop
(
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_GetState
(
filter
,
1000
,
&
state
);
hr
=
IBaseFilter_GetState
(
filter
,
0
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"Got state %
d
.
\n
"
,
state
);
ok
(
state
==
State_Stopped
,
"Got state %
u
.
\n
"
,
state
);
IMediaControl_Release
(
control
);
IFilterGraph2_Release
(
graph
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
...
...
@@ -1197,7 +1190,7 @@ START_TEST(filesource)
test_enum_pins
();
test_find_pin
();
test_pin_info
();
test_filter_state
();
test_
unconnected_
filter_state
();
test_file_source_filter
();
test_async_reader
();
test_enum_media_types
();
...
...
dlls/quartz/tests/mpegsplit.c
View file @
c08ab0b9
...
...
@@ -997,6 +997,63 @@ static void test_enum_media_types(void)
ok
(
ret
,
"Failed to delete file, error %u.
\n
"
,
GetLastError
());
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_mpeg_splitter
();
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
(
mpegsplit
)
{
IBaseFilter
*
filter
;
...
...
@@ -1018,6 +1075,7 @@ START_TEST(mpegsplit)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
CoUninitialize
();
}
dlls/quartz/tests/videorenderer.c
View file @
c08ab0b9
...
...
@@ -528,6 +528,63 @@ static void test_basefilter(void)
IBaseFilter_Release
(
base
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_video_renderer
();
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
);
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_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
);
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_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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
videorenderer
)
{
CoInitialize
(
NULL
);
...
...
@@ -539,6 +596,7 @@ START_TEST(videorenderer)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
test_basefilter
();
CoUninitialize
();
...
...
dlls/quartz/tests/vmr7.c
View file @
c08ab0b9
...
...
@@ -775,6 +775,63 @@ static void test_enum_media_types(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_vmr7
(
0
);
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
);
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_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
);
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_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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
vmr7
)
{
CoInitialize
(
NULL
);
...
...
@@ -787,6 +844,7 @@ START_TEST(vmr7)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
CoUninitialize
();
}
dlls/quartz/tests/vmr9.c
View file @
c08ab0b9
...
...
@@ -779,6 +779,63 @@ static void test_enum_media_types(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_vmr9
(
0
);
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
);
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_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
);
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_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
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
vmr9
)
{
IBaseFilter
*
filter
;
...
...
@@ -802,6 +859,7 @@ START_TEST(vmr9)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
CoUninitialize
();
}
dlls/quartz/tests/waveparser.c
View file @
c08ab0b9
...
...
@@ -761,6 +761,63 @@ static void test_enum_media_types(void)
ok
(
ret
,
"Failed to delete file, error %u.
\n
"
,
GetLastError
());
}
static
void
test_unconnected_filter_state
(
void
)
{
IBaseFilter
*
filter
=
create_wave_parser
();
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
(
waveparser
)
{
IBaseFilter
*
filter
;
...
...
@@ -782,6 +839,7 @@ START_TEST(waveparser)
test_pin_info
();
test_media_types
();
test_enum_media_types
();
test_unconnected_filter_state
();
CoUninitialize
();
}
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