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
4b839bdd
Commit
4b839bdd
authored
May 29, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Reimplement BaseFilterImpl_QueryInterface() using a callback.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5e1ed74c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
filter.c
dlls/strmbase/filter.c
+18
-6
strmbase.h
include/wine/strmbase.h
+1
-0
No files found.
dlls/strmbase/filter.c
View file @
4b839bdd
...
...
@@ -27,20 +27,32 @@ static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface)
return
CONTAINING_RECORD
(
iface
,
BaseFilter
,
IBaseFilter_iface
);
}
HRESULT
WINAPI
BaseFilterImpl_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
HRESULT
WINAPI
BaseFilterImpl_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
iid
,
void
**
out
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
BaseFilter
*
filter
=
impl_from_IBaseFilter
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
*
ppv
=
NULL
;
*
out
=
NULL
;
if
(
filter
->
pFuncsTable
->
filter_query_interface
&&
SUCCEEDED
(
hr
=
filter
->
pFuncsTable
->
filter_query_interface
(
filter
,
iid
,
out
)))
{
return
hr
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IPersist
)
||
IsEqualIID
(
riid
,
&
IID_IMediaFilter
)
||
IsEqualIID
(
riid
,
&
IID_IBaseFilter
))
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IPersist
)
||
IsEqualIID
(
iid
,
&
IID_IMediaFilter
)
||
IsEqualIID
(
iid
,
&
IID_IBaseFilter
))
{
*
ppv
=
iface
;
*
out
=
iface
;
IBaseFilter_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
...
...
include/wine/strmbase.h
View file @
4b839bdd
...
...
@@ -172,6 +172,7 @@ typedef struct BaseFilterFuncTable
{
IPin
*
(
*
filter_get_pin
)(
BaseFilter
*
iface
,
unsigned
int
index
);
void
(
*
filter_destroy
)(
BaseFilter
*
iface
);
HRESULT
(
*
filter_query_interface
)(
BaseFilter
*
iface
,
REFIID
iid
,
void
**
out
);
}
BaseFilterFuncTable
;
HRESULT
WINAPI
BaseFilterImpl_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
);
...
...
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