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
b21d2b7c
Commit
b21d2b7c
authored
Oct 01, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Add IMFGetService stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c303b08b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
presenter.c
dlls/evr/presenter.c
+44
-0
evr.c
dlls/evr/tests/evr.c
+4
-0
No files found.
dlls/evr/presenter.c
View file @
b21d2b7c
...
...
@@ -46,6 +46,7 @@ struct video_presenter
IMFTopologyServiceLookupClient
IMFTopologyServiceLookupClient_iface
;
IMFVideoDisplayControl
IMFVideoDisplayControl_iface
;
IMFRateSupport
IMFRateSupport_iface
;
IMFGetService
IMFGetService_iface
;
IUnknown
IUnknown_inner
;
IUnknown
*
outer_unk
;
LONG
refcount
;
...
...
@@ -88,6 +89,11 @@ static struct video_presenter *impl_from_IMFRateSupport(IMFRateSupport *iface)
return
CONTAINING_RECORD
(
iface
,
struct
video_presenter
,
IMFRateSupport_iface
);
}
static
struct
video_presenter
*
impl_from_IMFGetService
(
IMFGetService
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_presenter
,
IMFGetService_iface
);
}
static
HRESULT
WINAPI
video_presenter_inner_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_presenter
*
presenter
=
impl_from_IUnknown
(
iface
);
...
...
@@ -119,6 +125,10 @@ static HRESULT WINAPI video_presenter_inner_QueryInterface(IUnknown *iface, REFI
{
*
obj
=
&
presenter
->
IMFRateSupport_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFGetService
))
{
*
obj
=
&
presenter
->
IMFGetService_iface
;
}
else
{
WARN
(
"Unimplemented interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -576,6 +586,39 @@ static const IMFRateSupportVtbl video_presenter_rate_support_vtbl =
video_presenter_rate_support_IsRateSupported
,
};
static
HRESULT
WINAPI
video_presenter_getservice_QueryInterface
(
IMFGetService
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFGetService
(
iface
);
return
IMFVideoPresenter_QueryInterface
(
&
presenter
->
IMFVideoPresenter_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_presenter_getservice_AddRef
(
IMFGetService
*
iface
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFGetService
(
iface
);
return
IMFVideoPresenter_AddRef
(
&
presenter
->
IMFVideoPresenter_iface
);
}
static
ULONG
WINAPI
video_presenter_getservice_Release
(
IMFGetService
*
iface
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFGetService
(
iface
);
return
IMFVideoPresenter_Release
(
&
presenter
->
IMFVideoPresenter_iface
);
}
static
HRESULT
WINAPI
video_presenter_getservice_GetService
(
IMFGetService
*
iface
,
REFGUID
service
,
REFIID
riid
,
void
**
obj
)
{
FIXME
(
"%p, %s, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
service
),
debugstr_guid
(
riid
),
obj
);
return
E_NOTIMPL
;
}
static
const
IMFGetServiceVtbl
video_presenter_getservice_vtbl
=
{
video_presenter_getservice_QueryInterface
,
video_presenter_getservice_AddRef
,
video_presenter_getservice_Release
,
video_presenter_getservice_GetService
,
};
HRESULT
WINAPI
MFCreateVideoPresenter
(
IUnknown
*
owner
,
REFIID
riid_device
,
REFIID
riid
,
void
**
obj
)
{
TRACE
(
"%p, %s, %s, %p.
\n
"
,
owner
,
debugstr_guid
(
riid_device
),
debugstr_guid
(
riid
),
obj
);
...
...
@@ -600,6 +643,7 @@ HRESULT evr_presenter_create(IUnknown *outer, void **out)
object
->
IMFTopologyServiceLookupClient_iface
.
lpVtbl
=
&
video_presenter_service_client_vtbl
;
object
->
IMFVideoDisplayControl_iface
.
lpVtbl
=
&
video_presenter_control_vtbl
;
object
->
IMFRateSupport_iface
.
lpVtbl
=
&
video_presenter_rate_support_vtbl
;
object
->
IMFGetService_iface
.
lpVtbl
=
&
video_presenter_getservice_vtbl
;
object
->
IUnknown_inner
.
lpVtbl
=
&
video_presenter_inner_vtbl
;
object
->
outer_unk
=
outer
?
outer
:
&
object
->
IUnknown_inner
;
object
->
refcount
=
1
;
...
...
dlls/evr/tests/evr.c
View file @
b21d2b7c
...
...
@@ -1002,6 +1002,10 @@ static void test_default_presenter(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFGetService
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
/* Rate support. */
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFRateSupport
,
(
void
**
)
&
rate_support
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
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