From 9ce718d0e9ae5afc9e0a6646dff63b6f6f6e49e7 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Tue, 9 Nov 2010 23:42:46 +0100 Subject: [PATCH] winegstreamer: Add QOS to transformer filters. --- dlls/winegstreamer/gsttffilter.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/gsttffilter.c b/dlls/winegstreamer/gsttffilter.c index e84ade72117..f56cc40d999 100644 --- a/dlls/winegstreamer/gsttffilter.c +++ b/dlls/winegstreamer/gsttffilter.c @@ -433,6 +433,12 @@ static HRESULT WINAPI Gstreamer_transform_NewSegment(TransformFilter *iface, REF return S_OK; } +static HRESULT WINAPI Gstreamer_transform_QOS(TransformFilter *iface, IBaseFilter *sender, Quality qm) { + GstTfImpl *This = (GstTfImpl*)iface; + gst_pad_push_event(This->my_sink, gst_event_new_qos(1000. / qm.Proportion, qm.Late * 100, qm.TimeStamp * 100)); + return QualityControlImpl_Notify((IQualityControl*)&iface->qcimpl, sender, qm); +} + static HRESULT Gstreamer_transform_create(IUnknown *punkout, const CLSID *clsid, const char *name, const TransformFilterFuncTable *vtbl, void **obj) { GstTfImpl *This; @@ -556,7 +562,8 @@ static const TransformFilterFuncTable Gstreamer_Mp3_vtbl = { Gstreamer_transform_EndOfStream, Gstreamer_transform_BeginFlush, Gstreamer_transform_EndFlush, - Gstreamer_transform_NewSegment + Gstreamer_transform_NewSegment, + Gstreamer_transform_QOS }; IUnknown * CALLBACK Gstreamer_Mp3_create(IUnknown *punkout, HRESULT *phr) @@ -687,7 +694,8 @@ static const TransformFilterFuncTable Gstreamer_YUV_vtbl = { Gstreamer_transform_EndOfStream, Gstreamer_transform_BeginFlush, Gstreamer_transform_EndFlush, - Gstreamer_transform_NewSegment + Gstreamer_transform_NewSegment, + Gstreamer_transform_QOS }; IUnknown * CALLBACK Gstreamer_YUV_create(IUnknown *punkout, HRESULT *phr) @@ -800,7 +808,8 @@ static const TransformFilterFuncTable Gstreamer_AudioConvert_vtbl = { Gstreamer_transform_EndOfStream, Gstreamer_transform_BeginFlush, Gstreamer_transform_EndFlush, - Gstreamer_transform_NewSegment + Gstreamer_transform_NewSegment, + Gstreamer_transform_QOS }; IUnknown * CALLBACK Gstreamer_AudioConvert_create(IUnknown *punkout, HRESULT *phr)