mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
mf/samplegrabber: Send MEStreamSinkScrubSampleComplete event.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
ec7d032b16
commit
9706a70bda
1 changed files with 11 additions and 0 deletions
|
@ -83,6 +83,7 @@ struct sample_grabber
|
|||
IUnknown *cancel_key;
|
||||
UINT32 ignore_clock;
|
||||
UINT64 sample_time_offset;
|
||||
float rate;
|
||||
enum sink_state state;
|
||||
CRITICAL_SECTION cs;
|
||||
};
|
||||
|
@ -1138,7 +1139,13 @@ static HRESULT sample_grabber_set_state(struct sample_grabber *grabber, enum sin
|
|||
}
|
||||
do_callback = state != grabber->state || state != SINK_STATE_PAUSED;
|
||||
if (do_callback)
|
||||
{
|
||||
if (grabber->rate == 0.0f && state == SINK_STATE_RUNNING)
|
||||
IMFStreamSink_QueueEvent(&grabber->IMFStreamSink_iface, MEStreamSinkScrubSampleComplete,
|
||||
&GUID_NULL, S_OK, NULL);
|
||||
|
||||
IMFStreamSink_QueueEvent(&grabber->IMFStreamSink_iface, events[state], &GUID_NULL, S_OK, NULL);
|
||||
}
|
||||
grabber->state = state;
|
||||
}
|
||||
}
|
||||
|
@ -1212,7 +1219,10 @@ static HRESULT WINAPI sample_grabber_clock_sink_OnClockSetRate(IMFClockStateSink
|
|||
if (grabber->is_shut_down)
|
||||
hr = MF_E_SHUTDOWN;
|
||||
else
|
||||
{
|
||||
IMFStreamSink_QueueEvent(&grabber->IMFStreamSink_iface, MEStreamSinkRateChanged, &GUID_NULL, S_OK, NULL);
|
||||
grabber->rate = rate;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&grabber->cs);
|
||||
|
||||
|
@ -1433,6 +1443,7 @@ static HRESULT sample_grabber_create_object(IMFAttributes *attributes, void *use
|
|||
object->IMFMediaTypeHandler_iface.lpVtbl = &sample_grabber_stream_type_handler_vtbl;
|
||||
object->timer_callback.lpVtbl = &sample_grabber_stream_timer_callback_vtbl;
|
||||
object->refcount = 1;
|
||||
object->rate = 1.0f;
|
||||
if (FAILED(IMFSampleGrabberSinkCallback_QueryInterface(context->callback, &IID_IMFSampleGrabberSinkCallback2,
|
||||
(void **)&object->callback2)))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue