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
529eb284
Commit
529eb284
authored
Oct 22, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Add IMFVideoPositionMapper stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c4723c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
1 deletion
+57
-1
presenter.c
dlls/evr/presenter.c
+49
-1
evr.c
dlls/evr/tests/evr.c
+8
-0
No files found.
dlls/evr/presenter.c
View file @
529eb284
...
...
@@ -48,6 +48,7 @@ struct video_presenter
IMFVideoDisplayControl
IMFVideoDisplayControl_iface
;
IMFRateSupport
IMFRateSupport_iface
;
IMFGetService
IMFGetService_iface
;
IMFVideoPositionMapper
IMFVideoPositionMapper_iface
;
IUnknown
IUnknown_inner
;
IUnknown
*
outer_unk
;
LONG
refcount
;
...
...
@@ -104,6 +105,11 @@ static struct video_presenter *impl_from_IMFGetService(IMFGetService *iface)
return
CONTAINING_RECORD
(
iface
,
struct
video_presenter
,
IMFGetService_iface
);
}
static
struct
video_presenter
*
impl_from_IMFVideoPositionMapper
(
IMFVideoPositionMapper
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_presenter
,
IMFVideoPositionMapper_iface
);
}
static
unsigned
int
get_gcd
(
unsigned
int
a
,
unsigned
int
b
)
{
unsigned
int
m
;
...
...
@@ -191,6 +197,10 @@ static HRESULT WINAPI video_presenter_inner_QueryInterface(IUnknown *iface, REFI
{
*
obj
=
&
presenter
->
IMFGetService_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoPositionMapper
))
{
*
obj
=
&
presenter
->
IMFVideoPositionMapper_iface
;
}
else
{
WARN
(
"Unimplemented interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -900,8 +910,11 @@ static HRESULT WINAPI video_presenter_getservice_GetService(IMFGetService *iface
if
(
IsEqualGUID
(
&
MR_VIDEO_RENDER_SERVICE
,
service
))
{
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoDisplayControl
))
if
(
IsEqualIID
(
riid
,
&
IID_IMFVideoDisplayControl
)
||
IsEqualIID
(
riid
,
&
IID_IMFVideoPositionMapper
))
{
return
IMFVideoPresenter_QueryInterface
(
&
presenter
->
IMFVideoPresenter_iface
,
riid
,
obj
);
}
else
{
FIXME
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -922,6 +935,40 @@ static const IMFGetServiceVtbl video_presenter_getservice_vtbl =
video_presenter_getservice_GetService
,
};
static
HRESULT
WINAPI
video_presenter_position_mapper_QueryInterface
(
IMFVideoPositionMapper
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPositionMapper
(
iface
);
return
IMFVideoPresenter_QueryInterface
(
&
presenter
->
IMFVideoPresenter_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_presenter_position_mapper_AddRef
(
IMFVideoPositionMapper
*
iface
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPositionMapper
(
iface
);
return
IMFVideoPresenter_AddRef
(
&
presenter
->
IMFVideoPresenter_iface
);
}
static
ULONG
WINAPI
video_presenter_position_mapper_Release
(
IMFVideoPositionMapper
*
iface
)
{
struct
video_presenter
*
presenter
=
impl_from_IMFVideoPositionMapper
(
iface
);
return
IMFVideoPresenter_Release
(
&
presenter
->
IMFVideoPresenter_iface
);
}
static
HRESULT
WINAPI
video_presenter_position_mapper_MapOutputCoordinateToInputStream
(
IMFVideoPositionMapper
*
iface
,
float
x_out
,
float
y_out
,
DWORD
output_stream
,
DWORD
input_stream
,
float
*
x_in
,
float
*
y_in
)
{
FIXME
(
"%p, %f, %f, %u, %u, %p, %p.
\n
"
,
iface
,
x_out
,
y_out
,
output_stream
,
input_stream
,
x_in
,
y_in
);
return
E_NOTIMPL
;
}
static
const
IMFVideoPositionMapperVtbl
video_presenter_position_mapper_vtbl
=
{
video_presenter_position_mapper_QueryInterface
,
video_presenter_position_mapper_AddRef
,
video_presenter_position_mapper_Release
,
video_presenter_position_mapper_MapOutputCoordinateToInputStream
,
};
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
);
...
...
@@ -984,6 +1031,7 @@ HRESULT evr_presenter_create(IUnknown *outer, void **out)
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
->
IMFVideoPositionMapper_iface
.
lpVtbl
=
&
video_presenter_position_mapper_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 @
529eb284
...
...
@@ -1099,6 +1099,14 @@ static void test_default_presenter(void)
if
(
FAILED
(
hr
))
return
;
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoPositionMapper
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
MFGetService
((
IUnknown
*
)
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFVideoPositionMapper
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoDeviceID
,
(
void
**
)
&
deviceid
);
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