mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
evr/filter: Notify mixer and presenter on state changes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
57d1bad106
commit
50cd67d069
1 changed files with 35 additions and 0 deletions
|
@ -312,6 +312,38 @@ static HRESULT evr_query_accept(struct strmbase_renderer *iface, const AM_MEDIA_
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: errors should be propagated from init/start/stop handlers. */
|
||||||
|
static void evr_init_stream(struct strmbase_renderer *iface)
|
||||||
|
{
|
||||||
|
struct evr *filter = impl_from_strmbase_renderer(iface);
|
||||||
|
|
||||||
|
if (!filter->mixer) return;
|
||||||
|
|
||||||
|
if (SUCCEEDED(IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_BEGIN_STREAMING, 0)))
|
||||||
|
IMFVideoPresenter_ProcessMessage(filter->presenter, MFVP_MESSAGE_BEGINSTREAMING, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void evr_start_stream(struct strmbase_renderer *iface)
|
||||||
|
{
|
||||||
|
struct evr *filter = impl_from_strmbase_renderer(iface);
|
||||||
|
|
||||||
|
if (filter->mixer)
|
||||||
|
IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_START_OF_STREAM, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void evr_stop_stream(struct strmbase_renderer *iface)
|
||||||
|
{
|
||||||
|
struct evr *filter = impl_from_strmbase_renderer(iface);
|
||||||
|
|
||||||
|
if (!filter->mixer) return;
|
||||||
|
|
||||||
|
if (SUCCEEDED(IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_END_OF_STREAM, 0)))
|
||||||
|
{
|
||||||
|
if (SUCCEEDED(IMFVideoPresenter_ProcessMessage(filter->presenter, MFVP_MESSAGE_ENDSTREAMING, 0)))
|
||||||
|
IMFTransform_ProcessMessage(filter->mixer, MFT_MESSAGE_NOTIFY_END_STREAMING, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const struct strmbase_renderer_ops renderer_ops =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.renderer_query_accept = evr_query_accept,
|
.renderer_query_accept = evr_query_accept,
|
||||||
|
@ -320,6 +352,9 @@ static const struct strmbase_renderer_ops renderer_ops =
|
||||||
.renderer_connect = evr_connect,
|
.renderer_connect = evr_connect,
|
||||||
.renderer_disconnect = evr_disconnect,
|
.renderer_disconnect = evr_disconnect,
|
||||||
.renderer_destroy = evr_destroy,
|
.renderer_destroy = evr_destroy,
|
||||||
|
.renderer_init_stream = evr_init_stream,
|
||||||
|
.renderer_start_stream = evr_start_stream,
|
||||||
|
.renderer_stop_stream = evr_stop_stream,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct evr *impl_from_IEVRFilterConfig(IEVRFilterConfig *iface)
|
static struct evr *impl_from_IEVRFilterConfig(IEVRFilterConfig *iface)
|
||||||
|
|
Loading…
Reference in a new issue