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
7f1eef65
Commit
7f1eef65
authored
Nov 22, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Implement MFInitAMMediaTypeFromMFMediaType.
parent
f9723bc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
mediatype.c
dlls/mfplat/mediatype.c
+0
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+9
-11
No files found.
dlls/mfplat/mediatype.c
View file @
7f1eef65
This diff is collapsed.
Click to expand it.
dlls/mfplat/tests/mfplat.c
View file @
7f1eef65
...
...
@@ -7077,25 +7077,24 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void)
/* test basic media type attributes mapping and valid formats */
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Video
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_SUBTYPE
,
&
MFAudioFormat_PCM
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_VideoInfo
,
&
am_type
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_tests
;
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
am_type
.
majortype
,
&
MFMediaType_Audio
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
majortype
));
ok
(
IsEqualGUID
(
&
am_type
.
subtype
,
&
MFAudioFormat_PCM
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
subtype
));
ok
(
IsEqualGUID
(
&
am_type
.
formattype
,
&
FORMAT_WaveFormatEx
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
formattype
));
...
...
@@ -7138,11 +7137,11 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void)
ok
(
am_type
.
cbFormat
==
sizeof
(
VIDEOINFOHEADER
),
"got %lu
\n
"
,
am_type
.
cbFormat
);
CoTaskMemFree
(
am_type
.
pbFormat
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_VideoInfo2
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
am_type
.
majortype
,
&
MFMediaType_Video
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
majortype
));
ok
(
IsEqualGUID
(
&
am_type
.
subtype
,
&
MEDIASUBTYPE_RGB32
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
subtype
));
ok
(
IsEqualGUID
(
&
am_type
.
formattype
,
&
FORMAT_VideoInfo2
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
formattype
));
ok
(
am_type
.
cbFormat
==
sizeof
(
VIDEOINFOHEADER2
),
"got %lu
\n
"
,
am_type
.
cbFormat
);
todo_wine
ok
(
IsEqualGUID
(
&
am_type
.
subtype
,
&
MEDIASUBTYPE_RGB32
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
subtype
));
todo_wine
ok
(
IsEqualGUID
(
&
am_type
.
formattype
,
&
FORMAT_VideoInfo2
),
"got %s.
\n
"
,
debugstr_guid
(
&
am_type
.
formattype
));
todo_wine
ok
(
am_type
.
cbFormat
==
sizeof
(
VIDEOINFOHEADER2
),
"got %lu
\n
"
,
am_type
.
cbFormat
);
CoTaskMemFree
(
am_type
.
pbFormat
);
hr
=
MFInitAMMediaTypeFromMFMediaType
(
media_type
,
FORMAT_MFVideoFormat
,
&
am_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -7554,7 +7553,6 @@ static void test_MFInitAMMediaTypeFromMFMediaType(void)
CoTaskMemFree
(
am_type
.
pbFormat
);
IMFMediaType_DeleteAllItems
(
media_type
);
skip_tests:
IMFMediaType_Release
(
media_type
);
}
...
...
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