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
6beabb23
Commit
6beabb23
authored
Jun 20, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Add tests for asynchronous state change.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b583452a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
4 deletions
+35
-4
filtergraph.c
dlls/quartz/tests/filtergraph.c
+35
-4
No files found.
dlls/quartz/tests/filtergraph.c
View file @
6beabb23
...
...
@@ -1163,6 +1163,8 @@ struct testfilter
struct
testpin
*
pins
;
unsigned
int
pin_count
,
enum_idx
;
HRESULT
state_hr
;
IAMFilterMiscFlags
IAMFilterMiscFlags_iface
;
ULONG
misc_flags
;
...
...
@@ -1344,7 +1346,7 @@ static HRESULT WINAPI testfilter_Stop(IBaseFilter *iface)
check_state_transition
(
filter
,
State_Stopped
);
filter
->
state
=
State_Stopped
;
return
S_OK
;
return
filter
->
state_hr
;
}
static
HRESULT
WINAPI
testfilter_Pause
(
IBaseFilter
*
iface
)
...
...
@@ -1355,7 +1357,7 @@ static HRESULT WINAPI testfilter_Pause(IBaseFilter *iface)
check_state_transition
(
filter
,
State_Paused
);
filter
->
state
=
State_Paused
;
return
S_OK
;
return
filter
->
state_hr
;
}
static
HRESULT
WINAPI
testfilter_Run
(
IBaseFilter
*
iface
,
REFERENCE_TIME
start
)
...
...
@@ -1367,7 +1369,7 @@ static HRESULT WINAPI testfilter_Run(IBaseFilter *iface, REFERENCE_TIME start)
filter
->
state
=
State_Running
;
filter
->
start_time
=
start
;
return
S_OK
;
return
filter
->
state_hr
;
}
static
HRESULT
WINAPI
testfilter_GetState
(
IBaseFilter
*
iface
,
DWORD
timeout
,
FILTER_STATE
*
state
)
...
...
@@ -1376,7 +1378,7 @@ static HRESULT WINAPI testfilter_GetState(IBaseFilter *iface, DWORD timeout, FIL
if
(
winetest_debug
>
1
)
trace
(
"%p->GetState(%u)
\n
"
,
filter
,
timeout
);
*
state
=
filter
->
state
;
return
S_OK
;
return
filter
->
state_hr
;
}
static
HRESULT
WINAPI
testfilter_SetSyncSource
(
IBaseFilter
*
iface
,
IReferenceClock
*
clock
)
...
...
@@ -2954,6 +2956,7 @@ static void test_filter_state(void)
IReferenceClock
*
clock
;
IMediaControl
*
control
;
IMediaFilter
*
filter
;
OAFilterState
state
;
HRESULT
hr
;
ULONG
ref
;
...
...
@@ -3094,6 +3097,34 @@ todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
check_filter_state
(
graph
,
State_Stopped
);
sink
.
state_hr
=
S_FALSE
;
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
sink
.
state_hr
=
VFW_S_STATE_INTERMEDIATE
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_STATE_INTERMEDIATE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state_hr
=
VFW_S_CANT_CUE
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state_hr
=
VFW_S_STATE_INTERMEDIATE
;
source
.
state_hr
=
VFW_S_CANT_CUE
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state_hr
=
VFW_S_CANT_CUE
;
source
.
state_hr
=
VFW_S_STATE_INTERMEDIATE
;
hr
=
IMediaControl_GetState
(
control
,
0
,
&
state
);
todo_wine
ok
(
hr
==
VFW_S_CANT_CUE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"Got state %u.
\n
"
,
state
);
sink
.
state_hr
=
source
.
state_hr
=
S_OK
;
/* Destroying the graph while it's running stops all filters. */
hr
=
IMediaFilter_Run
(
filter
,
0
);
...
...
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