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
115ac283
Commit
115ac283
authored
Jul 08, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Add a stub for clock state sink.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca0db956
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
evr.c
dlls/mf/evr.c
+76
-0
mf.c
dlls/mf/tests/mf.c
+5
-0
No files found.
dlls/mf/evr.c
View file @
115ac283
...
@@ -34,6 +34,7 @@ struct video_renderer
...
@@ -34,6 +34,7 @@ struct video_renderer
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSink
IMFMediaSink_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
IMFMediaSinkPreroll
IMFMediaSinkPreroll_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMFVideoRenderer
IMFVideoRenderer_iface
;
IMFClockStateSink
IMFClockStateSink_iface
;
IMFMediaEventGenerator
IMFMediaEventGenerator_iface
;
IMFMediaEventGenerator
IMFMediaEventGenerator_iface
;
LONG
refcount
;
LONG
refcount
;
...
@@ -64,6 +65,11 @@ static struct video_renderer *impl_from_IMFMediaEventGenerator(IMFMediaEventGene
...
@@ -64,6 +65,11 @@ static struct video_renderer *impl_from_IMFMediaEventGenerator(IMFMediaEventGene
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaEventGenerator_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFMediaEventGenerator_iface
);
}
}
static
struct
video_renderer
*
impl_from_IMFClockStateSink
(
IMFClockStateSink
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
IMFClockStateSink_iface
);
}
static
HRESULT
WINAPI
video_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
static
HRESULT
WINAPI
video_renderer_sink_QueryInterface
(
IMFMediaSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
{
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
struct
video_renderer
*
renderer
=
impl_from_IMFMediaSink
(
iface
);
...
@@ -87,6 +93,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
...
@@ -87,6 +93,10 @@ static HRESULT WINAPI video_renderer_sink_QueryInterface(IMFMediaSink *iface, RE
{
{
*
obj
=
&
renderer
->
IMFMediaEventGenerator_iface
;
*
obj
=
&
renderer
->
IMFMediaEventGenerator_iface
;
}
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IMFClockStateSink
))
{
*
obj
=
&
renderer
->
IMFClockStateSink_iface
;
}
else
else
{
{
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
WARN
(
"Unsupported interface %s.
\n
"
,
debugstr_guid
(
riid
));
...
@@ -363,6 +373,71 @@ static const IMFMediaEventGeneratorVtbl video_renderer_events_vtbl =
...
@@ -363,6 +373,71 @@ static const IMFMediaEventGeneratorVtbl video_renderer_events_vtbl =
video_renderer_events_QueueEvent
,
video_renderer_events_QueueEvent
,
};
};
static
HRESULT
WINAPI
video_renderer_clock_sink_QueryInterface
(
IMFClockStateSink
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_QueryInterface
(
&
renderer
->
IMFMediaSink_iface
,
riid
,
obj
);
}
static
ULONG
WINAPI
video_renderer_clock_sink_AddRef
(
IMFClockStateSink
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_AddRef
(
&
renderer
->
IMFMediaSink_iface
);
}
static
ULONG
WINAPI
video_renderer_clock_sink_Release
(
IMFClockStateSink
*
iface
)
{
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
return
IMFMediaSink_Release
(
&
renderer
->
IMFMediaSink_iface
);
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockStart
(
IMFClockStateSink
*
iface
,
MFTIME
systime
,
LONGLONG
offset
)
{
FIXME
(
"%p, %s, %s.
\n
"
,
iface
,
debugstr_time
(
systime
),
debugstr_time
(
offset
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockStop
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockPause
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockRestart
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockSetRate
(
IMFClockStateSink
*
iface
,
MFTIME
systime
,
float
rate
)
{
FIXME
(
"%p, %s, %f.
\n
"
,
iface
,
debugstr_time
(
systime
),
rate
);
return
E_NOTIMPL
;
}
static
const
IMFClockStateSinkVtbl
video_renderer_clock_sink_vtbl
=
{
video_renderer_clock_sink_QueryInterface
,
video_renderer_clock_sink_AddRef
,
video_renderer_clock_sink_Release
,
video_renderer_clock_sink_OnClockStart
,
video_renderer_clock_sink_OnClockStop
,
video_renderer_clock_sink_OnClockPause
,
video_renderer_clock_sink_OnClockRestart
,
video_renderer_clock_sink_OnClockSetRate
,
};
static
HRESULT
video_renderer_create_mixer
(
IMFAttributes
*
attributes
,
IMFTransform
**
out
)
static
HRESULT
video_renderer_create_mixer
(
IMFAttributes
*
attributes
,
IMFTransform
**
out
)
{
{
unsigned
int
flags
=
0
;
unsigned
int
flags
=
0
;
...
@@ -423,6 +498,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
...
@@ -423,6 +498,7 @@ static HRESULT evr_create_object(IMFAttributes *attributes, void *user_context,
object
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
video_renderer_preroll_vtbl
;
object
->
IMFMediaSinkPreroll_iface
.
lpVtbl
=
&
video_renderer_preroll_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
video_renderer_vtbl
;
object
->
IMFVideoRenderer_iface
.
lpVtbl
=
&
video_renderer_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
video_renderer_events_vtbl
;
object
->
IMFMediaEventGenerator_iface
.
lpVtbl
=
&
video_renderer_events_vtbl
;
object
->
IMFClockStateSink_iface
.
lpVtbl
=
&
video_renderer_clock_sink_vtbl
;
object
->
refcount
=
1
;
object
->
refcount
=
1
;
InitializeCriticalSection
(
&
object
->
cs
);
InitializeCriticalSection
(
&
object
->
cs
);
...
...
dlls/mf/tests/mf.c
View file @
115ac283
...
@@ -3229,6 +3229,7 @@ static void test_evr(void)
...
@@ -3229,6 +3229,7 @@ static void test_evr(void)
{
{
IMFMediaEventGenerator
*
ev_generator
;
IMFMediaEventGenerator
*
ev_generator
;
IMFVideoRenderer
*
video_renderer
;
IMFVideoRenderer
*
video_renderer
;
IMFClockStateSink
*
clock_sink
;
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSinkPreroll
*
preroll
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFMediaSink
*
sink
,
*
sink2
;
IMFActivate
*
activate
;
IMFActivate
*
activate
;
...
@@ -3272,6 +3273,10 @@ static void test_evr(void)
...
@@ -3272,6 +3273,10 @@ static void test_evr(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFMediaEventGenerator_Release
(
ev_generator
);
IMFMediaEventGenerator_Release
(
ev_generator
);
hr
=
IMFMediaSink_QueryInterface
(
sink
,
&
IID_IMFClockStateSink
,
(
void
**
)
&
clock_sink
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFClockStateSink_Release
(
clock_sink
);
hr
=
IMFActivate_ShutdownObject
(
activate
);
hr
=
IMFActivate_ShutdownObject
(
activate
);
ok
(
hr
==
S_OK
,
"Failed to shut down, hr %#x.
\n
"
,
hr
);
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