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
91afd770
Commit
91afd770
authored
Jun 05, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/tests: Add some more Video Processor tests.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6c6aeea8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
15 deletions
+71
-15
mf.c
dlls/mf/tests/mf.c
+66
-15
mftransform.idl
include/mftransform.idl
+5
-0
No files found.
dlls/mf/tests/mf.c
View file @
91afd770
...
@@ -2062,7 +2062,8 @@ static void test_video_processor(void)
...
@@ -2062,7 +2062,8 @@ static void test_video_processor(void)
DWORD
input_count
,
output_count
,
input_id
,
output_id
,
flags
;
DWORD
input_count
,
output_count
,
input_id
,
output_id
,
flags
;
DWORD
input_min
,
input_max
,
output_min
,
output_max
,
i
,
count
;
DWORD
input_min
,
input_max
,
output_min
,
output_max
,
i
,
count
;
IMFAttributes
*
attributes
,
*
attributes2
;
IMFAttributes
*
attributes
,
*
attributes2
;
IMFMediaType
*
media_type
;
IMFMediaType
*
media_type
,
*
media_type2
;
MFT_INPUT_STREAM_INFO
input_info
;
IMFTransform
*
transform
;
IMFTransform
*
transform
;
HRESULT
hr
;
HRESULT
hr
;
GUID
guid
;
GUID
guid
;
...
@@ -2123,20 +2124,6 @@ todo_wine
...
@@ -2123,20 +2124,6 @@ todo_wine
IMFAttributes_Release
(
attributes
);
IMFAttributes_Release
(
attributes
);
IMFAttributes_Release
(
attributes2
);
IMFAttributes_Release
(
attributes2
);
for
(
i
=
0
;;
++
i
)
{
hr
=
IMFTransform_GetInputAvailableType
(
transform
,
0
,
i
,
&
media_type
);
if
(
hr
==
MF_E_NO_MORE_TYPES
)
break
;
ok
(
hr
==
S_OK
,
"Failed to get supported input type, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetMajorType
(
media_type
,
&
guid
);
ok
(
hr
==
S_OK
,
"Failed to get major type, hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
MFMediaType_Video
),
"Unexpected major type.
\n
"
);
IMFMediaType_Release
(
media_type
);
}
hr
=
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
0
,
&
media_type
);
hr
=
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
0
,
&
media_type
);
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
@@ -2152,11 +2139,33 @@ todo_wine
...
@@ -2152,11 +2139,33 @@ todo_wine
hr
=
IMFTransform_GetOutputCurrentType
(
transform
,
1
,
&
media_type
);
hr
=
IMFTransform_GetOutputCurrentType
(
transform
,
1
,
&
media_type
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
1
,
&
input_info
);
ok
(
hr
==
MF_E_INVALIDSTREAMNUMBER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
ok
(
hr
==
S_OK
,
"Failed to get stream info, hr %#x.
\n
"
,
hr
);
ok
(
input_info
.
dwFlags
==
0
,
"Unexpected flag %#x.
\n
"
,
input_info
.
dwFlags
);
ok
(
input_info
.
cbSize
==
0
,
"Unexpected size %u.
\n
"
,
input_info
.
cbSize
);
ok
(
input_info
.
cbMaxLookahead
==
0
,
"Unexpected lookahead length %u.
\n
"
,
input_info
.
cbMaxLookahead
);
ok
(
input_info
.
cbAlignment
==
0
,
"Unexpected alignment %u.
\n
"
,
input_info
.
cbAlignment
);
/* Configure stream types. */
/* Configure stream types. */
for
(
i
=
0
;;
++
i
)
for
(
i
=
0
;;
++
i
)
{
{
if
(
FAILED
(
hr
=
IMFTransform_GetInputAvailableType
(
transform
,
0
,
i
,
&
media_type
)))
if
(
FAILED
(
hr
=
IMFTransform_GetInputAvailableType
(
transform
,
0
,
i
,
&
media_type
)))
{
ok
(
hr
==
MF_E_NO_MORE_TYPES
,
"Unexpected hr %#x.
\n
"
,
hr
);
break
;
break
;
}
hr
=
IMFTransform_GetInputAvailableType
(
transform
,
0
,
i
,
&
media_type2
);
ok
(
hr
==
S_OK
,
"Failed to get available type, hr %#x.
\n
"
,
hr
);
ok
(
media_type
!=
media_type2
,
"Unexpected instance.
\n
"
);
IMFMediaType_Release
(
media_type2
);
hr
=
IMFMediaType_GetMajorType
(
media_type
,
&
guid
);
ok
(
hr
==
S_OK
,
"Failed to get major type, hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
MFMediaType_Video
),
"Unexpected major type.
\n
"
);
hr
=
IMFMediaType_GetCount
(
media_type
,
&
count
);
hr
=
IMFMediaType_GetCount
(
media_type
,
&
count
);
ok
(
hr
==
S_OK
,
"Failed to get attributes count, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get attributes count, hr %#x.
\n
"
,
hr
);
...
@@ -2166,6 +2175,48 @@ todo_wine
...
@@ -2166,6 +2175,48 @@ todo_wine
ok
(
hr
==
S_OK
,
"Failed to get subtype, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get subtype, hr %#x.
\n
"
,
hr
);
ok
(
is_supported_video_type
(
&
guid
),
"Unexpected media type %s.
\n
"
,
wine_dbgstr_guid
(
&
guid
));
ok
(
is_supported_video_type
(
&
guid
),
"Unexpected media type %s.
\n
"
,
wine_dbgstr_guid
(
&
guid
));
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
ok
(
FAILED
(
hr
),
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetOutputCurrentType
(
transform
,
0
,
&
media_type2
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* FIXME: figure out if those require additional attributes or simply advertised but not supported */
if
(
IsEqualGUID
(
&
guid
,
&
MFVideoFormat_L8
)
||
IsEqualGUID
(
&
guid
,
&
MFVideoFormat_L16
)
||
IsEqualGUID
(
&
guid
,
&
MFVideoFormat_D16
)
||
IsEqualGUID
(
&
guid
,
&
MFVideoFormat_420O
)
||
IsEqualGUID
(
&
guid
,
&
MFVideoFormat_A16B16G16R16F
))
{
IMFMediaType_Release
(
media_type
);
continue
;
}
hr
=
IMFMediaType_SetUINT64
(
media_type
,
&
MF_MT_FRAME_SIZE
,
((
UINT64
)
16
<<
32
)
|
16
);
ok
(
hr
==
S_OK
,
"Failed to set attribute, hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok
(
hr
==
S_OK
,
"Failed to test input type %s, hr %#x.
\n
"
,
wine_dbgstr_guid
(
&
guid
),
hr
);
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
0
);
ok
(
hr
==
S_OK
,
"Failed to test input type, hr %#x.
\n
"
,
hr
);
hr
=
IMFTransform_GetInputCurrentType
(
transform
,
0
,
&
media_type2
);
ok
(
hr
==
S_OK
,
"Failed to get current type, hr %#x.
\n
"
,
hr
);
ok
(
media_type
!=
media_type2
,
"Unexpected instance.
\n
"
);
IMFMediaType_Release
(
media_type2
);
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"Failed to get input status, hr %#x.
\n
"
,
hr
);
ok
(
flags
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Unexpected input status %#x.
\n
"
,
flags
);
hr
=
IMFTransform_GetInputStreamInfo
(
transform
,
0
,
&
input_info
);
ok
(
hr
==
S_OK
,
"Failed to get stream info, hr %#x.
\n
"
,
hr
);
ok
(
input_info
.
dwFlags
==
0
,
"Unexpected flag %#x.
\n
"
,
input_info
.
dwFlags
);
ok
(
input_info
.
cbMaxLookahead
==
0
,
"Unexpected lookahead length %u.
\n
"
,
input_info
.
cbMaxLookahead
);
ok
(
input_info
.
cbAlignment
==
0
,
"Unexpected alignment %u.
\n
"
,
input_info
.
cbAlignment
);
IMFMediaType_Release
(
media_type
);
IMFMediaType_Release
(
media_type
);
}
}
...
...
include/mftransform.idl
View file @
91afd770
...
@@ -61,6 +61,11 @@ enum _MFT_SET_TYPE_FLAGS
...
@@ -61,6 +61,11 @@ enum _MFT_SET_TYPE_FLAGS
MFT_SET_TYPE_TEST_ONLY
=
0
x00000001
,
MFT_SET_TYPE_TEST_ONLY
=
0
x00000001
,
}
;
}
;
enum
_MFT_INPUT_STATUS_FLAGS
{
MFT_INPUT_STATUS_ACCEPT_DATA
=
0
x00000001
,
}
;
[
[
object
,
object
,
uuid
(
bf94c121
-
5b05
-
4
e6f
-
8000
-
ba598961414d
)
uuid
(
bf94c121
-
5b05
-
4
e6f
-
8000
-
ba598961414d
)
...
...
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