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
8680afcc
Commit
8680afcc
authored
Oct 26, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/evr: Notify mixer and presenter on clock state changes.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
21355680
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
20 deletions
+48
-20
evr.c
dlls/mf/evr.c
+48
-20
No files found.
dlls/mf/evr.c
View file @
8680afcc
...
@@ -860,7 +860,6 @@ static HRESULT WINAPI video_renderer_sink_GetStreamSinkById(IMFMediaSink *iface,
...
@@ -860,7 +860,6 @@ static HRESULT WINAPI video_renderer_sink_GetStreamSinkById(IMFMediaSink *iface,
*
stream
=
&
renderer
->
streams
[
i
]
->
IMFStreamSink_iface
;
*
stream
=
&
renderer
->
streams
[
i
]
->
IMFStreamSink_iface
;
IMFStreamSink_AddRef
(
*
stream
);
IMFStreamSink_AddRef
(
*
stream
);
}
}
}
}
LeaveCriticalSection
(
&
renderer
->
cs
);
LeaveCriticalSection
(
&
renderer
->
cs
);
...
@@ -1382,21 +1381,30 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStart(IMFClockStateSink *
...
@@ -1382,21 +1381,30 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStart(IMFClockStateSink *
EnterCriticalSection
(
&
renderer
->
cs
);
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
if
(
renderer
->
state
==
EVR_STATE_STOPPED
)
{
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFTransform_ProcessMessage
(
renderer
->
mixer
,
MFT_MESSAGE_NOTIFY_BEGIN_STREAMING
,
0
);
IMFVideoPresenter_ProcessMessage
(
renderer
->
presenter
,
MFVP_MESSAGE_BEGINSTREAMING
,
0
);
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStarted
,
&
GUID_NULL
,
S_OK
,
NULL
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
EnterCriticalSection
(
&
stream
->
cs
);
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStarted
,
&
GUID_NULL
,
S_OK
,
NULL
);
if
(
!
(
stream
->
flags
&
EVR_STREAM_PREROLLED
))
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkRequestSample
,
EnterCriticalSection
(
&
stream
->
cs
);
&
GUID_NULL
,
S_OK
,
NULL
);
if
(
!
(
stream
->
flags
&
EVR_STREAM_PREROLLED
))
stream
->
flags
|=
EVR_STREAM_PREROLLED
;
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkRequestSample
,
LeaveCriticalSection
(
&
stream
->
cs
);
&
GUID_NULL
,
S_OK
,
NULL
);
stream
->
flags
|=
EVR_STREAM_PREROLLED
;
LeaveCriticalSection
(
&
stream
->
cs
);
}
}
}
renderer
->
state
=
EVR_STATE_RUNNING
;
renderer
->
state
=
EVR_STATE_RUNNING
;
IMFVideoPresenter_OnClockStart
(
renderer
->
presenter
,
systime
,
offset
);
LeaveCriticalSection
(
&
renderer
->
cs
);
LeaveCriticalSection
(
&
renderer
->
cs
);
return
S_OK
;
return
S_OK
;
...
@@ -1411,16 +1419,28 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStop(IMFClockStateSink *i
...
@@ -1411,16 +1419,28 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockStop(IMFClockStateSink *i
EnterCriticalSection
(
&
renderer
->
cs
);
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
IMFVideoPresenter_OnClockStop
(
renderer
->
presenter
,
systime
);
IMFTransform_ProcessMessage
(
renderer
->
mixer
,
MFT_MESSAGE_COMMAND_FLUSH
,
0
);
IMFVideoPresenter_ProcessMessage
(
renderer
->
presenter
,
MFVP_MESSAGE_FLUSH
,
0
);
if
(
renderer
->
state
==
EVR_STATE_RUNNING
||
renderer
->
state
==
EVR_STATE_PAUSED
)
{
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
]
;
IMFTransform_ProcessMessage
(
renderer
->
mixer
,
MFT_MESSAGE_NOTIFY_END_STREAMING
,
0
)
;
IMF
MediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkStopped
,
&
GUID_NULL
,
S_OK
,
NULL
);
IMF
VideoPresenter_ProcessMessage
(
renderer
->
presenter
,
MFVP_MESSAGE_ENDSTREAMING
,
0
);
EnterCriticalSection
(
&
stream
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
stream
->
flags
&=
~
EVR_STREAM_PREROLLED
;
{
LeaveCriticalSection
(
&
stream
->
cs
);
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
;
}
}
renderer
->
state
=
EVR_STATE_STOPPED
;
LeaveCriticalSection
(
&
renderer
->
cs
);
LeaveCriticalSection
(
&
renderer
->
cs
);
...
@@ -1436,11 +1456,17 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockPause(IMFClockStateSink *
...
@@ -1436,11 +1456,17 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockPause(IMFClockStateSink *
EnterCriticalSection
(
&
renderer
->
cs
);
EnterCriticalSection
(
&
renderer
->
cs
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
IMFVideoPresenter_OnClockPause
(
renderer
->
presenter
,
systime
);
if
(
renderer
->
state
==
EVR_STATE_RUNNING
)
{
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkPaused
,
&
GUID_NULL
,
S_OK
,
NULL
);
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
IMFMediaEventQueue_QueueEventParamVar
(
stream
->
event_queue
,
MEStreamSinkPaused
,
&
GUID_NULL
,
S_OK
,
NULL
);
}
}
}
renderer
->
state
=
EVR_STATE_PAUSED
;
renderer
->
state
=
EVR_STATE_PAUSED
;
LeaveCriticalSection
(
&
renderer
->
cs
);
LeaveCriticalSection
(
&
renderer
->
cs
);
...
@@ -1457,6 +1483,8 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockRestart(IMFClockStateSink
...
@@ -1457,6 +1483,8 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockRestart(IMFClockStateSink
EnterCriticalSection
(
&
renderer
->
cs
);
EnterCriticalSection
(
&
renderer
->
cs
);
IMFVideoPresenter_OnClockRestart
(
renderer
->
presenter
,
systime
);
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
for
(
i
=
0
;
i
<
renderer
->
stream_count
;
++
i
)
{
{
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
struct
video_stream
*
stream
=
renderer
->
streams
[
i
];
...
...
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