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
bd747f22
Commit
bd747f22
authored
Nov 28, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmvcore/tests: Test user time granularity and delivered pts.
parent
35991d9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
3 deletions
+69
-3
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+69
-3
No files found.
dlls/wmvcore/tests/wmvcore.c
View file @
bd747f22
...
...
@@ -2164,6 +2164,7 @@ static HRESULT WINAPI callback_advanced_OnTime(IWMReaderCallbackAdvanced *iface,
ok
(
callback
->
callback_tid
==
GetCurrentThreadId
(),
"got wrong thread
\n
"
);
todo_wine_if
(
time
%
10000
)
ok
(
time
==
callback
->
expect_time
,
"Got time %I64u.
\n
"
,
time
);
ok
(
context
==
(
void
*
)
callback
->
expect_context
,
"Got unexpected context %p.
\n
"
,
context
);
ret
=
WaitForSingleObject
(
callback
->
expect_ontime
,
100
);
...
...
@@ -2458,16 +2459,19 @@ static void wait_eof_callback_(int line, struct callback *callback)
ok_
(
__FILE__
,
line
)(
callback
->
eof_count
==
1
,
"Got %u WMT_EOF callbacks.
\n
"
,
callback
->
eof_count
);
}
#define wait_ontime_callback(a) wait_ontime_callback_(__LINE__, a)
static
void
wait_ontime_callback_
(
int
line
,
struct
callback
*
callback
)
#define wait_ontime_callback(a) wait_ontime_callback_(__LINE__, a
, FALSE
)
static
void
wait_ontime_callback_
(
int
line
,
struct
callback
*
callback
,
BOOL
todo
)
{
DWORD
ret
;
ret
=
WaitForSingleObject
(
callback
->
got_ontime
,
0
);
ok_
(
__FILE__
,
line
)(
ret
==
WAIT_TIMEOUT
,
"Got unexpected OnTime.
\n
"
);
SetEvent
(
callback
->
expect_ontime
);
ret
=
WaitForSingleObject
(
callback
->
got_ontime
,
1000
);
ret
=
WaitForSingleObject
(
callback
->
got_ontime
,
(
todo
&&
!
strcmp
(
winetest_platform
,
"wine"
))
?
100
:
1000
);
todo_wine_if
(
todo
)
ok_
(
__FILE__
,
line
)(
!
ret
,
"Wait timed out.
\n
"
);
if
(
todo
&&
ret
==
WAIT_TIMEOUT
)
ResetEvent
(
callback
->
expect_ontime
);
}
static
void
check_async_get_output_setting
(
IWMReaderAdvanced2
*
reader
,
DWORD
output
,
const
WCHAR
*
name
,
...
...
@@ -2572,6 +2576,68 @@ static void run_async_reader(IWMReader *reader, IWMReaderAdvanced2 *advanced, st
hr
=
IWMReaderAdvanced2_SetUserProvidedClock
(
advanced
,
TRUE
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
!
callback
->
all_streams_off
)
{
callback
->
expect_time
=
2780000
;
hr
=
IWMReaderAdvanced2_DeliverTime
(
advanced
,
2770001
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
wait_ontime_callback
(
callback
);
if
(
callback
->
last_pts
[
0
])
{
todo_wine
ok
(
callback
->
last_pts
[
0
]
==
2780000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
0
]);
todo_wine
ok
(
callback
->
next_pts
[
0
]
==
3240000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
0
]);
}
if
(
callback
->
last_pts
[
1
])
{
todo_wine_if
(
!
callback
->
read_compressed
)
ok
(
callback
->
last_pts
[
1
]
==
2460000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
1
]);
todo_wine
ok
(
callback
->
next_pts
[
1
]
==
2470000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
1
]);
}
callback
->
expect_time
=
2850000
;
hr
=
IWMReaderAdvanced2_DeliverTime
(
advanced
,
2849999
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
wait_ontime_callback
(
callback
);
if
(
callback
->
last_pts
[
0
])
{
todo_wine_if
(
!
callback
->
read_compressed
)
ok
(
callback
->
last_pts
[
0
]
==
2780000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
0
]);
todo_wine
ok
(
callback
->
next_pts
[
0
]
==
3240000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
0
]);
}
if
(
callback
->
last_pts
[
1
])
{
todo_wine_if
(
!
callback
->
read_compressed
)
ok
(
callback
->
last_pts
[
1
]
==
2460000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
1
]);
todo_wine
ok
(
callback
->
next_pts
[
1
]
==
2470000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
1
]);
}
callback
->
expect_time
=
2860000
;
hr
=
IWMReaderAdvanced2_DeliverTime
(
advanced
,
2850001
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
wait_ontime_callback_
(
__LINE__
,
callback
,
TRUE
);
if
(
callback
->
last_pts
[
0
])
{
todo_wine_if
(
!
callback
->
read_compressed
)
ok
(
callback
->
last_pts
[
0
]
==
2780000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
0
]);
todo_wine
ok
(
callback
->
next_pts
[
0
]
==
3240000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
0
]);
}
if
(
callback
->
last_pts
[
1
])
{
todo_wine
ok
(
callback
->
last_pts
[
1
]
==
2860000
,
"Got pts %I64d.
\n
"
,
callback
->
last_pts
[
1
]);
todo_wine
ok
(
callback
->
next_pts
[
1
]
==
2870000
,
"Got pts %I64d.
\n
"
,
callback
->
next_pts
[
1
]);
}
}
callback
->
expect_time
=
test_wmv_duration
*
2
;
hr
=
IWMReaderAdvanced2_DeliverTime
(
advanced
,
test_wmv_duration
*
2
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
wait_eof_callback
(
callback
);
...
...
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