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
9e26bc81
Commit
9e26bc81
authored
May 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Test enumerating DMOs.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2f2ac792
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
2 deletions
+72
-2
Makefile.in
dlls/quartz/tests/Makefile.in
+1
-1
filtermapper.c
dlls/quartz/tests/filtermapper.c
+71
-1
No files found.
dlls/quartz/tests/Makefile.in
View file @
9e26bc81
TESTDLL
=
quartz.dll
IMPORTS
=
strmbase advapi32 d3d9 msvfw32 ole32 oleaut32 user32 uuid
IMPORTS
=
strmbase advapi32 d3d9 ms
dmo ms
vfw32 ole32 oleaut32 user32 uuid
C_SRCS
=
\
acmwrapper.c
\
...
...
dlls/quartz/tests/filtermapper.c
View file @
9e26bc81
...
...
@@ -23,10 +23,13 @@
#include "wine/test.h"
#include "winbase.h"
#include "dshow.h"
#include "
winternl
.h"
#include "
mediaobj
.h"
#include "initguid.h"
#include "dmo.h"
#include "wine/fil_data.h"
static
const
GUID
testclsid
=
{
0x77777777
};
static
IFilterMapper3
*
create_mapper
(
void
)
{
IFilterMapper3
*
ret
;
...
...
@@ -662,6 +665,72 @@ static void test_aggregation(void)
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
}
static
void
test_dmo
(
void
)
{
DMO_PARTIAL_MEDIATYPE
mt
=
{
MEDIATYPE_Audio
,
MEDIASUBTYPE_PCM
};
IEnumRegFilters
*
enumerator1
;
IEnumMoniker
*
enumerator
;
IFilterMapper3
*
mapper
;
IFilterMapper
*
mapper1
;
REGFILTER
*
regfilter
;
IMoniker
*
moniker
;
WCHAR
*
name
;
HRESULT
hr
;
BOOL
found
;
ULONG
ref
;
hr
=
DMORegister
(
L"dmo test"
,
&
testclsid
,
&
DMOCATEGORY_AUDIO_DECODER
,
0
,
1
,
&
mt
,
1
,
&
mt
);
if
(
hr
==
E_FAIL
)
{
skip
(
"Not enough permissions to register DMOs.
\n
"
);
return
;
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mapper
=
create_mapper
();
IFilterMapper3_QueryInterface
(
mapper
,
&
IID_IFilterMapper
,
(
void
**
)
&
mapper1
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IFilterMapper3_EnumMatchingFilters
(
mapper
,
&
enumerator
,
0
,
FALSE
,
0
,
FALSE
,
0
,
NULL
,
NULL
,
NULL
,
FALSE
,
FALSE
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
found
=
FALSE
;
while
(
IEnumMoniker_Next
(
enumerator
,
1
,
&
moniker
,
NULL
)
==
S_OK
)
{
hr
=
IMoniker_GetDisplayName
(
moniker
,
NULL
,
NULL
,
&
name
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
!
wcscmp
(
name
,
L"@device:dmo:{77777777-0000-0000-0000-000000000000}{57F2DB8B-E6BB-4513-9D43-DCD2A6593125}"
))
found
=
TRUE
;
CoTaskMemFree
(
name
);
IMoniker_Release
(
moniker
);
}
IEnumMoniker_Release
(
enumerator
);
ok
(
found
,
"DMO should be enumerated.
\n
"
);
/* DMOs lack a CLSID property and are therefore not enumerated by IFilterMapper. */
hr
=
IFilterMapper_EnumMatchingFilters
(
mapper1
,
&
enumerator1
,
0
,
FALSE
,
GUID_NULL
,
GUID_NULL
,
FALSE
,
FALSE
,
GUID_NULL
,
GUID_NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
while
(
IEnumRegFilters_Next
(
enumerator1
,
1
,
&
regfilter
,
NULL
)
==
S_OK
)
{
ok
(
!
IsEqualGUID
(
&
regfilter
->
Clsid
,
&
testclsid
),
"DMO should not be enumerated.
\n
"
);
ok
(
wcscmp
(
regfilter
->
Name
,
L"dmo test"
),
"DMO should not be enumerated.
\n
"
);
}
IEnumRegFilters_Release
(
enumerator1
);
IFilterMapper_Release
(
mapper1
);
ref
=
IFilterMapper3_Release
(
mapper
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
hr
=
DMOUnregister
(
&
testclsid
,
&
DMOCATEGORY_AUDIO_DECODER
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
}
START_TEST
(
filtermapper
)
{
CoInitialize
(
NULL
);
...
...
@@ -673,6 +742,7 @@ START_TEST(filtermapper)
test_register_filter_with_null_clsMinorType
();
test_parse_filter_data
();
test_aggregation
();
test_dmo
();
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