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
b1ffe12e
Commit
b1ffe12e
authored
Jun 29, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/tests: Add some tests for media types.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f30248f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
nullrenderer.c
dlls/qedit/tests/nullrenderer.c
+28
-0
samplegrabber.c
dlls/qedit/tests/samplegrabber.c
+34
-0
No files found.
dlls/qedit/tests/nullrenderer.c
View file @
b1ffe12e
...
...
@@ -352,6 +352,33 @@ static void test_aggregation(void)
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
}
static
void
test_media_types
(
void
)
{
IBaseFilter
*
filter
=
create_null_renderer
();
AM_MEDIA_TYPE
mt
=
{},
*
pmt
;
IEnumMediaTypes
*
enummt
;
HRESULT
hr
;
ULONG
ref
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
IEnumMediaTypes_Release
(
enummt
);
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pin
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
nullrenderer
)
{
IBaseFilter
*
filter
;
...
...
@@ -373,6 +400,7 @@ START_TEST(nullrenderer)
test_find_pin
();
test_pin_info
();
test_aggregation
();
test_media_types
();
CoUninitialize
();
}
dlls/qedit/tests/samplegrabber.c
View file @
b1ffe12e
...
...
@@ -449,6 +449,39 @@ static void test_aggregation(void)
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
}
static
void
test_media_types
(
void
)
{
IBaseFilter
*
filter
=
create_sample_grabber
();
IEnumMediaTypes
*
enummt
;
AM_MEDIA_TYPE
mt
=
{};
HRESULT
hr
;
ULONG
ref
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
sink_id
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
todo_wine
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pin
);
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
todo_wine
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pin
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
samplegrabber
)
{
IBaseFilter
*
filter
;
...
...
@@ -470,6 +503,7 @@ START_TEST(samplegrabber)
test_find_pin
();
test_pin_info
();
test_aggregation
();
test_media_types
();
CoUninitialize
();
}
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