evr/mixer: Maintain streaming state flag.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e2a4b8a563
commit
14003b00f5
|
@ -89,6 +89,7 @@ struct video_mixer
|
||||||
IMFAttributes *attributes;
|
IMFAttributes *attributes;
|
||||||
IMFAttributes *internal_attributes;
|
IMFAttributes *internal_attributes;
|
||||||
unsigned int mixing_flags;
|
unsigned int mixing_flags;
|
||||||
|
unsigned int is_streaming;
|
||||||
COLORREF bkgnd_color;
|
COLORREF bkgnd_color;
|
||||||
LONGLONG lower_bound;
|
LONGLONG lower_bound;
|
||||||
LONGLONG upper_bound;
|
LONGLONG upper_bound;
|
||||||
|
@ -984,6 +985,17 @@ static HRESULT WINAPI video_mixer_transform_ProcessMessage(IMFTransform *iface,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MFT_MESSAGE_NOTIFY_BEGIN_STREAMING:
|
||||||
|
case MFT_MESSAGE_NOTIFY_END_STREAMING:
|
||||||
|
|
||||||
|
EnterCriticalSection(&mixer->cs);
|
||||||
|
|
||||||
|
mixer->is_streaming = message == MFT_MESSAGE_NOTIFY_BEGIN_STREAMING;
|
||||||
|
|
||||||
|
LeaveCriticalSection(&mixer->cs);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case MFT_MESSAGE_COMMAND_DRAIN:
|
case MFT_MESSAGE_COMMAND_DRAIN:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1016,6 +1028,7 @@ static HRESULT WINAPI video_mixer_transform_ProcessInput(IMFTransform *iface, DW
|
||||||
hr = MF_E_NOTACCEPTING;
|
hr = MF_E_NOTACCEPTING;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
mixer->is_streaming = 1;
|
||||||
input->sample = sample;
|
input->sample = sample;
|
||||||
IMFSample_AddRef(input->sample);
|
IMFSample_AddRef(input->sample);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue