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
69b98b2b
Commit
69b98b2b
authored
Apr 09, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Handle more video subtypes in MFInitMediaTypeFromAMMediaType().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
357f0e9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletion
+50
-1
evr.c
dlls/evr/tests/evr.c
+0
-1
mediatype.c
dlls/mfplat/mediatype.c
+17
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+33
-0
No files found.
dlls/evr/tests/evr.c
View file @
69b98b2b
...
...
@@ -673,7 +673,6 @@ static void test_query_accept(void)
{
memcpy
(
&
req_mt
.
subtype
,
subtype_tests
[
i
],
sizeof
(
GUID
));
hr
=
IPin_QueryAccept
(
pin
,
&
req_mt
);
todo_wine_if
(
i
)
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
}
...
...
dlls/mfplat/mediatype.c
View file @
69b98b2b
...
...
@@ -26,6 +26,7 @@
#include "ks.h"
#include "ksmedia.h"
#include "amvideo.h"
#include "wmcodecdsp.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
...
...
@@ -3593,6 +3594,22 @@ static const GUID * get_mf_subtype_for_am_subtype(const GUID *subtype)
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_RGB32
))
return
&
MFVideoFormat_RGB32
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_ARGB32
))
return
&
MFVideoFormat_ARGB32
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_I420
))
return
&
MFVideoFormat_I420
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_AYUV
))
return
&
MFVideoFormat_AYUV
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_YV12
))
return
&
MFVideoFormat_YV12
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_YUY2
))
return
&
MFVideoFormat_YUY2
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_UYVY
))
return
&
MFVideoFormat_UYVY
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_YVYU
))
return
&
MFVideoFormat_YVYU
;
else
if
(
IsEqualGUID
(
subtype
,
&
MEDIASUBTYPE_NV12
))
return
&
MFVideoFormat_NV12
;
else
{
FIXME
(
"Unknown subtype %s.
\n
"
,
debugstr_guid
(
subtype
));
...
...
dlls/mfplat/tests/mfplat.c
View file @
69b98b2b
...
...
@@ -56,6 +56,7 @@
#undef EXTERN_GUID
#define EXTERN_GUID DEFINE_GUID
#include "mfd3d12.h"
#include "wmcodecdsp.h"
DEFINE_GUID
(
DUMMY_CLSID
,
0x12345678
,
0x1234
,
0x1234
,
0x12
,
0x13
,
0x14
,
0x15
,
0x16
,
0x17
,
0x18
,
0x19
);
DEFINE_GUID
(
DUMMY_GUID1
,
0x12345678
,
0x1234
,
0x1234
,
0x21
,
0x21
,
0x21
,
0x21
,
0x21
,
0x21
,
0x21
,
0x21
);
...
...
@@ -8421,6 +8422,22 @@ static void test_MFInitMediaTypeFromAMMediaType(void)
{
0
},
{
0
},
0
,
0
,
0
,
{
sizeof
(
BITMAPINFOHEADER
),
32
,
24
,
1
,
0
,
0xdeadbeef
}
};
static
const
struct
guid_type_pair
{
const
GUID
*
am_type
;
const
GUID
*
mf_type
;
}
guid_types
[]
=
{
{
&
MEDIASUBTYPE_I420
,
&
MFVideoFormat_I420
},
{
&
MEDIASUBTYPE_AYUV
,
&
MFVideoFormat_AYUV
},
{
&
MEDIASUBTYPE_YV12
,
&
MFVideoFormat_YV12
},
{
&
MEDIASUBTYPE_YUY2
,
&
MFVideoFormat_YUY2
},
{
&
MEDIASUBTYPE_UYVY
,
&
MFVideoFormat_UYVY
},
{
&
MEDIASUBTYPE_YVYU
,
&
MFVideoFormat_YVYU
},
{
&
MEDIASUBTYPE_NV12
,
&
MFVideoFormat_NV12
},
{
&
MEDIASUBTYPE_ARGB32
,
&
MFVideoFormat_ARGB32
},
};
unsigned
int
i
;
hr
=
MFCreateMediaType
(
&
media_type
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
...
...
@@ -8539,6 +8556,22 @@ static void test_MFInitMediaTypeFromAMMediaType(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
value32
==
128
,
"Unexpected value %d.
\n
"
,
value32
);
vih
.
bmiHeader
.
biHeight
=
24
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
guid_types
);
++
i
)
{
memcpy
(
&
mt
.
subtype
,
guid_types
[
i
].
am_type
,
sizeof
(
GUID
));
hr
=
MFInitMediaTypeFromAMMediaType
(
media_type
,
&
mt
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMFMediaType_GetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
guid
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
MFMediaType_Video
),
"Unexpected guid %s.
\n
"
,
debugstr_guid
(
&
guid
));
hr
=
IMFMediaType_GetGUID
(
media_type
,
&
MF_MT_SUBTYPE
,
&
guid
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
guid_types
[
i
].
mf_type
),
"Unexpected guid %s.
\n
"
,
debugstr_guid
(
&
guid
));
}
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