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
762a9ae4
Commit
762a9ae4
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 GetMajorType() for stream descriptor.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d3e819a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
mediatype.c
dlls/mfplat/mediatype.c
+12
-2
mfplat.c
dlls/mfplat/tests/mfplat.c
+10
-1
No files found.
dlls/mfplat/mediatype.c
View file @
762a9ae4
...
...
@@ -931,9 +931,19 @@ static HRESULT WINAPI mediatype_handler_GetCurrentMediaType(IMFMediaTypeHandler
static
HRESULT
WINAPI
mediatype_handler_GetMajorType
(
IMFMediaTypeHandler
*
iface
,
GUID
*
type
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
type
);
struct
stream_desc
*
stream_desc
=
impl_from_IMFMediaTypeHandler
(
iface
);
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
type
);
EnterCriticalSection
(
&
stream_desc
->
cs
);
if
(
stream_desc
->
current_type
)
hr
=
IMFMediaType_GetGUID
(
stream_desc
->
current_type
,
&
MF_MT_MAJOR_TYPE
,
type
);
else
hr
=
MF_E_ATTRIBUTENOTFOUND
;
LeaveCriticalSection
(
&
stream_desc
->
cs
);
return
hr
;
}
static
const
IMFMediaTypeHandlerVtbl
mediatypehandlervtbl
=
...
...
dlls/mfplat/tests/mfplat.c
View file @
762a9ae4
...
...
@@ -2387,7 +2387,6 @@ static void test_stream_descriptor(void)
ok
(
hr
==
MF_E_NOT_INITIALIZED
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
major_type
);
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
media_types
);
++
i
)
...
...
@@ -2409,6 +2408,16 @@ todo_wine
hr
=
IMFMediaTypeHandler_SetCurrentMediaType
(
type_handler
,
media_type
);
ok
(
hr
==
S_OK
,
"Failed to set current type, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
major_type
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_SetGUID
(
media_type
,
&
MF_MT_MAJOR_TYPE
,
&
MFMediaType_Audio
);
ok
(
hr
==
S_OK
,
"Failed to set major type, hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
major_type
);
ok
(
hr
==
S_OK
,
"Failed to get major type, hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
major_type
,
&
MFMediaType_Audio
),
"Unexpected major type.
\n
"
);
hr
=
IMFMediaTypeHandler_GetMediaTypeCount
(
type_handler
,
&
count
);
ok
(
hr
==
S_OK
,
"Failed to get type count, hr %#x.
\n
"
,
hr
);
ok
(
count
==
ARRAY_SIZE
(
media_types
),
"Unexpected type count.
\n
"
);
...
...
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