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
5a68001d
Commit
5a68001d
authored
Oct 16, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Implement stream state change events.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4e113682
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
8 deletions
+84
-8
evr.c
dlls/mf/evr.c
+84
-8
No files found.
dlls/mf/evr.c
View file @
5a68001d
...
...
@@ -35,6 +35,13 @@ enum video_renderer_flags
EVR_PRESENTER_INITED_SERVICES
=
0x8
,
};
enum
video_renderer_state
{
EVR_STATE_STOPPED
=
0
,
EVR_STATE_RUNNING
,
EVR_STATE_PAUSED
,
};
enum
video_stream_flags
{
EVR_STREAM_PREROLLING
=
0x1
,
...
...
@@ -77,6 +84,7 @@ struct video_renderer
IMFTransform
*
mixer
;
IMFVideoPresenter
*
presenter
;
unsigned
int
flags
;
unsigned
int
state
;
struct
video_stream
**
streams
;
size_t
stream_size
;
...
...
@@ -1338,30 +1346,98 @@ static ULONG WINAPI video_renderer_clock_sink_Release(IMFClockStateSink *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
));
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
size_t
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %s, %s.
\n
"
,
iface
,
debugstr_time
(
systime
),
debugstr_time
(
offset
));
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStarted
,
&
GUID_NULL
,
S_OK
,
NULL
);
EnterCriticalSection
(
&
stream
->
cs
);
if
(
!
(
stream
->
flags
&
EVR_STREAM_PREROLLED
))
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkRequestSample
,
&
GUID_NULL
,
S_OK
,
NULL
);
stream
->
flags
|=
EVR_STREAM_PREROLLED
;
LeaveCriticalSection
(
&
stream
->
cs
);
}
renderer
->
state
=
EVR_STATE_RUNNING
;
LeaveCriticalSection
(
&
renderer
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockStop
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
size_t
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStopped
,
&
GUID_NULL
,
S_OK
,
NULL
);
EnterCriticalSection
(
&
stream
->
cs
);
stream
->
flags
&=
~
EVR_STREAM_PREROLLED
;
LeaveCriticalSection
(
&
stream
->
cs
);
}
renderer
->
state
=
EVR_STATE_STOPPED
;
LeaveCriticalSection
(
&
renderer
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockPause
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
size_t
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkPaused
,
&
GUID_NULL
,
S_OK
,
NULL
);
}
renderer
->
state
=
EVR_STATE_PAUSED
;
LeaveCriticalSection
(
&
renderer
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockRestart
(
IMFClockStateSink
*
iface
,
MFTIME
systime
)
{
FIXME
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
struct
video_renderer
*
renderer
=
impl_from_IMFClockStateSink
(
iface
);
size_t
i
;
return
E_NOTIMPL
;
TRACE
(
"%p, %s.
\n
"
,
iface
,
debugstr_time
(
systime
));
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStarted
,
&
GUID_NULL
,
S_OK
,
NULL
);
}
renderer
->
state
=
EVR_STATE_RUNNING
;
LeaveCriticalSection
(
&
renderer
->
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
video_renderer_clock_sink_OnClockSetRate
(
IMFClockStateSink
*
iface
,
MFTIME
systime
,
float
rate
)
...
...
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