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
3d8d05db
Commit
3d8d05db
authored
Sep 08, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add GetMajorType() for the stream sink.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3625f762
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
evr.c
dlls/mf/evr.c
+11
-2
mf.c
dlls/mf/tests/mf.c
+20
-0
No files found.
dlls/mf/evr.c
View file @
3d8d05db
...
...
@@ -385,9 +385,18 @@ static HRESULT WINAPI video_stream_typehandler_GetCurrentMediaType(IMFMediaTypeH
static
HRESULT
WINAPI
video_stream_typehandler_GetMajorType
(
IMFMediaTypeHandler
*
iface
,
GUID
*
type
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
typ
e
);
struct
video_stream
*
stream
=
impl_from_IMFMediaTypeHandler
(
ifac
e
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
type
);
if
(
!
stream
->
parent
)
return
MF_E_STREAMSINK_REMOVED
;
if
(
!
type
)
return
E_POINTER
;
memcpy
(
type
,
&
MFMediaType_Video
,
sizeof
(
*
type
));
return
S_OK
;
}
static
const
IMFMediaTypeHandlerVtbl
video_stream_type_handler_vtbl
=
...
...
dlls/mf/tests/mf.c
View file @
3d8d05db
...
...
@@ -3236,16 +3236,19 @@ todo_wine
static
void
test_evr
(
void
)
{
IMFMediaEventGenerator
*
ev_generator
;
IMFMediaTypeHandler
*
type_handler
;
IMFVideoRenderer
*
video_renderer
;
IMFClockStateSink
*
clock_sink
;
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFStreamSink
*
stream_sink
;
IMFActivate
*
activate
;
DWORD
flags
,
count
;
IMFGetService
*
gs
;
IUnknown
*
unk
;
UINT64
value
;
HRESULT
hr
;
GUID
guid
;
hr
=
CoInitialize
(
NULL
);
ok
(
hr
==
S_OK
,
"Failed to initialize, hr %#x.
\n
"
,
hr
);
...
...
@@ -3267,6 +3270,23 @@ static void test_evr(void)
hr
=
IMFActivate_ActivateObject
(
activate
,
&
IID_IMFMediaSink
,
(
void
**
)
&
sink
);
ok
(
hr
==
S_OK
,
"Failed to activate, hr %#x.
\n
"
,
hr
);
/* Primary stream type handler. */
hr
=
IMFMediaSink_GetStreamSinkById
(
sink
,
0
,
&
stream_sink
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFStreamSink_GetMediaTypeHandler
(
stream_sink
,
&
type_handler
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaTypeHandler_GetMajorType
(
type_handler
,
&
guid
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
guid
,
&
MFMediaType_Video
),
"Unexpected type %s.
\n
"
,
wine_dbgstr_guid
(
&
guid
));
IMFStreamSink_Release
(
stream_sink
);
IMFMediaTypeHandler_Release
(
type_handler
);
hr
=
IMFMediaSink_GetCharacteristics
(
sink
,
&
flags
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
flags
==
(
MEDIASINK_CAN_PREROLL
|
MEDIASINK_CLOCK_REQUIRED
),
"Unexpected flags %#x.
\n
"
,
flags
);
...
...
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