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
3b29ef9e
Commit
3b29ef9e
authored
Feb 21, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Test the timestamps associated with new segments.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b5dd73c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
avisplit.c
dlls/quartz/tests/avisplit.c
+14
-7
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+14
-7
No files found.
dlls/quartz/tests/avisplit.c
View file @
3b29ef9e
...
...
@@ -809,7 +809,7 @@ struct testfilter
const
AM_MEDIA_TYPE
*
mt
;
HANDLE
eos_event
;
unsigned
int
sample_count
,
eos_count
,
new_segment_count
;
REFERENCE_TIME
seek_start
,
seek_end
;
REFERENCE_TIME
se
gment_start
,
segment_end
,
se
ek_start
,
seek_end
;
};
static
inline
struct
testfilter
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
...
...
@@ -985,14 +985,20 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface,
IMediaSeeking
*
seeking
;
HRESULT
hr
;
if
(
winetest_debug
>
1
)
trace
(
"%04x: Got segment with timestamps %I64d-%I64d.
\n
"
,
GetCurrentThreadId
(),
start
,
end
);
++
filter
->
new_segment_count
;
IPin_QueryInterface
(
iface
->
pin
.
peer
,
&
IID_IMediaSeeking
,
(
void
**
)
&
seeking
);
hr
=
IMediaSeeking_GetPositions
(
seeking
,
&
filter
->
seek_start
,
&
filter
->
seek_end
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
rate
==
1
.
0
,
"Got rate %.16e.
\n
"
,
rate
);
IMediaSeeking_Release
(
seeking
);
ok
(
start
==
filter
->
segment_start
,
"Expected start %I64d, got %I64d.
\n
"
,
filter
->
segment_start
,
start
);
ok
(
end
==
filter
->
segment_end
,
"Expected end %I64d, got %I64d.
\n
"
,
filter
->
segment_end
,
end
);
ok
(
rate
==
1
.
0
,
"Got rate %.16e.
\n
"
,
rate
);
return
S_OK
;
}
...
...
@@ -1092,6 +1098,7 @@ static void testfilter_init(struct testfilter *filter)
strmbase_sink_init
(
&
filter
->
sink
,
&
filter
->
filter
,
L"sink"
,
&
testsink_ops
,
NULL
);
filter
->
IAsyncReader_iface
.
lpVtbl
=
&
async_reader_vtbl
;
filter
->
eos_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
segment_end
=
50000000
;
}
static
void
test_filter_state
(
IMediaControl
*
control
)
...
...
@@ -1709,11 +1716,11 @@ static void test_streaming(void)
ok
(
WaitForSingleObject
(
testsink
.
eos_event
,
100
)
==
WAIT_TIMEOUT
,
"Got more than one EOS.
\n
"
);
ok
(
testsink
.
sample_count
,
"Expected at least one sample.
\n
"
);
testsink
.
sample_count
=
testsink
.
eos_count
=
0
;
start
=
1500
*
10000
;
end
=
3500
*
10000
;
hr
=
IMediaSeeking_SetPositions
(
seeking
,
&
start
,
AM_SEEKING_AbsolutePositioning
,
&
end
,
AM_SEEKING_AbsolutePositioning
);
testsink
.
new_segment_count
=
testsink
.
sample_count
=
testsink
.
eos_count
=
0
;
testsink
.
segment_
start
=
1500
*
10000
;
testsink
.
segment_
end
=
3500
*
10000
;
hr
=
IMediaSeeking_SetPositions
(
seeking
,
&
testsink
.
segment_
start
,
AM_SEEKING_AbsolutePositioning
,
&
testsink
.
segment_
end
,
AM_SEEKING_AbsolutePositioning
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
WaitForSingleObject
(
testsink
.
eos_event
,
1000
),
"Did not receive EOS.
\n
"
);
...
...
dlls/quartz/tests/mpegsplit.c
View file @
3b29ef9e
...
...
@@ -1098,7 +1098,7 @@ struct testfilter
const
AM_MEDIA_TYPE
*
mt
;
HANDLE
eos_event
;
unsigned
int
sample_count
,
eos_count
,
new_segment_count
;
REFERENCE_TIME
seek_start
,
seek_end
;
REFERENCE_TIME
se
gment_start
,
segment_end
,
se
ek_start
,
seek_end
;
};
static
inline
struct
testfilter
*
impl_from_strmbase_filter
(
struct
strmbase_filter
*
iface
)
...
...
@@ -1260,14 +1260,20 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface,
IMediaSeeking
*
seeking
;
HRESULT
hr
;
if
(
winetest_debug
>
1
)
trace
(
"%04x: Got segment with timestamps %I64d-%I64d.
\n
"
,
GetCurrentThreadId
(),
start
,
end
);
++
filter
->
new_segment_count
;
IPin_QueryInterface
(
iface
->
pin
.
peer
,
&
IID_IMediaSeeking
,
(
void
**
)
&
seeking
);
hr
=
IMediaSeeking_GetPositions
(
seeking
,
&
filter
->
seek_start
,
&
filter
->
seek_end
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
rate
==
1
.
0
,
"Got rate %.16e.
\n
"
,
rate
);
IMediaSeeking_Release
(
seeking
);
ok
(
start
==
filter
->
segment_start
,
"Expected start %I64d, got %I64d.
\n
"
,
filter
->
segment_start
,
start
);
ok
(
end
==
filter
->
segment_end
,
"Expected end %I64d, got %I64d.
\n
"
,
filter
->
segment_end
,
end
);
ok
(
rate
==
1
.
0
,
"Got rate %.16e.
\n
"
,
rate
);
return
S_OK
;
}
...
...
@@ -1367,6 +1373,7 @@ static void testfilter_init(struct testfilter *filter)
strmbase_sink_init
(
&
filter
->
sink
,
&
filter
->
filter
,
L"sink"
,
&
testsink_ops
,
NULL
);
filter
->
IAsyncReader_iface
.
lpVtbl
=
&
async_reader_vtbl
;
filter
->
eos_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
filter
->
segment_end
=
5392500
;
}
static
void
test_connect_pin
(
void
)
...
...
@@ -1862,11 +1869,11 @@ static void test_streaming(void)
ok
(
WaitForSingleObject
(
testsink
.
eos_event
,
100
)
==
WAIT_TIMEOUT
,
"Got more than one EOS.
\n
"
);
ok
(
testsink
.
sample_count
,
"Expected at least one sample.
\n
"
);
testsink
.
sample_count
=
testsink
.
eos_count
=
0
;
start
=
100
*
10000
;
end
=
300
*
10000
;
hr
=
IMediaSeeking_SetPositions
(
seeking
,
&
start
,
AM_SEEKING_AbsolutePositioning
,
&
end
,
AM_SEEKING_AbsolutePositioning
);
testsink
.
new_segment_count
=
testsink
.
sample_count
=
testsink
.
eos_count
=
0
;
testsink
.
segment_
start
=
100
*
10000
;
testsink
.
segment_
end
=
300
*
10000
;
hr
=
IMediaSeeking_SetPositions
(
seeking
,
&
testsink
.
segment_
start
,
AM_SEEKING_AbsolutePositioning
,
&
testsink
.
segment_
end
,
AM_SEEKING_AbsolutePositioning
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
WaitForSingleObject
(
testsink
.
eos_event
,
1000
),
"Did not receive EOS.
\n
"
);
...
...
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