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
444c6a16
Commit
444c6a16
authored
Jun 04, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr: Use strmbase filter aggregation support.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
664789ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
154 deletions
+22
-154
evr.c
dlls/evr/evr.c
+21
-152
evr.c
dlls/evr/tests/evr.c
+1
-2
No files found.
dlls/evr/evr.c
View file @
444c6a16
...
...
@@ -35,148 +35,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(evr);
typedef
struct
{
BaseFilter
filter
;
IUnknown
IUnknown_inner
;
}
evr_filter
;
static
inline
evr_filter
*
impl_from_inner_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
evr_filter
,
IUnknown_inner
);
}
static
HRESULT
WINAPI
inner_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
evr_filter
*
This
=
impl_from_inner_IUnknown
(
iface
);
TRACE
(
"(%p/%p)->(%s, %p)
\n
"
,
This
,
iface
,
debugstr_guid
(
riid
),
ppv
);
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
&
This
->
IUnknown_inner
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IAMCertifiedOutputProtection
))
FIXME
(
"No interface for IID_IAMCertifiedOutputProtection
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IAMFilterMiscFlags
))
FIXME
(
"No interface for IID_IAMFilterMiscFlags
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IBaseFilter
))
*
ppv
=&
This
->
filter
.
IBaseFilter_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaFilter
))
*
ppv
=&
This
->
filter
.
IBaseFilter_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersist
))
*
ppv
=&
This
->
filter
.
IBaseFilter_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsPropertySet
))
FIXME
(
"No interface for IID_IKsPropertySet
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaEventSink
))
FIXME
(
"No interface for IID_IMediaEventSink
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMediaSeeking
))
FIXME
(
"No interface for IID_IMediaSeeking
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IQualityControl
))
FIXME
(
"No interface for IID_IQualityControl
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IQualProp
))
FIXME
(
"No interface for IID_IQualProp
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IEVRFilterConfig
))
FIXME
(
"No interface for IID_IEVRFilterConfig
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
FIXME
(
"No interface for IID_IMFGetService
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoPositionMapper
))
FIXME
(
"No interface for IID_IMFVideoPositionMapper
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoRenderer
))
FIXME
(
"No interface for IID_IMFVideoRenderer
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IMemInputPin
))
FIXME
(
"No interface for IID_IMemInputPin
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IPin
))
FIXME
(
"No interface for IID_IPin
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IQualityControl
))
FIXME
(
"No interface for IID_IQualityControl
\n
"
);
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectXVideoMemoryConfiguration
))
FIXME
(
"No interface for IID_IDirectXVideoMemoryConfiguration
\n
"
);
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)(
*
ppv
));
return
S_OK
;
}
FIXME
(
"(%p)->(%s,%p),not found
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
inner_AddRef
(
IUnknown
*
iface
)
{
evr_filter
*
This
=
impl_from_inner_IUnknown
(
iface
);
ULONG
ref
=
BaseFilterImpl_AddRef
(
&
This
->
filter
.
IBaseFilter_iface
);
TRACE
(
"(%p, %p)->(): new ref %d
\n
"
,
iface
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
inner_Release
(
IUnknown
*
iface
)
{
evr_filter
*
This
=
impl_from_inner_IUnknown
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
filter
.
refcount
);
TRACE
(
"(%p, %p)->(): new ref %d
\n
"
,
iface
,
This
,
ref
);
if
(
!
ref
)
{
strmbase_filter_cleanup
(
&
This
->
filter
);
CoTaskMemFree
(
This
);
}
return
ref
;
}
static
const
IUnknownVtbl
evr_inner_vtbl
=
{
inner_QueryInterface
,
inner_AddRef
,
inner_Release
};
static
inline
evr_filter
*
impl_from_IBaseFilter
(
IBaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
evr_filter
,
filter
);
}
static
HRESULT
WINAPI
filter_QueryInterface
(
IBaseFilter
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
evr_filter
*
This
=
impl_from_IBaseFilter
(
iface
);
return
IUnknown_QueryInterface
(
&
This
->
IUnknown_inner
,
riid
,
ppv
);
}
static
ULONG
WINAPI
filter_AddRef
(
IBaseFilter
*
iface
)
{
evr_filter
*
This
=
impl_from_IBaseFilter
(
iface
);
LONG
ret
;
ret
=
IUnknown_AddRef
(
&
This
->
IUnknown_inner
);
TRACE
(
"(%p)->AddRef from %d
\n
"
,
iface
,
ret
-
1
);
return
ret
;
}
static
ULONG
WINAPI
filter_Release
(
IBaseFilter
*
iface
)
{
evr_filter
*
This
=
impl_from_IBaseFilter
(
iface
);
LONG
ret
;
ret
=
IUnknown_Release
(
&
This
->
IUnknown_inner
);
TRACE
(
"(%p)->Release from %d
\n
"
,
iface
,
ret
+
1
);
return
ret
;
}
static
const
IBaseFilterVtbl
basefilter_vtbl
=
{
filter
_QueryInterface
,
filter
_AddRef
,
filter
_Release
,
BaseFilterImpl
_QueryInterface
,
BaseFilterImpl
_AddRef
,
BaseFilterImpl
_Release
,
BaseFilterImpl_GetClassID
,
BaseRendererImpl_Stop
,
BaseRendererImpl_Pause
,
...
...
@@ -191,41 +56,45 @@ static const IBaseFilterVtbl basefilter_vtbl =
BaseFilterImpl_QueryVendorInfo
};
static
inline
evr_filter
*
impl_from_BaseFilter
(
BaseFilter
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
evr_filter
,
filter
);
}
static
IPin
*
evr_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
FIXME
(
"iface %p, index %u, stub!
\n
"
,
iface
,
index
);
return
NULL
;
}
static
void
evr_destroy
(
BaseFilter
*
iface
)
{
evr_filter
*
filter
=
impl_from_BaseFilter
(
iface
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemFree
(
filter
);
}
static
const
BaseFilterFuncTable
basefilter_functable
=
{
.
filter_get_pin
=
evr_get_pin
,
.
filter_destroy
=
evr_destroy
,
};
HRESULT
evr_filter_create
(
IUnknown
*
outer
_unk
,
void
**
ppv
)
HRESULT
evr_filter_create
(
IUnknown
*
outer
,
void
**
out
)
{
evr_filter
*
object
;
TRACE
(
"(%p, %p)
\n
"
,
outer_unk
,
ppv
);
*
ppv
=
NULL
;
if
(
outer_unk
!=
NULL
)
{
FIXME
(
"Aggregation yet unsupported!
\n
"
);
return
E_NOINTERFACE
;
}
*
out
=
NULL
;
object
=
CoTaskMemAlloc
(
sizeof
(
evr_filter
));
if
(
!
object
)
return
E_OUTOFMEMORY
;
strmbase_filter_init
(
&
object
->
filter
,
&
basefilter_vtbl
,
NULL
,
&
CLSID_EnhancedVideoRenderer
,
strmbase_filter_init
(
&
object
->
filter
,
&
basefilter_vtbl
,
outer
,
&
CLSID_EnhancedVideoRenderer
,
(
DWORD_PTR
)(
__FILE__
": EVR.csFilter"
),
&
basefilter_functable
);
object
->
IUnknown_inner
.
lpVtbl
=
&
evr_inner_vtbl
;
*
ppv
=
&
object
->
IUnknown_inner
;
*
out
=
&
object
->
filter
.
IUnknown_inner
;
return
S_OK
;
}
dlls/evr/tests/evr.c
View file @
444c6a16
...
...
@@ -91,8 +91,7 @@ static void test_aggregation(void)
hr
=
CoCreateInstance
(
&
CLSID_EnhancedVideoRenderer
,
&
test_outer
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
outer_ref
==
1
,
"Got unexpected refcount %d.
\n
"
,
outer_ref
);
ok
(
unk
!=
&
test_outer
,
"Returned IUnknown should not be outer IUnknown.
\n
"
);
ref
=
get_refcount
(
unk
);
...
...
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