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
626438a6
Commit
626438a6
authored
May 28, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Test format only when setting output type.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6d5f976
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
3 deletions
+49
-3
mixer.c
dlls/evr/mixer.c
+8
-2
evr.c
dlls/evr/tests/evr.c
+41
-1
No files found.
dlls/evr/mixer.c
View file @
626438a6
...
@@ -810,17 +810,23 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
...
@@ -810,17 +810,23 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW
static
HRESULT
WINAPI
video_mixer_transform_SetOutputType
(
IMFTransform
*
iface
,
DWORD
id
,
IMFMediaType
*
type
,
DWORD
flags
)
static
HRESULT
WINAPI
video_mixer_transform_SetOutputType
(
IMFTransform
*
iface
,
DWORD
id
,
IMFMediaType
*
type
,
DWORD
flags
)
{
{
const
unsigned
int
equality_flags
=
MF_MEDIATYPE_EQUAL_MAJOR_TYPES
|
const
unsigned
int
equality_flags
=
MF_MEDIATYPE_EQUAL_MAJOR_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_TYPES
;
MF_MEDIATYPE_EQUAL_FORMAT_TYPES
|
MF_MEDIATYPE_EQUAL_FORMAT_DATA
;
struct
video_mixer
*
mixer
=
impl_from_IMFTransform
(
iface
);
struct
video_mixer
*
mixer
=
impl_from_IMFTransform
(
iface
);
HRESULT
hr
=
MF_E_INVALIDMEDIATYPE
;
HRESULT
hr
=
MF_E_INVALIDMEDIATYPE
;
unsigned
int
i
,
compare_flags
;
unsigned
int
i
,
compare_flags
;
BOOL
is_compressed
=
TRUE
;
TRACE
(
"%p, %u, %p, %#x.
\n
"
,
iface
,
id
,
type
,
flags
);
TRACE
(
"%p, %u, %p, %#x.
\n
"
,
iface
,
id
,
type
,
flags
);
if
(
id
)
if
(
id
)
return
MF_E_INVALIDSTREAMNUMBER
;
return
MF_E_INVALIDSTREAMNUMBER
;
if
(
!
type
)
return
E_INVALIDARG
;
if
(
FAILED
(
IMFMediaType_IsCompressedFormat
(
type
,
&
is_compressed
))
||
is_compressed
)
return
MF_E_INVALIDMEDIATYPE
;
EnterCriticalSection
(
&
mixer
->
cs
);
EnterCriticalSection
(
&
mixer
->
cs
);
for
(
i
=
0
;
i
<
mixer
->
output
.
rt_formats_count
;
++
i
)
for
(
i
=
0
;
i
<
mixer
->
output
.
rt_formats_count
;
++
i
)
...
...
dlls/evr/tests/evr.c
View file @
626438a6
...
@@ -942,11 +942,11 @@ static void test_default_mixer_type_negotiation(void)
...
@@ -942,11 +942,11 @@ static void test_default_mixer_type_negotiation(void)
IDirect3DDeviceManager9
*
manager
;
IDirect3DDeviceManager9
*
manager
;
DXVA2_VideoProcessorCaps
caps
;
DXVA2_VideoProcessorCaps
caps
;
IMFVideoProcessor
*
processor
;
IMFVideoProcessor
*
processor
;
GUID
subtype
,
guid
,
*
guids
;
IDirect3DDevice9
*
device
;
IDirect3DDevice9
*
device
;
IMFMediaType
*
video_type
;
IMFMediaType
*
video_type
;
IMFTransform
*
transform
;
IMFTransform
*
transform
;
DWORD
index
,
count
;
DWORD
index
,
count
;
GUID
guid
,
*
guids
;
IUnknown
*
unk
;
IUnknown
*
unk
;
HWND
window
;
HWND
window
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -1070,6 +1070,46 @@ static void test_default_mixer_type_negotiation(void)
...
@@ -1070,6 +1070,46 @@ static void test_default_mixer_type_negotiation(void)
IMFMediaType_Release
(
media_type
);
IMFMediaType_Release
(
media_type
);
IMFMediaType_Release
(
media_type2
);
IMFMediaType_Release
(
media_type2
);
/* Minimal valid attribute set for output type. */
hr
=
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
0
,
&
media_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
MFCreateMediaType
(
&
media_type2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetGUID
(
media_type
,
&
MF_MT_SUBTYPE
,
&
subtype
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type2
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Video
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type2
,
&
MF_MT_SUBTYPE
,
&
subtype
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
1
,
NULL
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
NULL
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type2
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
MF_E_INVALIDMEDIATYPE
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetUINT32
(
media_type2
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
TRUE
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type2
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Candidate type have frame size set, mismatching size is accepted. */
hr
=
IMFMediaType_SetUINT64
(
media_type2
,
&
MF_MT_FRAME_SIZE
,
(
UINT64
)
64
<<
32
|
64
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type2
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaType_Release
(
media_type2
);
IMFMediaType_Release
(
media_type
);
hr
=
IMFTransform_QueryInterface
(
transform
,
&
IID_IMFVideoProcessor
,
(
void
**
)
&
processor
);
hr
=
IMFTransform_QueryInterface
(
transform
,
&
IID_IMFVideoProcessor
,
(
void
**
)
&
processor
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
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