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
f3a72d4e
Commit
f3a72d4e
authored
Mar 21, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Implement MFCompareFullToPartialMediaType().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
abcea9a3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
1 deletion
+62
-1
mediatype.c
dlls/mfplat/mediatype.c
+19
-0
mfplat.spec
dlls/mfplat/mfplat.spec
+1
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+41
-0
mfapi.h
include/mfapi.h
+1
-0
No files found.
dlls/mfplat/mediatype.c
View file @
f3a72d4e
...
...
@@ -1496,3 +1496,22 @@ HRESULT WINAPI MFCalculateImageSize(REFGUID subtype, UINT32 width, UINT32 height
return
format
?
S_OK
:
E_INVALIDARG
;
}
/***********************************************************************
* MFCompareFullToPartialMediaType (mfplat.@)
*/
BOOL
WINAPI
MFCompareFullToPartialMediaType
(
IMFMediaType
*
full_type
,
IMFMediaType
*
partial_type
)
{
BOOL
result
;
GUID
major
;
TRACE
(
"%p, %p.
\n
"
,
full_type
,
partial_type
);
if
(
FAILED
(
IMFMediaType_GetMajorType
(
partial_type
,
&
major
)))
return
FALSE
;
if
(
FAILED
(
IMFMediaType_Compare
(
partial_type
,
(
IMFAttributes
*
)
full_type
,
MF_ATTRIBUTES_MATCH_OUR_ITEMS
,
&
result
)))
return
FALSE
;
return
result
;
}
dlls/mfplat/mfplat.spec
View file @
f3a72d4e
...
...
@@ -29,7 +29,7 @@
@ stdcall MFCalculateImageSize(ptr long long ptr)
@ stub MFCancelCreateFile
@ stdcall MFCancelWorkItem(int64)
@ st
ub MFCompareFullToPartialMediaType
@ st
dcall MFCompareFullToPartialMediaType(ptr ptr)
@ stub MFCompareSockaddrAddresses
@ stub MFConvertColorInfoFromDXVA
@ stub MFConvertColorInfoToDXVA
...
...
dlls/mfplat/tests/mfplat.c
View file @
f3a72d4e
...
...
@@ -2480,6 +2480,46 @@ static void test_MFCalculateImageSize(void)
}
}
static
void
test_MFCompareFullToPartialMediaType
(
void
)
{
IMFMediaType
*
full_type
,
*
partial_type
;
HRESULT
hr
;
BOOL
ret
;
hr
=
MFCreateMediaType
(
&
full_type
);
ok
(
hr
==
S_OK
,
"Failed to create media type, hr %#x.
\n
"
,
hr
);
hr
=
MFCreateMediaType
(
&
partial_type
);
ok
(
hr
==
S_OK
,
"Failed to create media type, hr %#x.
\n
"
,
hr
);
ret
=
MFCompareFullToPartialMediaType
(
full_type
,
partial_type
);
ok
(
!
ret
,
"Unexpected result %d.
\n
"
,
ret
);
hr
=
IMFMediaType_SetGUID
(
full_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Failed to set major type, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
partial_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Failed to set major type, hr %#x.
\n
"
,
hr
);
ret
=
MFCompareFullToPartialMediaType
(
full_type
,
partial_type
);
ok
(
ret
,
"Unexpected result %d.
\n
"
,
ret
);
hr
=
IMFMediaType_SetGUID
(
full_type
,
&
MF_MT_SUBTYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Failed to set major type, hr %#x.
\n
"
,
hr
);
ret
=
MFCompareFullToPartialMediaType
(
full_type
,
partial_type
);
ok
(
ret
,
"Unexpected result %d.
\n
"
,
ret
);
hr
=
IMFMediaType_SetGUID
(
partial_type
,
&
MF_MT_SUBTYPE
,
&
MFMediaType_Video
);
ok
(
hr
==
S_OK
,
"Failed to set major type, hr %#x.
\n
"
,
hr
);
ret
=
MFCompareFullToPartialMediaType
(
full_type
,
partial_type
);
ok
(
!
ret
,
"Unexpected result %d.
\n
"
,
ret
);
IMFMediaType_Release
(
full_type
);
IMFMediaType_Release
(
partial_type
);
}
START_TEST
(
mfplat
)
{
CoInitialize
(
NULL
);
...
...
@@ -2510,6 +2550,7 @@ START_TEST(mfplat)
test_MFInvokeCallback
();
test_stream_descriptor
();
test_MFCalculateImageSize
();
test_MFCompareFullToPartialMediaType
();
CoUninitialize
();
}
include/mfapi.h
View file @
f3a72d4e
...
...
@@ -188,6 +188,7 @@ HRESULT WINAPI MFAllocateWorkQueue(DWORD *queue);
HRESULT
WINAPI
MFAllocateWorkQueueEx
(
MFASYNC_WORKQUEUE_TYPE
queue_type
,
DWORD
*
queue
);
HRESULT
WINAPI
MFCalculateImageSize
(
REFGUID
subtype
,
UINT32
width
,
UINT32
height
,
UINT32
*
size
);
HRESULT
WINAPI
MFCancelWorkItem
(
MFWORKITEM_KEY
key
);
BOOL
WINAPI
MFCompareFullToPartialMediaType
(
IMFMediaType
*
full_type
,
IMFMediaType
*
partial_type
);
HRESULT
WINAPI
MFCopyImage
(
BYTE
*
dest
,
LONG
deststride
,
const
BYTE
*
src
,
LONG
srcstride
,
DWORD
width
,
DWORD
lines
);
HRESULT
WINAPI
MFCreateAlignedMemoryBuffer
(
DWORD
max_length
,
DWORD
alignment
,
IMFMediaBuffer
**
buffer
);
HRESULT
WINAPI
MFCreateAttributes
(
IMFAttributes
**
attributes
,
UINT32
size
);
...
...
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