2 * Quality Control Interfaces
4 * Copyright 2010 Maarten Lankhorst for Codeweavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #include "wine/strmbase.h"
27 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(strmbase
);
33 void QualityControlImpl_init(QualityControlImpl
*This
, IPin
*input
, IBaseFilter
*self
) {
36 This
->tonotify
= NULL
;
39 HRESULT WINAPI
QualityControlImpl_QueryInterface(IQualityControl
*iface
, REFIID riid
, void **ppv
) {
40 QualityControlImpl
*This
= (QualityControlImpl
*)iface
;
41 return IUnknown_QueryInterface(This
->self
, riid
, ppv
);
44 ULONG WINAPI
QualityControlImpl_AddRef(IQualityControl
*iface
) {
45 QualityControlImpl
*This
= (QualityControlImpl
*)iface
;
46 return IUnknown_AddRef(This
->self
);
49 ULONG WINAPI
QualityControlImpl_Release(IQualityControl
*iface
) {
50 QualityControlImpl
*This
= (QualityControlImpl
*)iface
;
51 return IUnknown_Release(This
->self
);
54 HRESULT WINAPI
QualityControlImpl_Notify(IQualityControl
*iface
, IBaseFilter
*sender
, Quality qm
) {
56 QualityControlImpl
*This
= (QualityControlImpl
*)iface
;
58 return IQualityControl_Notify(This
->tonotify
, This
->self
, qm
);
61 IPin_ConnectedTo(This
->input
, &to
);
63 IQualityControl
*qc
= NULL
;
64 IUnknown_QueryInterface(to
, &IID_IQualityControl
, (void**)&qc
);
66 hr
= IQualityControl_Notify(qc
, This
->self
, qm
);
67 IQualityControl_Release(qc
);
75 HRESULT WINAPI
QualityControlImpl_SetSink(IQualityControl
*iface
, IQualityControl
*tonotify
) {
76 QualityControlImpl
*This
= (QualityControlImpl
*)iface
;
77 This
->tonotify
= tonotify
;