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
1cdcfaf6
Commit
1cdcfaf6
authored
Jul 06, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add IMFMediaSinkPreroll stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
045a2ff4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
evr.c
dlls/mf/evr.c
+47
-1
mf.c
dlls/mf/tests/mf.c
+8
-1
No files found.
dlls/mf/evr.c
View file @
1cdcfaf6
...
...
@@ -25,6 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
struct
video_renderer
{
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
LONG
refcount
;
};
...
...
@@ -33,14 +34,25 @@ static struct video_renderer *impl_from_IMFMediaSink(IMFMediaSink *iface)
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaSink_iface
);
}
static
struct
video_renderer
*
impl_from_IMFMediaSinkPreroll
(
IMFMediaSinkPreroll
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaSinkPreroll_iface
);
}
static
HRESULT
WINAPI
video_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaSink
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
*
obj
=
&
renderer
->
IMFMediaSink_iface
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFMediaSinkPreroll
))
{
*
obj
=
&
renderer
->
IMFMediaSinkPreroll_iface
;
}
else
{
...
...
@@ -159,6 +171,39 @@ static const IMFMediaSinkVtbl video_renderer_sink_vtbl =
video_renderer_sink_Shutdown
,
};
static
HRESULT
WINAPI
video_renderer_preroll_QueryInterface
(
IMFMediaSinkPreroll
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
renderer
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_renderer_preroll_AddRef
(
IMFMediaSinkPreroll
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_AddRef
(
&
renderer
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
video_renderer_preroll_Release
(
IMFMediaSinkPreroll
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSinkPreroll
(
iface
);
return
IMFMediaSink_Release
(
&
renderer
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
video_renderer_preroll_NotifyPreroll
(
IMFMediaSinkPreroll
*
iface
,
MFTIME
start_time
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
start_time
));
return
E_NOTIMPL
;
}
static
const
IMFMediaSinkPrerollVtbl
video_renderer_preroll_vtbl
=
{
video_renderer_preroll_QueryInterface
,
video_renderer_preroll_AddRef
,
video_renderer_preroll_Release
,
video_renderer_preroll_NotifyPreroll
,
};
static
HRESULT
evr_create_object
(
IMFAttributes
*
attributes
,
void
*
user_context
,
IUnknown
**
obj
)
{
struct
video_renderer
*
object
;
...
...
@@ -169,6 +214,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
return
E_OUTOFMEMORY
;
object
->
IMFMediaSink_iface
.
lpVtbl
=
&
video_renderer_sink_vtbl
;
object
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
video_renderer_preroll_vtbl
;
object
->
refcount
=
1
;
*
obj
=
(
IUnknown
*
)
&
object
->
IMFMediaSink_iface
;
...
...
dlls/mf/tests/mf.c
View file @
1cdcfaf6
...
...
@@ -3226,6 +3226,7 @@ todo_wine
static
void
test_evr
(
void
)
{
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFActivate
*
activate
;
DWORD
flags
,
count
;
...
...
@@ -3252,9 +3253,15 @@ static void test_evr(void)
hr
=
IMFActivate_ActivateObject
(
activate
,
&
IID_IMFMediaSink
,
(
void
**
)
&
sink
);
ok
(
hr
==
S_OK
,
"Failed to activate, hr %#x.
\n
"
,
hr
);
flags
=
0
;
hr
=
IMFMediaSink_GetCharacteristics
(
sink
,
&
flags
);
todo_wine
todo_wine
{
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
flags
==
(
MEDIASINK_CAN_PREROLL
|
MEDIASINK_CLOCK_REQUIRED
),
"Unexpected flags %#x.
\n
"
,
flags
);
}
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFMediaSinkPreroll
,
(
void
**
)
&
preroll
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaSinkPreroll_Release
(
preroll
);
hr
=
IMFActivate_ShutdownObject
(
activate
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
...
...
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