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
e4aa395a
Commit
e4aa395a
authored
Mar 01, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Expand and separate state change tests.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef91785c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
44 deletions
+56
-44
filtergraph.c
dlls/quartz/tests/filtergraph.c
+56
-44
No files found.
dlls/quartz/tests/filtergraph.c
View file @
e4aa395a
...
...
@@ -346,6 +346,58 @@ static void test_mediacontrol(IFilterGraph2 *graph)
IMediaFilter_Release
(
filter
);
}
static
void
test_state_change
(
IFilterGraph2
*
graph
)
{
IMediaControl
*
control
;
OAFilterState
state
;
HRESULT
hr
;
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaControl
,
(
void
**
)
&
control
);
ok
(
hr
==
S_OK
,
"QueryInterface(IMediaControl) failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Run
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Run() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
INFINITE
,
&
state
);
ok
(
SUCCEEDED
(
hr
),
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Stop() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Pause() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Run
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Run() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Running
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Pause() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Paused
,
"wrong state %d
\n
"
,
state
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
SUCCEEDED
(
hr
),
"Stop() failed: %x
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"GetState() failed: %x
\n
"
,
hr
);
ok
(
state
==
State_Stopped
,
"wrong state %d
\n
"
,
state
);
IMediaControl_Release
(
control
);
}
static
void
rungraph
(
IFilterGraph2
*
graph
)
{
HRESULT
hr
;
...
...
@@ -354,6 +406,10 @@ static void rungraph(IFilterGraph2 *graph)
IMediaFilter
*
pmf
;
HANDLE
hEvent
;
test_basic_video
(
graph
);
test_mediacontrol
(
graph
);
test_state_change
(
graph
);
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaControl
,
(
void
**
)
&
pmc
);
ok
(
hr
==
S_OK
,
"Cannot get IMediaControl interface returned: %x
\n
"
,
hr
);
...
...
@@ -366,53 +422,9 @@ static void rungraph(IFilterGraph2 *graph)
IMediaFilter_Release
(
pmf
);
test_basic_video
(
graph
);
test_mediacontrol
(
graph
);
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_FALSE
,
"Cannot run the graph returned: %x
\n
"
,
hr
);
Sleep
(
10
);
/* Crash fun */
trace
(
"run -> stop
\n
"
);
hr
=
IMediaControl_Stop
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot stop the graph returned: %x
\n
"
,
hr
);
IFilterGraph2_SetDefaultSyncSource
(
graph
);
Sleep
(
10
);
trace
(
"stop -> pause
\n
"
);
hr
=
IMediaControl_Pause
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot pause the graph returned: %x
\n
"
,
hr
);
Sleep
(
10
);
trace
(
"pause -> run
\n
"
);
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot start the graph returned: %x
\n
"
,
hr
);
Sleep
(
10
);
trace
(
"run -> pause
\n
"
);
hr
=
IMediaControl_Pause
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot pause the graph returned: %x
\n
"
,
hr
);
Sleep
(
10
);
trace
(
"pause -> stop
\n
"
);
hr
=
IMediaControl_Stop
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot stop the graph returned: %x
\n
"
,
hr
);
Sleep
(
10
);
trace
(
"pause -> run
\n
"
);
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot start the graph returned: %x
\n
"
,
hr
);
trace
(
"run -> stop
\n
"
);
hr
=
IMediaControl_Stop
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot stop the graph returned: %x
\n
"
,
hr
);
trace
(
"stop -> run
\n
"
);
hr
=
IMediaControl_Run
(
pmc
);
ok
(
hr
==
S_OK
||
hr
==
S_FALSE
,
"Cannot start the graph returned: %x
\n
"
,
hr
);
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaEvent
,
(
LPVOID
*
)
&
pme
);
ok
(
hr
==
S_OK
,
"Cannot get IMediaEvent interface returned: %x
\n
"
,
hr
);
...
...
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