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
75b8dcd2
Commit
75b8dcd2
authored
Feb 01, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Implement the IDispatch methods for IMediaEvent.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a2cdd7a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
27 deletions
+66
-27
filtergraph.c
dlls/quartz/filtergraph.c
+31
-27
filtergraph.c
dlls/quartz/tests/filtergraph.c
+35
-0
No files found.
dlls/quartz/filtergraph.c
View file @
75b8dcd2
...
...
@@ -4733,50 +4733,54 @@ static ULONG WINAPI MediaEvent_Release(IMediaEventEx *iface)
return
IUnknown_Release
(
graph
->
outer_unk
);
}
/*** IDispatch methods ***/
static
HRESULT
WINAPI
MediaEvent_GetTypeInfoCount
(
IMediaEventEx
*
iface
,
UINT
*
pctinfo
)
static
HRESULT
WINAPI
MediaEvent_GetTypeInfoCount
(
IMediaEventEx
*
iface
,
UINT
*
count
)
{
struct
filter_graph
*
This
=
impl_from_IMediaEventEx
(
iface
);
TRACE
(
"(%p/%p)->(%p): stub !!!
\n
"
,
This
,
iface
,
pctinfo
);
TRACE
(
"iface %p, count %p.
\n
"
,
iface
,
count
);
*
count
=
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
MediaEvent_GetTypeInfo
(
IMediaEventEx
*
iface
,
UINT
i
TInfo
,
LCID
lcid
,
ITypeInfo
**
ppTI
nfo
)
static
HRESULT
WINAPI
MediaEvent_GetTypeInfo
(
IMediaEventEx
*
iface
,
UINT
i
ndex
,
LCID
lcid
,
ITypeInfo
**
typei
nfo
)
{
struct
filter_graph
*
This
=
impl_from_IMediaEventEx
(
iface
);
TRACE
(
"(%p/%p)->(%d, %d, %p): stub !!!
\n
"
,
This
,
iface
,
iTInfo
,
lcid
,
ppTInfo
);
return
S_OK
;
TRACE
(
"iface %p, index %u, lcid %#x, typeinfo %p.
\n
"
,
iface
,
index
,
lcid
,
typeinfo
);
return
strmbase_get_typeinfo
(
IMediaEvent_tid
,
typeinfo
);
}
static
HRESULT
WINAPI
MediaEvent_GetIDsOfNames
(
IMediaEventEx
*
iface
,
REFIID
r
iid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
static
HRESULT
WINAPI
MediaEvent_GetIDsOfNames
(
IMediaEventEx
*
iface
,
REFIID
iid
,
LPOLESTR
*
names
,
UINT
count
,
LCID
lcid
,
DISPID
*
ids
)
{
struct
filter_graph
*
This
=
impl_from_IMediaEventEx
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"
(%p/%p)->(%s, %p, %d, %d, %p): stub !!!
\n
"
,
This
,
iface
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
TRACE
(
"
iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
names
,
count
,
lcid
,
ids
);
return
S_OK
;
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IMediaEvent_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
names
,
count
,
ids
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
MediaEvent_Invoke
(
IMediaEventEx
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExepInfo
,
UINT
*
puArgErr
)
static
HRESULT
WINAPI
MediaEvent_Invoke
(
IMediaEventEx
*
iface
,
DISPID
id
,
REFIID
iid
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
result
,
EXCEPINFO
*
excepinfo
,
UINT
*
error_arg
)
{
struct
filter_graph
*
This
=
impl_from_IMediaEventEx
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"
(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p): stub !!!
\n
"
,
This
,
iface
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExepInfo
,
puArgErr
);
TRACE
(
"
iface %p, id %d, iid %s, lcid %#x, flags %#x, params %p, result %p, excepinfo %p, error_arg %p.
\n
"
,
iface
,
id
,
debugstr_guid
(
iid
),
lcid
,
flags
,
params
,
result
,
excepinfo
,
error_arg
);
return
S_OK
;
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IMediaEvent_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
iface
,
id
,
flags
,
params
,
result
,
excepinfo
,
error_arg
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
/*** IMediaEvent methods ***/
static
HRESULT
WINAPI
MediaEvent_GetEventHandle
(
IMediaEventEx
*
iface
,
OAEVENT
*
event
)
{
struct
filter_graph
*
graph
=
impl_from_IMediaEventEx
(
iface
);
...
...
dlls/quartz/tests/filtergraph.c
View file @
75b8dcd2
...
...
@@ -5663,6 +5663,40 @@ static void test_events(void)
SysFreeString
(
status
);
}
static
void
test_event_dispatch
(
void
)
{
IFilterGraph2
*
graph
=
create_graph
();
IMediaEventEx
*
event_ex
;
ITypeInfo
*
typeinfo
;
IMediaEvent
*
event
;
TYPEATTR
*
typeattr
;
unsigned
int
count
;
HRESULT
hr
;
ULONG
ref
;
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaEvent
,
(
void
**
)
&
event
);
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IMediaEventEx
,
(
void
**
)
&
event_ex
);
ok
((
void
*
)
event
==
event_ex
,
"Interface pointers didn't match.
\n
"
);
IMediaEventEx_Release
(
event_ex
);
hr
=
IMediaEvent_GetTypeInfoCount
(
event
,
&
count
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count %u.
\n
"
,
count
);
hr
=
IMediaEvent_GetTypeInfo
(
event
,
0
,
0
,
&
typeinfo
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
ITypeInfo_GetTypeAttr
(
typeinfo
,
&
typeattr
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
typeattr
->
typekind
==
TKIND_DISPATCH
,
"Got kind %u.
\n
"
,
typeattr
->
typekind
);
ok
(
IsEqualGUID
(
&
typeattr
->
guid
,
&
IID_IMediaEvent
),
"Got IID %s.
\n
"
,
debugstr_guid
(
&
typeattr
->
guid
));
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
typeattr
);
ITypeInfo_Release
(
typeinfo
);
IMediaEvent_Release
(
event
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
START_TEST
(
filtergraph
)
{
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
...
...
@@ -5690,6 +5724,7 @@ START_TEST(filtergraph)
test_autoplug_uyvy
();
test_set_notify_flags
();
test_events
();
test_event_dispatch
();
CoUninitialize
();
test_render_with_multithread
();
...
...
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