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
a490e819
Commit
a490e819
authored
Oct 02, 2022
by
Anton Baskanov
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add tests for MPEG layer-3 decoder IEnumMediaTypes.
Signed-off-by:
Anton Baskanov
<
baskanov@gmail.com
>
parent
21ae94d4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
mpeglayer3.c
dlls/quartz/tests/mpeglayer3.c
+76
-0
No files found.
dlls/quartz/tests/mpeglayer3.c
View file @
a490e819
...
@@ -488,6 +488,81 @@ static void test_pin_info(void)
...
@@ -488,6 +488,81 @@ static void test_pin_info(void)
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
}
static
void
test_enum_media_types
(
void
)
{
IBaseFilter
*
filter
=
create_mpeg_layer3_decoder
();
IEnumMediaTypes
*
enum1
,
*
enum2
;
AM_MEDIA_TYPE
*
mts
[
1
];
ULONG
ref
,
count
;
HRESULT
hr
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
L"In"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
!
count
,
"Got count %lu.
\n
"
,
count
);
hr
=
IEnumMediaTypes_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Clone
(
enum1
,
&
enum2
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Skip
(
enum1
,
1
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum2
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
IEnumMediaTypes_Release
(
enum1
);
IEnumMediaTypes_Release
(
enum2
);
IPin_Release
(
pin
);
IBaseFilter_FindPin
(
filter
,
L"Out"
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
!
count
,
"Got count %lu.
\n
"
,
count
);
hr
=
IEnumMediaTypes_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum1
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Clone
(
enum1
,
&
enum2
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Skip
(
enum1
,
1
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enum2
,
1
,
mts
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#lx.
\n
"
,
hr
);
IEnumMediaTypes_Release
(
enum1
);
IEnumMediaTypes_Release
(
enum2
);
IPin_Release
(
pin
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
}
START_TEST
(
mpeglayer3
)
START_TEST
(
mpeglayer3
)
{
{
IBaseFilter
*
filter
;
IBaseFilter
*
filter
;
...
@@ -508,6 +583,7 @@ START_TEST(mpeglayer3)
...
@@ -508,6 +583,7 @@ START_TEST(mpeglayer3)
test_enum_pins
();
test_enum_pins
();
test_find_pin
();
test_find_pin
();
test_pin_info
();
test_pin_info
();
test_enum_media_types
();
CoUninitialize
();
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