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
24c9d77c
Commit
24c9d77c
authored
Oct 09, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Add support for MFT_SET_TYPE_TEST_ONLY for inputs.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
430c179f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
mixer.c
dlls/evr/mixer.c
+7
-5
evr.c
dlls/evr/tests/evr.c
+12
-0
No files found.
dlls/evr/mixer.c
View file @
24c9d77c
...
...
@@ -611,12 +611,12 @@ static int rt_formats_sort_compare(const void *left, const void *right)
}
static
HRESULT
video_mixer_collect_output_types
(
struct
video_mixer
*
mixer
,
const
DXVA2_VideoDesc
*
video_desc
,
IDirectXVideoProcessorService
*
service
,
unsigned
int
device_count
,
const
GUID
*
devices
)
IDirectXVideoProcessorService
*
service
,
unsigned
int
device_count
,
const
GUID
*
devices
,
unsigned
int
flags
)
{
unsigned
int
i
,
j
,
format_count
,
count
;
D3DFORMAT
*
rt_formats
=
NULL
,
*
formats
,
*
ptr
;
HRESULT
hr
=
MF_E_INVALIDMEDIATYPE
;
GUID
subtype
;
HRESULT
hr
;
count
=
0
;
for
(
i
=
0
;
i
<
device_count
;
++
i
)
...
...
@@ -640,7 +640,7 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
}
}
if
(
count
)
if
(
count
&&
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
)
{
qsort
(
rt_formats
,
count
,
sizeof
(
*
rt_formats
),
rt_formats_sort_compare
);
...
...
@@ -690,7 +690,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
EnterCriticalSection
(
&
mixer
->
cs
);
video_mixer_clear_types
(
mixer
);
if
(
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
))
video_mixer_clear_types
(
mixer
);
if
(
!
mixer
->
device_manager
)
hr
=
MF_E_NOT_INITIALIZED
;
...
...
@@ -708,7 +709,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
if
(
SUCCEEDED
(
hr
=
IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
(
service
,
&
video_desc
,
&
count
,
&
guids
)))
{
if
(
SUCCEEDED
(
hr
=
video_mixer_collect_output_types
(
mixer
,
&
video_desc
,
service
,
count
,
guids
)))
if
(
SUCCEEDED
(
hr
=
video_mixer_collect_output_types
(
mixer
,
&
video_desc
,
service
,
count
,
guids
,
flags
))
&&
!
(
flags
&
MFT_SET_TYPE_TEST_ONLY
))
{
GUID
subtype
=
{
0
};
...
...
dlls/evr/tests/evr.c
View file @
24c9d77c
...
...
@@ -862,6 +862,9 @@ static void test_default_mixer_type_negotiation(void)
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
ok
(
hr
==
MF_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
MF_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Now try with device manager. */
window
=
create_window
();
...
...
@@ -883,6 +886,9 @@ static void test_default_mixer_type_negotiation(void)
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
ok
(
hr
==
DXVA2_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
DXVA2_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDeviceManager9_ResetDevice
(
manager
,
device
,
token
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -904,6 +910,12 @@ static void test_default_mixer_type_negotiation(void)
hr
=
IMFVideoMediaType_SetUINT32
(
video_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
TRUE
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
(
IMFMediaType
*
)
video_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputCurrentType
(
transform
,
0
,
&
media_type
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
(
IMFMediaType
*
)
video_type
,
0
);
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