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
c7a3f123
Commit
c7a3f123
authored
Dec 03, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Dec 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Support IFilterMapper3 interface.
parent
b3ebd5a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
57 deletions
+67
-57
filtermapper.c
dlls/quartz/filtermapper.c
+67
-57
No files found.
dlls/quartz/filtermapper.c
View file @
c7a3f123
/*
* IFilterMapper & IFilterMapper
2
Implementations
* IFilterMapper & IFilterMapper
3
Implementations
*
* Copyright 2003 Robert Shearman
* Copyright 2004 Christian Costa
...
...
@@ -86,9 +86,9 @@ static const GUID IID_IAMFilterData = {
};
typedef
struct
FilterMapper
2
Impl
typedef
struct
FilterMapper
3
Impl
{
const
IFilterMapper
2
Vtbl
*
lpVtbl
;
const
IFilterMapper
3
Vtbl
*
lpVtbl
;
const
IFilterMapperVtbl
*
lpVtblFilterMapper
;
const
IAMFilterDataVtbl
*
lpVtblAMFilterData
;
const
IUnknownVtbl
*
IInner_vtbl
;
...
...
@@ -96,26 +96,26 @@ typedef struct FilterMapper2Impl
IUnknown
*
pUnkOuter
;
BOOL
bUnkOuterValid
;
BOOL
bAggregatable
;
}
FilterMapper
2
Impl
;
}
FilterMapper
3
Impl
;
static
const
IUnknownVtbl
IInner_VTable
;
static
const
IFilterMapper
2Vtbl
fm2
vtbl
;
static
const
IFilterMapper
3Vtbl
fm3
vtbl
;
static
const
IFilterMapperVtbl
fmvtbl
;
static
const
IAMFilterDataVtbl
AMFilterDataVtbl
;
static
inline
FilterMapper
2
Impl
*
impl_from_IFilterMapper
(
IFilterMapper
*
iface
)
static
inline
FilterMapper
3
Impl
*
impl_from_IFilterMapper
(
IFilterMapper
*
iface
)
{
return
(
FilterMapper
2Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper2
Impl
,
lpVtblFilterMapper
));
return
(
FilterMapper
3Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper3
Impl
,
lpVtblFilterMapper
));
}
static
inline
FilterMapper
2
Impl
*
impl_from_IAMFilterData
(
IAMFilterData
*
iface
)
static
inline
FilterMapper
3
Impl
*
impl_from_IAMFilterData
(
IAMFilterData
*
iface
)
{
return
(
FilterMapper
2Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper2
Impl
,
lpVtblAMFilterData
));
return
(
FilterMapper
3Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper3
Impl
,
lpVtblAMFilterData
));
}
static
inline
FilterMapper
2
Impl
*
impl_from_inner_IUnknown
(
IUnknown
*
iface
)
static
inline
FilterMapper
3
Impl
*
impl_from_inner_IUnknown
(
IUnknown
*
iface
)
{
return
(
FilterMapper
2Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper2
Impl
,
IInner_vtbl
));
return
(
FilterMapper
3Impl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
FilterMapper3
Impl
,
IInner_vtbl
));
}
static
const
WCHAR
wszClsidSlash
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
'\\'
,
0
};
...
...
@@ -220,7 +220,7 @@ static void delete_vector(struct Vector * v)
HRESULT
FilterMapper2_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
FilterMapper
2
Impl
*
pFM2impl
;
FilterMapper
3
Impl
*
pFM2impl
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppObj
);
...
...
@@ -232,7 +232,7 @@ HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj)
pFM2impl
->
bUnkOuterValid
=
FALSE
;
pFM2impl
->
bAggregatable
=
FALSE
;
pFM2impl
->
IInner_vtbl
=
&
IInner_VTable
;
pFM2impl
->
lpVtbl
=
&
fm
2
vtbl
;
pFM2impl
->
lpVtbl
=
&
fm
3
vtbl
;
pFM2impl
->
lpVtblFilterMapper
=
&
fmvtbl
;
pFM2impl
->
lpVtblAMFilterData
=
&
AMFilterDataVtbl
;
pFM2impl
->
refCount
=
1
;
...
...
@@ -246,7 +246,7 @@ HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj)
HRESULT
FilterMapper_create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
FilterMapper
2
Impl
*
pFM2impl
;
FilterMapper
3
Impl
*
pFM2impl
;
HRESULT
hr
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppObj
);
...
...
@@ -264,7 +264,7 @@ HRESULT FilterMapper_create(IUnknown *pUnkOuter, LPVOID *ppObj)
static
HRESULT
WINAPI
Inner_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
FilterMapper
2
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
This
->
bAggregatable
)
...
...
@@ -274,7 +274,8 @@ static HRESULT WINAPI Inner_QueryInterface(IUnknown * iface, REFIID riid, LPVOID
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
&
This
->
IInner_vtbl
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IFilterMapper2
))
else
if
(
IsEqualIID
(
riid
,
&
IID_IFilterMapper2
)
||
IsEqualIID
(
riid
,
&
IID_IFilterMapper3
))
*
ppv
=
This
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IFilterMapper
))
*
ppv
=
&
This
->
lpVtblFilterMapper
;
...
...
@@ -293,7 +294,7 @@ static HRESULT WINAPI Inner_QueryInterface(IUnknown * iface, REFIID riid, LPVOID
static
ULONG
WINAPI
Inner_AddRef
(
IUnknown
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() AddRef from %d
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -303,7 +304,7 @@ static ULONG WINAPI Inner_AddRef(IUnknown * iface)
static
ULONG
WINAPI
Inner_Release
(
IUnknown
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_inner_IUnknown
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -323,9 +324,9 @@ static const IUnknownVtbl IInner_VTable =
Inner_Release
};
static
HRESULT
WINAPI
FilterMapper
2_QueryInterface
(
IFilterMapper2
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
static
HRESULT
WINAPI
FilterMapper
3_QueryInterface
(
IFilterMapper3
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
FilterMapper
2Impl
*
This
=
(
FilterMapper2
Impl
*
)
iface
;
FilterMapper
3Impl
*
This
=
(
FilterMapper3
Impl
*
)
iface
;
if
(
This
->
bAggregatable
)
This
->
bUnkOuterValid
=
TRUE
;
...
...
@@ -353,28 +354,28 @@ static HRESULT WINAPI FilterMapper2_QueryInterface(IFilterMapper2 * iface, REFII
return
IUnknown_QueryInterface
((
IUnknown
*
)
&
(
This
->
IInner_vtbl
),
riid
,
ppv
);
}
static
ULONG
WINAPI
FilterMapper
2_AddRef
(
IFilterMapper2
*
iface
)
static
ULONG
WINAPI
FilterMapper
3_AddRef
(
IFilterMapper3
*
iface
)
{
FilterMapper
2Impl
*
This
=
(
FilterMapper2
Impl
*
)
iface
;
FilterMapper
3Impl
*
This
=
(
FilterMapper3
Impl
*
)
iface
;
if
(
This
->
pUnkOuter
&&
This
->
bUnkOuterValid
)
return
IUnknown_AddRef
(
This
->
pUnkOuter
);
return
IUnknown_AddRef
((
IUnknown
*
)
&
(
This
->
IInner_vtbl
));
}
static
ULONG
WINAPI
FilterMapper
2_Release
(
IFilterMapper2
*
iface
)
static
ULONG
WINAPI
FilterMapper
3_Release
(
IFilterMapper3
*
iface
)
{
FilterMapper
2Impl
*
This
=
(
FilterMapper2
Impl
*
)
iface
;
FilterMapper
3Impl
*
This
=
(
FilterMapper3
Impl
*
)
iface
;
if
(
This
->
pUnkOuter
&&
This
->
bUnkOuterValid
)
return
IUnknown_Release
(
This
->
pUnkOuter
);
return
IUnknown_Release
((
IUnknown
*
)
&
(
This
->
IInner_vtbl
));
}
/*** IFilterMapper
2
methods ***/
/*** IFilterMapper
3
methods ***/
static
HRESULT
WINAPI
FilterMapper
2
_CreateCategory
(
IFilterMapper
2
*
iface
,
static
HRESULT
WINAPI
FilterMapper
3
_CreateCategory
(
IFilterMapper
3
*
iface
,
REFCLSID
clsidCategory
,
DWORD
dwCategoryMerit
,
LPCWSTR
szDescription
)
...
...
@@ -431,8 +432,8 @@ static HRESULT WINAPI FilterMapper2_CreateCategory(
return
hr
;
}
static
HRESULT
WINAPI
FilterMapper
2
_UnregisterFilter
(
IFilterMapper
2
*
iface
,
static
HRESULT
WINAPI
FilterMapper
3
_UnregisterFilter
(
IFilterMapper
3
*
iface
,
const
CLSID
*
pclsidCategory
,
const
OLECHAR
*
szInstance
,
REFCLSID
Filter
)
...
...
@@ -740,8 +741,8 @@ static void FM2_DeleteRegFilter(REGFILTER2 * prf2)
CoTaskMemFree
((
LPVOID
)
prf2
->
u
.
s1
.
rgPins2
);
}
static
HRESULT
WINAPI
FilterMapper
2
_RegisterFilter
(
IFilterMapper
2
*
iface
,
static
HRESULT
WINAPI
FilterMapper
3
_RegisterFilter
(
IFilterMapper
3
*
iface
,
REFCLSID
clsidFilter
,
LPCWSTR
szName
,
IMoniker
**
ppMoniker
,
...
...
@@ -992,8 +993,8 @@ static int mm_compare(const void * left, const void * right)
* meaning match any input/output pin as long as one exists), otherwise match any
* filter that meets the rest of the requirements.
*/
static
HRESULT
WINAPI
FilterMapper
2
_EnumMatchingFilters
(
IFilterMapper
2
*
iface
,
static
HRESULT
WINAPI
FilterMapper
3
_EnumMatchingFilters
(
IFilterMapper
3
*
iface
,
IEnumMoniker
**
ppEnum
,
DWORD
dwFlags
,
BOOL
bExactMatch
,
...
...
@@ -1204,42 +1205,51 @@ static HRESULT WINAPI FilterMapper2_EnumMatchingFilters(
return
hr
;
}
static
const
IFilterMapper2Vtbl
fm2vtbl
=
static
HRESULT
WINAPI
FilterMapper3_GetICreateDevEnum
(
IFilterMapper3
*
iface
,
ICreateDevEnum
**
ppEnum
)
{
TRACE
(
"(%p, %p)
\n
"
,
iface
,
ppEnum
);
if
(
!
ppEnum
)
return
E_POINTER
;
return
CoCreateInstance
(
&
CLSID_SystemDeviceEnum
,
NULL
,
CLSCTX_INPROC
,
&
IID_ICreateDevEnum
,
(
void
**
)
ppEnum
);
}
static
const
IFilterMapper3Vtbl
fm3vtbl
=
{
FilterMapper
2
_QueryInterface
,
FilterMapper
2
_AddRef
,
FilterMapper
2
_Release
,
FilterMapper
3
_QueryInterface
,
FilterMapper
3
_AddRef
,
FilterMapper
3
_Release
,
FilterMapper2_CreateCategory
,
FilterMapper2_UnregisterFilter
,
FilterMapper2_RegisterFilter
,
FilterMapper2_EnumMatchingFilters
FilterMapper3_CreateCategory
,
FilterMapper3_UnregisterFilter
,
FilterMapper3_RegisterFilter
,
FilterMapper3_EnumMatchingFilters
,
FilterMapper3_GetICreateDevEnum
};
/*** IUnknown methods ***/
static
HRESULT
WINAPI
FilterMapper_QueryInterface
(
IFilterMapper
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
FilterMapper
2_QueryInterface
((
IFilterMapper2
*
)
&
This
->
lpVtbl
,
riid
,
ppv
);
return
FilterMapper
3_QueryInterface
((
IFilterMapper3
*
)
&
This
->
lpVtbl
,
riid
,
ppv
);
}
static
ULONG
WINAPI
FilterMapper_AddRef
(
IFilterMapper
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
return
FilterMapper
2_AddRef
((
IFilterMapper2
*
)
This
);
return
FilterMapper
3_AddRef
((
IFilterMapper3
*
)
This
);
}
static
ULONG
WINAPI
FilterMapper_Release
(
IFilterMapper
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
return
FilterMapper
2_Release
((
IFilterMapper2
*
)
This
);
return
FilterMapper
3_Release
((
IFilterMapper3
*
)
This
);
}
/*** IFilterMapper methods ***/
...
...
@@ -1256,7 +1266,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
CLSID
clsOutMaj
,
CLSID
clsOutSub
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IFilterMapper
(
iface
);
GUID
InputType
[
2
];
GUID
OutputType
[
2
];
IEnumMoniker
*
ppEnumMoniker
;
...
...
@@ -1285,7 +1295,7 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
*
ppEnum
=
NULL
;
hr
=
IFilterMapper
2_EnumMatchingFilters
((
IFilterMapper2
*
)
This
,
hr
=
IFilterMapper
3_EnumMatchingFilters
((
IFilterMapper3
*
)
This
,
&
ppEnumMoniker
,
0
,
TRUE
,
...
...
@@ -1745,23 +1755,23 @@ static const IFilterMapperVtbl fmvtbl =
/*** IUnknown methods ***/
static
HRESULT
WINAPI
AMFilterData_QueryInterface
(
IAMFilterData
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
return
FilterMapper
2_QueryInterface
((
IFilterMapper2
*
)
This
,
riid
,
ppv
);
return
FilterMapper
3_QueryInterface
((
IFilterMapper3
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
AMFilterData_AddRef
(
IAMFilterData
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
return
FilterMapper
2_AddRef
((
IFilterMapper2
*
)
This
);
return
FilterMapper
3_AddRef
((
IFilterMapper3
*
)
This
);
}
static
ULONG
WINAPI
AMFilterData_Release
(
IAMFilterData
*
iface
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
return
FilterMapper
2_Release
((
IFilterMapper2
*
)
This
);
return
FilterMapper
3_Release
((
IFilterMapper3
*
)
This
);
}
/*** IAMFilterData methods ***/
...
...
@@ -1769,7 +1779,7 @@ static HRESULT WINAPI AMFilterData_ParseFilterData(IAMFilterData* iface,
BYTE
*
pData
,
ULONG
cb
,
BYTE
**
ppRegFilter2
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
HRESULT
hr
=
S_OK
;
REGFILTER2
*
prf2
;
...
...
@@ -1795,7 +1805,7 @@ static HRESULT WINAPI AMFilterData_CreateFilterData(IAMFilterData* iface,
BYTE
**
pRegFilterData
,
ULONG
*
pcb
)
{
FilterMapper
2
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
FilterMapper
3
Impl
*
This
=
impl_from_IAMFilterData
(
iface
);
TRACE
(
"(%p/%p)->(%p, %p, %p)
\n
"
,
This
,
iface
,
prf2
,
pRegFilterData
,
pcb
);
...
...
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