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
3de246a3
Commit
3de246a3
authored
Oct 27, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Handle type invalidation calls without attached mixer.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
393ea6c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
7 deletions
+72
-7
presenter.c
dlls/evr/presenter.c
+4
-1
evr.c
dlls/evr/tests/evr.c
+68
-6
No files found.
dlls/evr/presenter.c
View file @
3de246a3
...
...
@@ -348,6 +348,9 @@ static HRESULT video_presenter_invalidate_media_type(struct video_presenter *pre
RECT
rect
;
HRESULT
hr
;
if
(
!
presenter
->
mixer
)
return
MF_E_TRANSFORM_TYPE_NOT_SET
;
if
(
FAILED
(
hr
=
MFCreateMediaType
(
&
media_type
)))
return
hr
;
...
...
@@ -965,7 +968,7 @@ static HRESULT WINAPI video_presenter_ProcessMessage(IMFVideoPresenter *iface, M
switch
(
message
)
{
case
MFVP_MESSAGE_INVALIDATEMEDIATYPE
:
hr
=
video_presenter_invalidate_media_type
(
presenter
)
;
hr
=
presenter
->
mixer
?
video_presenter_invalidate_media_type
(
presenter
)
:
MF_E_INVALIDREQUEST
;
break
;
case
MFVP_MESSAGE_BEGINSTREAMING
:
hr
=
video_presenter_start_streaming
(
presenter
);
...
...
dlls/evr/tests/evr.c
View file @
3de246a3
...
...
@@ -1754,12 +1754,41 @@ static void test_presenter_video_position(void)
DWORD
count
;
HWND
hwnd
;
hwnd
=
create_window
();
ok
(
!!
hwnd
,
"Failed to create a test window.
\n
"
);
/* Setting position without the mixer. */
hr
=
MFCreateVideoPresenter
(
NULL
,
&
IID_IDirect3DDevice9
,
&
IID_IMFVideoPresenter
,
(
void
**
)
&
presenter
);
ok
(
hr
==
S_OK
,
"Failed to create default presenter, hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoDisplayControl
,
(
void
**
)
&
display_control
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_INVALIDATEMEDIATYPE
,
0
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
SetRect
(
&
dst_rect
,
0
,
0
,
10
,
10
);
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
NULL
,
&
dst_rect
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoDisplayControl_SetVideoWindow
(
display_control
,
hwnd
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_INVALIDATEMEDIATYPE
,
0
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
NULL
,
&
dst_rect
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFVideoDisplayControl_Release
(
display_control
);
IMFVideoPresenter_Release
(
presenter
);
/* With the mixer. */
hr
=
MFCreateVideoMixer
(
NULL
,
&
IID_IDirect3DDevice9
,
&
IID_IMFTransform
,
(
void
**
)
&
mixer
);
ok
(
hr
==
S_OK
,
"Failed to create a mixer, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateVideoPresenter
(
NULL
,
&
IID_IDirect3DDevice9
,
&
IID_IMFVideoPresenter
,
(
void
**
)
&
presenter
);
ok
(
hr
==
S_OK
,
"Failed to create default presenter, hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoDisplayControl
,
(
void
**
)
&
display_control
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1785,9 +1814,6 @@ static void test_presenter_video_position(void)
ok
(
src_rect
.
left
==
0
.
0
f
&&
src_rect
.
top
==
0
.
0
f
&&
src_rect
.
right
==
1
.
0
f
&&
src_rect
.
bottom
==
1
.
0
f
,
"Unexpected source rectangle.
\n
"
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFVideoDisplayControl
,
(
void
**
)
&
display_control
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoDisplayControl_GetVideoPosition
(
display_control
,
NULL
,
&
dst_rect
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -1806,9 +1832,6 @@ static void test_presenter_video_position(void)
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Setting position requires a window. */
hwnd
=
create_window
();
ok
(
!!
hwnd
,
"Failed to create a test window.
\n
"
);
SetRect
(
&
dst_rect
,
0
,
0
,
10
,
10
);
memset
(
&
src_rect
,
0
,
sizeof
(
src_rect
));
hr
=
IMFVideoDisplayControl_SetVideoPosition
(
display_control
,
&
src_rect
,
&
dst_rect
);
...
...
@@ -2297,6 +2320,44 @@ done:
DestroyWindow
(
window
);
}
static
void
test_presenter_shutdown
(
void
)
{
IMFTopologyServiceLookupClient
*
lookup_client
;
IMFVideoPresenter
*
presenter
;
HRESULT
hr
;
hr
=
MFCreateVideoPresenter
(
NULL
,
&
IID_IDirect3DDevice9
,
&
IID_IMFVideoPresenter
,
(
void
**
)
&
presenter
);
ok
(
hr
==
S_OK
,
"Failed to create default presenter, hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFTopologyServiceLookupClient
,
(
void
**
)
&
lookup_client
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTopologyServiceLookupClient_ReleaseServicePointers
(
lookup_client
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_INVALIDATEMEDIATYPE
,
0
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_BEGINSTREAMING
,
0
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_ENDSTREAMING
,
0
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_ProcessMessage
(
presenter
,
MFVP_MESSAGE_PROCESSINPUTNOTIFY
,
0
);
todo_wine
ok
(
hr
==
MF_E_SHUTDOWN
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTopologyServiceLookupClient_ReleaseServicePointers
(
lookup_client
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFTopologyServiceLookupClient_Release
(
lookup_client
);
IMFVideoPresenter_Release
(
presenter
);
}
static
void
test_mixer_output_rectangle
(
void
)
{
IMFVideoMixerControl
*
mixer_control
;
...
...
@@ -2848,6 +2909,7 @@ START_TEST(evr)
test_presenter_video_window
();
test_presenter_quality_control
();
test_presenter_media_type
();
test_presenter_shutdown
();
test_mixer_output_rectangle
();
test_mixer_zorder
();
test_mixer_samples
();
...
...
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