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
486e6967
Commit
486e6967
authored
Nov 20, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Add tests for MFCreateAMMediaTypeFromMFMediaType.
parent
c763d1b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+39
-0
No files found.
dlls/mfplat/tests/mfplat.c
View file @
486e6967
...
...
@@ -7534,6 +7534,44 @@ skip_tests:
IMFMediaType_Release
(
media_type
);
}
static
void
test_MFCreateAMMediaTypeFromMFMediaType
(
void
)
{
IMFMediaType
*
media_type
;
AM_MEDIA_TYPE
*
am_type
;
HRESULT
hr
;
hr
=
MFCreateMediaType
(
&
media_type
);
ok
(
hr
==
S_OK
,
"Failed to create media type, hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
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
=
MFCreateAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
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
=
MFCreateAMMediaTypeFromMFMediaType
(
media_type
,
GUID_NULL
,
&
am_type
);
todo_wine
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
=
MFCreateAMMediaTypeFromMFMediaType
(
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
(
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
));
ok
(
am_type
->
cbFormat
==
sizeof
(
WAVEFORMATEX
),
"got %lu
\n
"
,
am_type
->
cbFormat
);
CoTaskMemFree
(
am_type
->
pbFormat
);
CoTaskMemFree
(
am_type
);
skip_tests:
IMFMediaType_Release
(
media_type
);
}
static
void
test_MFCreateDXSurfaceBuffer
(
void
)
{
IDirect3DSurface9
*
backbuffer
=
NULL
,
*
surface
;
...
...
@@ -10279,6 +10317,7 @@ START_TEST(mfplat)
test_MFInitMediaTypeFromWaveFormatEx
();
test_MFCreateMFVideoFormatFromMFMediaType
();
test_MFInitAMMediaTypeFromMFMediaType
();
test_MFCreateAMMediaTypeFromMFMediaType
();
test_MFCreateDXSurfaceBuffer
();
test_MFCreateTrackedSample
();
test_MFFrameRateToAverageTimePerFrame
();
...
...
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