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
5d4083ab
Commit
5d4083ab
authored
Jul 22, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add more strict tests for accurate duration retrieval.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ddf3b93a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
3 deletions
+52
-3
avisplit.c
dlls/quartz/tests/avisplit.c
+1
-1
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+50
-1
waveparser.c
dlls/quartz/tests/waveparser.c
+1
-1
No files found.
dlls/quartz/tests/avisplit.c
View file @
5d4083ab
...
...
@@ -1537,7 +1537,7 @@ static void test_seeking(void)
duration
=
0
;
hr
=
IMediaSeeking_GetDuration
(
seeking
,
&
duration
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
duration
>
0
,
"Got duration %s.
\n
"
,
wine_dbgstr_longlong
(
duration
)
);
ok
(
duration
==
50000000
,
"Got duration %I64d.
\n
"
,
duration
);
stop
=
current
=
0xdeadbeef
;
hr
=
IMediaSeeking_GetStopPosition
(
seeking
,
&
stop
);
...
...
dlls/quartz/tests/mpegsplit.c
View file @
5d4083ab
...
...
@@ -1705,7 +1705,7 @@ static void test_seeking(void)
duration
=
0
;
hr
=
IMediaSeeking_GetDuration
(
seeking
,
&
duration
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
duration
>
0
,
"Got duration %s.
\n
"
,
wine_dbgstr_longlong
(
duration
)
);
ok
(
duration
==
5392500
,
"Got duration %I64d.
\n
"
,
duration
);
stop
=
current
=
0xdeadbeef
;
hr
=
IMediaSeeking_GetStopPosition
(
seeking
,
&
stop
);
...
...
@@ -1894,6 +1894,54 @@ static void test_streaming(void)
ok
(
ret
,
"Failed to delete file, error %u.
\n
"
,
GetLastError
());
}
static
void
test_large_file
(
void
)
{
static
const
BYTE
frame
[
96
]
=
{
0xff
,
0xfb
,
0x14
,
0xc4
};
IBaseFilter
*
filter
=
create_mpeg_splitter
();
static
WCHAR
path
[
MAX_PATH
];
REFERENCE_TIME
duration
;
IMediaSeeking
*
seeking
;
IFilterGraph2
*
graph
;
unsigned
int
i
;
IPin
*
source
;
BYTE
*
buffer
;
HRESULT
hr
;
ULONG
ref
;
DWORD
ret
;
FILE
*
f
;
GetTempPathW
(
ARRAY_SIZE
(
path
),
path
);
wcscat
(
path
,
L"big_test.mp3"
);
/* allocate a larger buffer so I/O is faster on the testbot */
buffer
=
malloc
(
1000
*
sizeof
(
frame
));
for
(
i
=
0
;
i
<
1000
;
++
i
)
memcpy
(
buffer
+
i
*
96
,
frame
,
sizeof
(
frame
));
f
=
_wfopen
(
path
,
L"w"
);
for
(
i
=
0
;
i
<
100
;
++
i
)
fwrite
(
buffer
,
1000
*
sizeof
(
frame
),
1
,
f
);
fclose
(
f
);
free
(
buffer
);
graph
=
connect_input
(
filter
,
path
);
IBaseFilter_FindPin
(
filter
,
L"Audio"
,
&
source
);
IPin_QueryInterface
(
source
,
&
IID_IMediaSeeking
,
(
void
**
)
&
seeking
);
duration
=
0xdeadbeef
;
hr
=
IMediaSeeking_GetDuration
(
seeking
,
&
duration
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
duration
==
2400
*
10000000ull
,
"Got duration %I64d.
\n
"
,
duration
);
IMediaSeeking_Release
(
seeking
);
IPin_Release
(
source
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ret
=
DeleteFileW
(
path
);
ok
(
ret
,
"Failed to delete file, error %u.
\n
"
,
GetLastError
());
}
START_TEST
(
mpegsplit
)
{
IBaseFilter
*
filter
;
...
...
@@ -1919,6 +1967,7 @@ START_TEST(mpegsplit)
test_connect_pin
();
test_seeking
();
test_streaming
();
test_large_file
();
CoUninitialize
();
}
dlls/quartz/tests/waveparser.c
View file @
5d4083ab
...
...
@@ -929,7 +929,7 @@ static void test_seeking(void)
duration
=
0xdeadbeef
;
hr
=
IMediaSeeking_GetDuration
(
seeking
,
&
duration
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
duration
>
0
,
"Got duration %s.
\n
"
,
wine_dbgstr_longlong
(
duration
)
);
ok
(
duration
==
1000000
,
"Got duration %I64d.
\n
"
,
duration
);
stop
=
current
=
0xdeadbeef
;
hr
=
IMediaSeeking_GetStopPosition
(
seeking
,
&
stop
);
...
...
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