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
b66d0ed6
Commit
b66d0ed6
authored
Apr 30, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add some tests for end-of-stream notifications on the VMR9.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3cad37a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
140 additions
and
0 deletions
+140
-0
vmr9.c
dlls/quartz/tests/vmr9.c
+140
-0
No files found.
dlls/quartz/tests/vmr9.c
View file @
b66d0ed6
...
@@ -1228,6 +1228,145 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
...
@@ -1228,6 +1228,145 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
}
static
unsigned
int
check_ec_complete
(
IMediaEvent
*
eventsrc
,
DWORD
timeout
)
{
LONG_PTR
param1
,
param2
;
unsigned
int
ret
=
0
;
HRESULT
hr
;
LONG
code
;
while
((
hr
=
IMediaEvent_GetEvent
(
eventsrc
,
&
code
,
&
param1
,
&
param2
,
timeout
))
==
S_OK
)
{
if
(
code
==
EC_COMPLETE
)
{
ok
(
param1
==
S_OK
,
"Got param1 %#lx.
\n
"
,
param1
);
ok
(
!
param2
,
"Got param2 %#lx.
\n
"
,
param2
);
ret
++
;
}
IMediaEvent_FreeEventParams
(
eventsrc
,
code
,
param1
,
param2
);
timeout
=
0
;
}
ok
(
hr
==
E_ABORT
,
"Got hr %#x.
\n
"
,
hr
);
return
ret
;
}
static
void
test_eos
(
IPin
*
pin
,
IMemInputPin
*
input
,
IMediaControl
*
control
)
{
IMediaEvent
*
eventsrc
;
OAFilterState
state
;
HRESULT
hr
;
BOOL
ret
;
IMediaControl_QueryInterface
(
control
,
&
IID_IMediaEvent
,
(
void
**
)
&
eventsrc
);
commit_allocator
(
input
);
hr
=
IMediaControl_Pause
(
control
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
hr
=
IPin_EndOfStream
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
todo_wine
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
hr
=
join_thread
(
send_frame
(
input
));
todo_wine
ok
(
hr
==
E_UNEXPECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Run
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
todo_wine
ok
(
ret
==
1
,
"Expected EC_COMPLETE.
\n
"
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
/* We do not receive an EC_COMPLETE notification until the last sample is
* done rendering. */
commit_allocator
(
input
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
join_thread
(
send_frame
(
input
));
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
hr
=
IPin_EndOfStream
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
todo_wine
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
ret
=
check_ec_complete
(
eventsrc
,
1600
);
todo_wine
ok
(
ret
==
1
,
"Expected EC_COMPLETE.
\n
"
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
/* Test sending EOS while flushing. */
commit_allocator
(
input
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
join_thread
(
send_frame
(
input
));
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_BeginFlush
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndOfStream
(
pin
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndFlush
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
todo_wine
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
/* Test sending EOS and then flushing or stopping. */
commit_allocator
(
input
);
hr
=
IMediaControl_Run
(
control
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
join_thread
(
send_frame
(
input
));
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
&
state
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndOfStream
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
todo_wine
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
hr
=
IPin_BeginFlush
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndFlush
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
join_thread
(
send_frame
(
input
));
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_EndOfStream
(
pin
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
hr
=
IMediaControl_Stop
(
control
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ret
=
check_ec_complete
(
eventsrc
,
0
);
ok
(
!
ret
,
"Got unexpected EC_COMPLETE.
\n
"
);
IMediaEvent_Release
(
eventsrc
);
}
static
void
test_sample_time
(
IPin
*
pin
,
IMemInputPin
*
input
,
IMediaControl
*
control
)
static
void
test_sample_time
(
IPin
*
pin
,
IMemInputPin
*
input
,
IMediaControl
*
control
)
{
{
OAFilterState
state
;
OAFilterState
state
;
...
@@ -1521,6 +1660,7 @@ static void test_connect_pin(void)
...
@@ -1521,6 +1660,7 @@ static void test_connect_pin(void)
test_filter_state
(
input
,
control
);
test_filter_state
(
input
,
control
);
test_flushing
(
pin
,
input
,
control
);
test_flushing
(
pin
,
input
,
control
);
test_eos
(
pin
,
input
,
control
);
test_sample_time
(
pin
,
input
,
control
);
test_sample_time
(
pin
,
input
,
control
);
test_current_image
(
filter
,
input
,
control
,
&
vih
.
bmiHeader
);
test_current_image
(
filter
,
input
,
control
,
&
vih
.
bmiHeader
);
...
...
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