Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cc720001
Commit
cc720001
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 VMR7 filter interfaces.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4b7d2ea0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
111 additions
and
0 deletions
+111
-0
vmr7.c
dlls/quartz/tests/vmr7.c
+111
-0
No files found.
dlls/quartz/tests/vmr7.c
View file @
cc720001
...
...
@@ -24,6 +24,24 @@
#include "vmr9.h"
#include "wine/test.h"
static
IBaseFilter
*
create_vmr7
(
DWORD
mode
)
{
IBaseFilter
*
filter
=
NULL
;
IVMRFilterConfig
*
config
;
HRESULT
hr
=
CoCreateInstance
(
&
CLSID_VideoMixingRenderer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
filter
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
mode
)
{
hr
=
IBaseFilter_QueryInterface
(
filter
,
&
IID_IVMRFilterConfig
,
(
void
**
)
&
config
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IVMRFilterConfig_SetRenderingMode
(
config
,
mode
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
IVMRFilterConfig_Release
(
config
);
}
return
filter
;
}
static
void
test_filter_config
(
void
)
{
IVMRFilterConfig
*
config
;
...
...
@@ -130,11 +148,104 @@ 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_vmr7
(
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_IVMRAspectRatioControl
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRDeinterlaceControl
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRFilterConfig
,
TRUE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMixerBitmap
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRMonitorConfig
,
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_IVMRAspectRatioControl9
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRDeinterlaceControl9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRFilterConfig9
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerBitmap9
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl
,
FALSE
);
check_interface
(
filter
,
&
IID_IVMRMixerControl9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRMonitorConfig9
,
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_vmr7
(
VMRMode_Windowless
);
check_interface
(
filter
,
&
IID_IVMRMonitorConfig
,
TRUE
);
check_interface
(
filter
,
&
IID_IVMRWindowlessControl
,
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_IVMRMonitorConfig9
,
FALSE
);
todo_wine
check_interface
(
filter
,
&
IID_IVMRWindowlessControl9
,
FALSE
);
IBaseFilter_Release
(
filter
);
filter
=
create_vmr7
(
VMRMode_Renderless
);
check_interface
(
filter
,
&
IID_IVMRSurfaceAllocatorNotify
,
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_IVMRSurfaceAllocatorNotify9
,
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
(
vmr7
)
{
CoInitialize
(
NULL
);
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