Commit d2348911 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

wineqtdecoder: Implement base IQualityControl in QTOutPin.

parent 4c6a1983
...@@ -133,6 +133,7 @@ extern CLSID CLSID_QTSplitter; ...@@ -133,6 +133,7 @@ extern CLSID CLSID_QTSplitter;
typedef struct QTOutPin { typedef struct QTOutPin {
BaseOutputPin pin; BaseOutputPin pin;
IQualityControl IQualityControl_iface;
AM_MEDIA_TYPE * pmt; AM_MEDIA_TYPE * pmt;
OutputQueue * queue; OutputQueue * queue;
...@@ -1246,6 +1247,8 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p ...@@ -1246,6 +1247,8 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
*ppv = iface; *ppv = iface;
else if (IsEqualIID(riid, &IID_IMediaSeeking)) else if (IsEqualIID(riid, &IID_IMediaSeeking))
return IBaseFilter_QueryInterface(This->pin.pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv); return IBaseFilter_QueryInterface(This->pin.pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
else if (IsEqualIID(riid, &IID_IQualityControl))
*ppv = &This->IQualityControl_iface;
if (*ppv) if (*ppv)
{ {
...@@ -1346,6 +1349,52 @@ static const IPinVtbl QT_OutputPin_Vtbl = { ...@@ -1346,6 +1349,52 @@ static const IPinVtbl QT_OutputPin_Vtbl = {
BasePinImpl_NewSegment BasePinImpl_NewSegment
}; };
static inline QTOutPin *impl_from_IQualityControl( IQualityControl *iface )
{
return CONTAINING_RECORD(iface, QTOutPin, IQualityControl_iface);
}
HRESULT WINAPI QT_QualityControl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv)
{
QTOutPin *This = impl_from_IQualityControl(iface);
return IPin_QueryInterface(&This->pin.pin.IPin_iface, riid, ppv);
}
ULONG WINAPI QT_QualityControl_AddRef(IQualityControl *iface)
{
QTOutPin *This = impl_from_IQualityControl(iface);
return IPin_AddRef(&This->pin.pin.IPin_iface);
}
ULONG WINAPI QT_QualityControl_Release(IQualityControl *iface)
{
QTOutPin *This = impl_from_IQualityControl(iface);
return IPin_Release(&This->pin.pin.IPin_iface);
}
static HRESULT WINAPI QT_QualityControl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm)
{
REFERENCE_TIME late = qm.Late;
if (qm.Late < 0 && -qm.Late > qm.TimeStamp)
late = -qm.TimeStamp;
/* TODO: Do Something */
return S_OK;
}
HRESULT WINAPI QT_QualityControl_SetSink(IQualityControl *iface, IQualityControl *tonotify)
{
/* Do nothing */
return S_OK;
}
static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = {
QT_QualityControl_QueryInterface,
QT_QualityControl_AddRef,
QT_QualityControl_Release,
QT_QualityControl_Notify,
QT_QualityControl_SetSink
};
static const BasePinFuncTable output_BaseFuncTable = { static const BasePinFuncTable output_BaseFuncTable = {
NULL, NULL,
BaseOutputPinImpl_AttemptConnection, BaseOutputPinImpl_AttemptConnection,
...@@ -1386,6 +1435,7 @@ static HRESULT QT_AddPin(QTSplitter *This, const PIN_INFO *piOutput, const AM_ME ...@@ -1386,6 +1435,7 @@ static HRESULT QT_AddPin(QTSplitter *This, const PIN_INFO *piOutput, const AM_ME
pin->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); pin->pmt = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
CopyMediaType(pin->pmt, amt); CopyMediaType(pin->pmt, amt);
pin->pin.pin.pinInfo.pFilter = (LPVOID)This; pin->pin.pin.pinInfo.pFilter = (LPVOID)This;
pin->IQualityControl_iface.lpVtbl = &QTOutPin_QualityControl_Vtbl;
BaseFilterImpl_IncrementPinVersion(&This->filter); BaseFilterImpl_IncrementPinVersion(&This->filter);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment