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
68d75bbd
Commit
68d75bbd
authored
Aug 02, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr: Added MFIsFormatYUV().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c47f02c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
1 deletion
+70
-1
evr.spec
dlls/evr/evr.spec
+1
-1
main.c
dlls/evr/main.c
+26
-0
evr.c
dlls/evr/tests/evr.c
+42
-0
mfapi.h
include/mfapi.h
+1
-0
No files found.
dlls/evr/evr.spec
View file @
68d75bbd
...
...
@@ -25,4 +25,4 @@
@ stub MFGetUncompressedVideoFormat
@ stub MFInitVideoFormat
@ stdcall -import MFInitVideoFormat_RGB(ptr long long long)
@ st
ub MFIsFormatYUV
@ st
dcall MFIsFormatYUV(long)
dlls/evr/main.c
View file @
68d75bbd
...
...
@@ -25,6 +25,7 @@
#include "ole2.h"
#include "rpcproxy.h"
#include "d3d9.h"
#include "evr_private.h"
...
...
@@ -206,3 +207,28 @@ HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *mixer_outer, IUnknown *p
return
hr
;
}
/***********************************************************************
* MFIsFormatYUV (evr.@)
*/
BOOL
WINAPI
MFIsFormatYUV
(
DWORD
format
)
{
TRACE
(
"%s.
\n
"
,
debugstr_an
((
char
*
)
&
format
,
4
));
switch
(
format
)
{
case
D3DFMT_UYVY
:
case
D3DFMT_YUY2
:
case
MAKEFOURCC
(
'A'
,
'Y'
,
'U'
,
'V'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'1'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
):
case
MAKEFOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
):
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'1'
):
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'2'
):
case
MAKEFOURCC
(
'Y'
,
'2'
,
'1'
,
'0'
):
case
MAKEFOURCC
(
'Y'
,
'2'
,
'1'
,
'6'
):
return
TRUE
;
default:
return
FALSE
;
}
}
dlls/evr/tests/evr.c
View file @
68d75bbd
...
...
@@ -2722,6 +2722,47 @@ done:
DestroyWindow
(
window
);
}
static
void
test_MFIsFormatYUV
(
void
)
{
static
const
DWORD
formats
[]
=
{
D3DFMT_UYVY
,
D3DFMT_YUY2
,
MAKEFOURCC
(
'A'
,
'Y'
,
'U'
,
'V'
),
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'1'
),
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
),
MAKEFOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
),
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'1'
),
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'2'
),
MAKEFOURCC
(
'Y'
,
'2'
,
'1'
,
'0'
),
MAKEFOURCC
(
'Y'
,
'2'
,
'1'
,
'6'
),
};
static
const
DWORD
unsupported_formats
[]
=
{
D3DFMT_A8R8G8B8
,
MAKEFOURCC
(
'I'
,
'Y'
,
'U'
,
'V'
),
MAKEFOURCC
(
'I'
,
'4'
,
'2'
,
'0'
),
MAKEFOURCC
(
'Y'
,
'V'
,
'Y'
,
'U'
),
MAKEFOURCC
(
'Y'
,
'V'
,
'U'
,
'9'
),
MAKEFOURCC
(
'Y'
,
'4'
,
'1'
,
'0'
),
MAKEFOURCC
(
'Y'
,
'4'
,
'1'
,
'6'
),
};
unsigned
int
i
;
BOOL
ret
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
formats
);
++
i
)
{
ret
=
MFIsFormatYUV
(
formats
[
i
]);
ok
(
ret
,
"Unexpected ret %d, format %s.
\n
"
,
ret
,
debugstr_an
((
char
*
)
&
formats
[
i
],
4
));
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
unsupported_formats
);
++
i
)
{
ret
=
MFIsFormatYUV
(
unsupported_formats
[
i
]);
ok
(
!
ret
,
"Unexpected ret %d, format %s.
\n
"
,
ret
,
debugstr_an
((
char
*
)
&
unsupported_formats
[
i
],
4
));
}
}
START_TEST
(
evr
)
{
CoInitialize
(
NULL
);
...
...
@@ -2746,6 +2787,7 @@ START_TEST(evr)
test_mixer_output_rectangle
();
test_mixer_zorder
();
test_mixer_samples
();
test_MFIsFormatYUV
();
CoUninitialize
();
}
include/mfapi.h
View file @
68d75bbd
...
...
@@ -558,6 +558,7 @@ HRESULT WINAPI MFTEnum2(GUID category, UINT32 flags, const MFT_REGISTER_TYPE_INF
HRESULT
WINAPI
MFTEnumEx
(
GUID
category
,
UINT32
flags
,
const
MFT_REGISTER_TYPE_INFO
*
input_type
,
const
MFT_REGISTER_TYPE_INFO
*
output_type
,
IMFActivate
***
activate
,
UINT32
*
pcount
);
BOOL
WINAPI
MFIsFormatYUV
(
DWORD
format
);
HRESULT
WINAPI
MFInitAttributesFromBlob
(
IMFAttributes
*
attributes
,
const
UINT8
*
buffer
,
UINT
size
);
HRESULT
WINAPI
MFInitMediaTypeFromWaveFormatEx
(
IMFMediaType
*
mediatype
,
const
WAVEFORMATEX
*
format
,
UINT32
size
);
HRESULT
WINAPI
MFInitVideoFormat_RGB
(
MFVIDEOFORMAT
*
format
,
DWORD
width
,
DWORD
height
,
DWORD
d3dformat
);
...
...
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