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
6edee725
Commit
6edee725
authored
Jun 11, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Use the type info cache for IBasicVideo.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
245649f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
73 deletions
+49
-73
filtergraph.c
dlls/quartz/filtergraph.c
+28
-67
filtergraph.c
dlls/quartz/tests/filtergraph.c
+21
-6
No files found.
dlls/quartz/filtergraph.c
View file @
6edee725
...
...
@@ -3234,90 +3234,51 @@ static ULONG WINAPI BasicVideo_Release(IBasicVideo2 *iface)
return
IUnknown_Release
(
This
->
outer_unk
);
}
/*** IDispatch methods ***/
static
HRESULT
WINAPI
BasicVideo_GetTypeInfoCount
(
IBasicVideo2
*
iface
,
UINT
*
pctinfo
)
static
HRESULT
WINAPI
BasicVideo_GetTypeInfoCount
(
IBasicVideo2
*
iface
,
UINT
*
count
)
{
IFilterGraphImpl
*
This
=
impl_from_IBasicVideo2
(
iface
);
IBasicVideo
*
pBasicVideo
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
pctinfo
);
EnterCriticalSection
(
&
This
->
cs
);
hr
=
GetTargetInterface
(
This
,
&
IID_IBasicVideo
,
(
LPVOID
*
)
&
pBasicVideo
);
if
(
hr
==
S_OK
)
hr
=
IBasicVideo_GetTypeInfoCount
(
pBasicVideo
,
pctinfo
);
LeaveCriticalSection
(
&
This
->
cs
);
return
hr
;
TRACE
(
"iface %p, count %p.
\n
"
,
iface
,
count
);
*
count
=
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
BasicVideo_GetTypeInfo
(
IBasicVideo2
*
iface
,
UINT
i
TInfo
,
LCID
lcid
,
ITypeInfo
**
ppTI
nfo
)
static
HRESULT
WINAPI
BasicVideo_GetTypeInfo
(
IBasicVideo2
*
iface
,
UINT
i
ndex
,
LCID
lcid
,
ITypeInfo
**
typei
nfo
)
{
IFilterGraphImpl
*
This
=
impl_from_IBasicVideo2
(
iface
);
IBasicVideo
*
pBasicVideo
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%d, %d, %p)
\n
"
,
This
,
iface
,
iTInfo
,
lcid
,
ppTInfo
);
EnterCriticalSection
(
&
This
->
cs
);
hr
=
GetTargetInterface
(
This
,
&
IID_IBasicVideo
,
(
LPVOID
*
)
&
pBasicVideo
);
if
(
hr
==
S_OK
)
hr
=
IBasicVideo_GetTypeInfo
(
pBasicVideo
,
iTInfo
,
lcid
,
ppTInfo
);
LeaveCriticalSection
(
&
This
->
cs
);
return
hr
;
TRACE
(
"iface %p, index %u, lcid %#x, typeinfo %p.
\n
"
,
iface
,
index
,
lcid
,
typeinfo
);
return
strmbase_get_typeinfo
(
IBasicVideo_tid
,
typeinfo
);
}
static
HRESULT
WINAPI
BasicVideo_GetIDsOfNames
(
IBasicVideo2
*
iface
,
REFIID
r
iid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
static
HRESULT
WINAPI
BasicVideo_GetIDsOfNames
(
IBasicVideo2
*
iface
,
REFIID
iid
,
LPOLESTR
*
names
,
UINT
count
,
LCID
lcid
,
DISPID
*
ids
)
{
IFilterGraphImpl
*
This
=
impl_from_IBasicVideo2
(
iface
);
IBasicVideo
*
pBasicVideo
;
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%s, %p, %d, %d, %p)
\n
"
,
This
,
iface
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
EnterCriticalSection
(
&
This
->
cs
);
hr
=
GetTargetInterface
(
This
,
&
IID_IBasicVideo
,
(
LPVOID
*
)
&
pBasicVideo
);
if
(
hr
==
S_OK
)
hr
=
IBasicVideo_GetIDsOfNames
(
pBasicVideo
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
LeaveCriticalSection
(
&
This
->
cs
);
TRACE
(
"iface %p, iid %s, names %p, count %u, lcid %#x, ids %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
names
,
count
,
lcid
,
ids
);
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IBasicVideo_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
names
,
count
,
ids
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
BasicVideo_Invoke
(
IBasicVideo2
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExepInfo
,
UINT
*
puArgErr
)
static
HRESULT
WINAPI
BasicVideo_Invoke
(
IBasicVideo2
*
iface
,
DISPID
id
,
REFIID
iid
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
result
,
EXCEPINFO
*
excepinfo
,
UINT
*
error_arg
)
{
IFilterGraphImpl
*
This
=
impl_from_IBasicVideo2
(
iface
);
IBasicVideo
*
pBasicVideo
;
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)
\n
"
,
This
,
iface
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExepInfo
,
puArgErr
);
EnterCriticalSection
(
&
This
->
cs
);
hr
=
GetTargetInterface
(
This
,
&
IID_IBasicVideo
,
(
LPVOID
*
)
&
pBasicVideo
);
if
(
hr
==
S_OK
)
hr
=
IBasicVideo_Invoke
(
pBasicVideo
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExepInfo
,
puArgErr
);
LeaveCriticalSection
(
&
This
->
cs
);
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
);
if
(
SUCCEEDED
(
hr
=
strmbase_get_typeinfo
(
IBasicVideo_tid
,
&
typeinfo
)))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
iface
,
id
,
flags
,
params
,
result
,
excepinfo
,
error_arg
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
...
...
dlls/quartz/tests/filtergraph.c
View file @
6edee725
...
...
@@ -2494,7 +2494,9 @@ static void test_control_delegation(void)
IBasicAudio
*
audio
,
*
filter_audio
;
IBaseFilter
*
renderer
;
IVideoWindow
*
window
;
IBasicVideo
*
video
;
IBasicVideo2
*
video
;
ITypeInfo
*
typeinfo
;
TYPEATTR
*
typeattr
;
ULONG
count
;
HRESULT
hr
;
LONG
val
;
...
...
@@ -2564,15 +2566,28 @@ static void test_control_delegation(void)
/* IBasicVideo and IVideoWindow */
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IBasicVideo
,
(
void
**
)
&
video
);
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IBasicVideo
2
,
(
void
**
)
&
video
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IFilterGraph2_QueryInterface
(
graph
,
&
IID_IVideoWindow
,
(
void
**
)
&
window
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
/* Unlike IBasicAudio, these return E_NOINTERFACE. */
hr
=
IBasicVideo_get_BitRate
(
video
,
&
val
);
hr
=
IBasicVideo
2
_get_BitRate
(
video
,
&
val
);
ok
(
hr
==
E_NOINTERFACE
,
"got %#x
\n
"
,
hr
);
hr
=
IBasicVideo2_GetTypeInfoCount
(
video
,
&
count
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count %u.
\n
"
,
count
);
hr
=
IBasicVideo2_GetTypeInfo
(
video
,
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_IBasicVideo
),
"Got IID %s.
\n
"
,
wine_dbgstr_guid
(
&
typeattr
->
guid
));
ITypeInfo_ReleaseTypeAttr
(
typeinfo
,
typeattr
);
ITypeInfo_Release
(
typeinfo
);
hr
=
IVideoWindow_SetWindowForeground
(
window
,
OAFALSE
);
ok
(
hr
==
E_NOINTERFACE
,
"got %#x
\n
"
,
hr
);
...
...
@@ -2586,7 +2601,7 @@ static void test_control_delegation(void)
hr
=
IFilterGraph2_AddFilter
(
graph
,
renderer
,
NULL
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IBasicVideo_get_BitRate
(
video
,
&
val
);
hr
=
IBasicVideo
2
_get_BitRate
(
video
,
&
val
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"got %#x
\n
"
,
hr
);
hr
=
IVideoWindow_SetWindowForeground
(
window
,
OAFALSE
);
ok
(
hr
==
VFW_E_NOT_CONNECTED
,
"got %#x
\n
"
,
hr
);
...
...
@@ -2594,13 +2609,13 @@ static void test_control_delegation(void)
hr
=
IFilterGraph2_RemoveFilter
(
graph
,
renderer
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
hr
=
IBasicVideo_get_BitRate
(
video
,
&
val
);
hr
=
IBasicVideo
2
_get_BitRate
(
video
,
&
val
);
ok
(
hr
==
E_NOINTERFACE
,
"got %#x
\n
"
,
hr
);
hr
=
IVideoWindow_SetWindowForeground
(
window
,
OAFALSE
);
ok
(
hr
==
E_NOINTERFACE
,
"got %#x
\n
"
,
hr
);
IBaseFilter_Release
(
renderer
);
IBasicVideo_Release
(
video
);
IBasicVideo
2
_Release
(
video
);
IVideoWindow_Release
(
window
);
IFilterGraph2_Release
(
graph
);
}
...
...
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