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
22d77e43
Commit
22d77e43
authored
Nov 23, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/tests: Add some tests for presenter quality control.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d19467a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
evr.c
dlls/evr/tests/evr.c
+63
-0
No files found.
dlls/evr/tests/evr.c
View file @
22d77e43
...
...
@@ -1165,6 +1165,7 @@ static void test_default_presenter(void)
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFGetService
,
TRUE
);
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFVideoDeviceID
,
TRUE
);
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFQualityAdvise
,
TRUE
);
todo_wine
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFQualityAdviseLimits
,
TRUE
);
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IMFTransform
,
FALSE
);
check_service_interface
(
presenter
,
&
MR_VIDEO_RENDER_SERVICE
,
&
IID_IDirect3DDeviceManager9
,
TRUE
);
check_service_interface
(
presenter
,
&
MR_VIDEO_ACCELERATION_SERVICE
,
&
IID_IDirect3DDeviceManager9
,
TRUE
);
...
...
@@ -2010,6 +2011,67 @@ static void test_presenter_video_window(void)
DestroyWindow
(
window
);
}
static
void
test_presenter_quality_control
(
void
)
{
IMFQualityAdviseLimits
*
qa_limits
;
IMFVideoPresenter
*
presenter
;
MF_QUALITY_DROP_MODE
mode
;
IMFQualityAdvise
*
advise
;
MF_QUALITY_LEVEL
level
;
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_IMFQualityAdviseLimits
,
(
void
**
)
&
qa_limits
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoPresenter_QueryInterface
(
presenter
,
&
IID_IMFQualityAdvise
,
(
void
**
)
&
advise
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
if
(
qa_limits
)
{
hr
=
IMFQualityAdviseLimits_GetMaximumDropMode
(
qa_limits
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFQualityAdviseLimits_GetMaximumDropMode
(
qa_limits
,
&
mode
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
mode
==
MF_DROP_MODE_NONE
,
"Unexpected mode %d.
\n
"
,
mode
);
hr
=
IMFQualityAdviseLimits_GetMinimumQualityLevel
(
qa_limits
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFQualityAdviseLimits_GetMinimumQualityLevel
(
qa_limits
,
&
level
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
level
==
MF_QUALITY_NORMAL
,
"Unexpected level %d.
\n
"
,
level
);
IMFQualityAdviseLimits_Release
(
qa_limits
);
}
todo_wine
{
mode
=
1
;
hr
=
IMFQualityAdvise_GetDropMode
(
advise
,
&
mode
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
mode
==
MF_DROP_MODE_NONE
,
"Unexpected mode %d.
\n
"
,
mode
);
level
=
1
;
hr
=
IMFQualityAdvise_GetQualityLevel
(
advise
,
&
level
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
level
==
MF_QUALITY_NORMAL
,
"Unexpected mode %d.
\n
"
,
level
);
hr
=
IMFQualityAdvise_SetDropMode
(
advise
,
MF_DROP_MODE_1
);
ok
(
hr
==
MF_E_NO_MORE_DROP_MODES
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFQualityAdvise_SetQualityLevel
(
advise
,
MF_QUALITY_NORMAL_MINUS_1
);
ok
(
hr
==
MF_E_NO_MORE_QUALITY_LEVELS
,
"Unexpected hr %#x.
\n
"
,
hr
);
}
IMFQualityAdvise_Release
(
advise
);
IMFVideoPresenter_Release
(
presenter
);
}
static
void
test_mixer_output_rectangle
(
void
)
{
IMFVideoMixerControl
*
mixer_control
;
...
...
@@ -2511,6 +2573,7 @@ START_TEST(evr)
test_presenter_native_video_size
();
test_presenter_ar_mode
();
test_presenter_video_window
();
test_presenter_quality_control
();
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