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
8233e116
Commit
8233e116
authored
Apr 03, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add tests for VMR9 filter interfaces.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
957111ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
0 deletions
+111
-0
vmr9.c
dlls/quartz/tests/vmr9.c
+111
-0
No files found.
dlls/quartz/tests/vmr9.c
View file @
8233e116
...
...
@@ -24,6 +24,24 @@
#include "vmr9.h"
#include "wine/test.h"
static
IBaseFilter
*
create_vmr9
(
DWORD
mode
)
{
IBaseFilter
*
filter
=
NULL
;
IVMRFilterConfig9
*
config
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_VideoMixingRenderer9
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
mode
)
{
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IVMRFilterConfig9
,
(
void
**
)
&
config
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IVMRFilterConfig9_SetRenderingMode
(
config
,
mode
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IVMRFilterConfig9_Release
(
config
);
}
return
filter
;
}
static
void
test_filter_config
(
void
)
{
IVMRFilterConfig9
*
config
;
...
...
@@ -125,6 +143,98 @@ static void test_filter_config(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
void
test_interfaces
(
void
)
{
IBaseFilter
*
filter
=
create_vmr9
(
0
);
ULONG
ref
;
check_interface
(
filter
,
&
IID_IAMCertifiedOutputProtection
,
TRUE
);
check_interface
(
filter
,
&
IID_IAMFilterMiscFlags
,
TRUE
);
check_interface
(
filter
,
&
IID_IBaseFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IBasicVideo
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IBasicVideo2
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IKsPropertySet
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaFilter
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaPosition
,
TRUE
);
check_interface
(
filter
,
&
IID_IMediaSeeking
,
TRUE
);
check_interface
(
filter
,
&
IID_IPersist
,
TRUE
);
check_interface
(
filter
,
&
IID_IQualityControl
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IQualProp
,
TRUE
);
check_interface
(
filter
,
&
IID_IUnknown
,
TRUE
);
check_interface
(
filter
,
&
IID_IVideoWindow
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRAspectRatioControl9
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRDeinterlaceControl9
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRFilterConfig9
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMixerBitmap9
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRMonitorConfig9
,
TRUE
);
check_interface
(
filter
,
&
IID_IBasicAudio
,
FALSE
);
check_interface
(
filter
,
&
IID_IDirectDrawVideo
,
FALSE
);
check_interface
(
filter
,
&
IID_IPersistPropertyBag
,
FALSE
);
check_interface
(
filter
,
&
IID_IPin
,
FALSE
);
check_interface
(
filter
,
&
IID_IReferenceClock
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRAspectRatioControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRDeinterlaceControl
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRFilterConfig
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerBitmap
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMonitorConfig
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify9
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl9
,
FALSE
);
IBaseFilter_Release
(
filter
);
filter
=
create_vmr9
(
VMR9Mode_Windowless
);
check_interface
(
filter
,
&
IID_IVMRMonitorConfig9
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl9
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IBasicVideo
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicVideo2
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify9
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMonitorConfig
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRWindowlessControl
,
FALSE
);
IBaseFilter_Release
(
filter
);
filter
=
create_vmr9
(
VMR9Mode_Renderless
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify9
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IBasicVideo
,
FALSE
);
check_interface
(
filter
,
&
IID_IBasicVideo2
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVideoWindow
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMonitorConfig
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMonitorConfig9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl9
,
FALSE
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
vmr9
)
{
IBaseFilter
*
filter
;
...
...
@@ -141,6 +251,7 @@ START_TEST(vmr9)
IBaseFilter_Release
(
filter
);
test_filter_config
();
test_interfaces
();
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