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
bfc1f808
Commit
bfc1f808
authored
Dec 23, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/tests: Test that sink pins are enumerated first.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5a461804
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
smartteefilter.c
dlls/qcap/tests/smartteefilter.c
+12
-10
No files found.
dlls/qcap/tests/smartteefilter.c
View file @
bfc1f808
...
...
@@ -757,14 +757,6 @@ static HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid,
return
S_OK
;
}
static
HRESULT
testsink_query_accept
(
struct
strmbase_pin
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
filter
);
if
(
filter
->
sink_mt
&&
!
compare_media_types
(
mt
,
filter
->
sink_mt
))
return
S_FALSE
;
return
S_OK
;
}
static
HRESULT
testsink_get_media_type
(
struct
strmbase_pin
*
iface
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
filter
);
...
...
@@ -776,6 +768,14 @@ static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int
return
VFW_S_NO_MORE_ITEMS
;
}
static
HRESULT
testsink_connect
(
struct
strmbase_sink
*
iface
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
pin
.
filter
);
if
(
filter
->
sink_mt
&&
!
IsEqualGUID
(
&
mt
->
majortype
,
&
filter
->
sink_mt
->
majortype
))
return
VFW_E_TYPE_NOT_ACCEPTED
;
return
S_OK
;
}
static
HRESULT
WINAPI
testsink_Receive
(
struct
strmbase_sink
*
iface
,
IMediaSample
*
sample
)
{
struct
testfilter
*
filter
=
impl_from_strmbase_filter
(
iface
->
pin
.
filter
);
...
...
@@ -866,8 +866,8 @@ static HRESULT testsink_end_flush(struct strmbase_sink *iface)
static
const
struct
strmbase_sink_ops
testsink_ops
=
{
.
base
.
pin_query_interface
=
testsink_query_interface
,
.
base
.
pin_query_accept
=
testsink_query_accept
,
.
base
.
pin_get_media_type
=
testsink_get_media_type
,
.
sink_connect
=
testsink_connect
,
.
pfnReceive
=
testsink_Receive
,
.
sink_new_segment
=
testsink_new_segment
,
.
sink_eos
=
testsink_eos
,
...
...
@@ -1080,6 +1080,8 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
->
sink
.
pin
.
IPin_iface
,
&
req_mt
);
ok
(
hr
==
VFW_E_NO_ACCEPTABLE_TYPES
,
"Got hr %#x.
\n
"
,
hr
);
/* Test enumeration of sink media types. */
testsink
->
sink_mt
=
&
req_mt
;
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
->
sink
.
pin
.
IPin_iface
,
NULL
);
todo_wine
ok
(
hr
==
VFW_E_NO_ACCEPTABLE_TYPES
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -1093,7 +1095,7 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
req_mt
.
lSampleSize
=
3
;
hr
=
IFilterGraph2_ConnectDirect
(
graph
,
source
,
&
testsink
->
sink
.
pin
.
IPin_iface
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
compare_media_types
(
&
testsink
->
sink
.
pin
.
mt
,
&
req_mt
),
"Media types didn't match.
\n
"
);
todo_wine
ok
(
compare_media_types
(
&
testsink
->
sink
.
pin
.
mt
,
&
req_mt
),
"Media types didn't match.
\n
"
);
IFilterGraph2_Disconnect
(
graph
,
source
);
IFilterGraph2_Disconnect
(
graph
,
&
testsink
->
sink
.
pin
.
IPin_iface
);
...
...
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