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
08d91f6d
Commit
08d91f6d
authored
Apr 02, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add tests for IBaseFilter::EnumPins() on the VMR7.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc720001
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
154 additions
and
0 deletions
+154
-0
vmr7.c
dlls/quartz/tests/vmr7.c
+154
-0
No files found.
dlls/quartz/tests/vmr7.c
View file @
08d91f6d
...
...
@@ -42,6 +42,28 @@ static IBaseFilter *create_vmr7(DWORD mode)
return
filter
;
}
static
HRESULT
set_mixing_mode
(
IBaseFilter
*
filter
)
{
IVMRFilterConfig
*
config
;
HRESULT
hr
;
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IVMRFilterConfig
,
(
void
**
)
&
config
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IVMRFilterConfig_SetNumberOfStreams
(
config
,
2
);
todo_wine
ok
(
hr
==
VFW_E_DDRAW_CAPS_NOT_SUITABLE
||
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IVMRFilterConfig_Release
(
config
);
return
hr
;
}
static
ULONG
get_refcount
(
void
*
iface
)
{
IUnknown
*
unknown
=
iface
;
IUnknown_AddRef
(
unknown
);
return
IUnknown_Release
(
unknown
);
}
static
void
test_filter_config
(
void
)
{
IVMRFilterConfig
*
config
;
...
...
@@ -240,12 +262,144 @@ static void test_interfaces(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_enum_pins
(
void
)
{
IBaseFilter
*
filter
=
create_vmr7
(
0
);
IEnumPins
*
enum1
,
*
enum2
;
ULONG
count
,
ref
;
IPin
*
pins
[
3
];
HRESULT
hr
;
ref
=
get_refcount
(
filter
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
hr
=
IBaseFilter_EnumPins
(
filter
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ref
=
get_refcount
(
filter
);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
pins
[
0
]);
todo_wine
ok
(
ref
==
3
,
"Got unexpected refcount %d.
\n
"
,
ref
);
ref
=
get_refcount
(
enum1
);
ok
(
ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
ref
);
IPin_Release
(
pins
[
0
]);
ref
=
get_refcount
(
filter
);
ok
(
ref
==
2
,
"Got unexpected refcount %d.
\n
"
,
ref
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
&
count
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count %u.
\n
"
,
count
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
count
,
"Got count %u.
\n
"
,
count
);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
2
,
pins
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
2
,
pins
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count %u.
\n
"
,
count
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Clone
(
enum1
,
&
enum2
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Skip
(
enum1
,
2
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Skip
(
enum1
,
1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Skip
(
enum1
,
1
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum2
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pins
[
0
]);
IEnumPins_Release
(
enum2
);
if
(
SUCCEEDED
(
set_mixing_mode
(
filter
)))
{
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pins
[
0
]);
hr
=
IEnumPins_Next
(
enum1
,
1
,
pins
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
2
,
pins
,
&
count
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
2
,
"Got count %u.
\n
"
,
count
);
IPin_Release
(
pins
[
0
]);
IPin_Release
(
pins
[
1
]);
hr
=
IEnumPins_Reset
(
enum1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumPins_Next
(
enum1
,
3
,
pins
,
&
count
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
2
,
"Got count %u.
\n
"
,
count
);
IPin_Release
(
pins
[
0
]);
IPin_Release
(
pins
[
1
]);
}
else
skip
(
"Mixing mode is not supported.
\n
"
);
IEnumPins_Release
(
enum1
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
vmr7
)
{
CoInitialize
(
NULL
);
test_filter_config
();
test_interfaces
();
test_enum_pins
();
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