summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/common/directshowpinenum.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-13 13:19:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-24 13:30:36 +0000
commit20e93ad5969d3dff85f0ef9e16830aee337ca075 (patch)
treef28235f63ba8a0857f9cf1e890784a104ac3e2d4 /src/plugins/directshow/common/directshowpinenum.h
parent6a2f332821ea3d8d4f6c11050d592aef0ad4df7f (diff)
Fix DirectShow COM class hierarchy
Remove the class DirectShowObject. Move the ref counting code to a macro COM_REF_MIXIN that is used for the classes that are actually instantiated. Fix warnings: common/directshowpin.h(56,5): warning: 'reinterpret_cast' from class 'DirectShowPin *' to its base at non-zero offset 'IUnknown *' behaves differently from 'static_cast' [-Wreinterpret-base-class] DIRECTSHOW_OBJECT ^~~~~~~~~~~~~~~~~ common/directshowobject.h(69,33): note: expanded from macro 'DIRECTSHOW_OBJECT' return GetInterface(reinterpret_cast<IUnknown*>(this), ppv); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/directshowpin.h(56,5): note: use 'static_cast' to adjust the pointer correctly while upcasting Task-number: QTBUG-63512 Task-number: QTBUG-64157 Change-Id: Ibef143d675cd169b78fe46ff5a0c83f6e3434487 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/directshow/common/directshowpinenum.h')
-rw-r--r--src/plugins/directshow/common/directshowpinenum.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/directshow/common/directshowpinenum.h b/src/plugins/directshow/common/directshowpinenum.h
index 77214e376..e1baa00c2 100644
--- a/src/plugins/directshow/common/directshowpinenum.h
+++ b/src/plugins/directshow/common/directshowpinenum.h
@@ -49,18 +49,15 @@ QT_BEGIN_NAMESPACE
class DirectShowBaseFilter;
-class DirectShowPinEnum : public DirectShowObject
- , public IEnumPins
+class DirectShowPinEnum : public IEnumPins
{
- DIRECTSHOW_OBJECT
-
+ COM_REF_MIXIN
public:
DirectShowPinEnum(DirectShowBaseFilter *filter);
DirectShowPinEnum(const QList<IPin *> &pins);
- ~DirectShowPinEnum();
+ virtual ~DirectShowPinEnum();
- // DirectShowObject
- HRESULT getInterface(REFIID riid, void **ppvObject);
+ STDMETHODIMP QueryInterface(REFIID riid, void **ppv) override;
// IEnumPins
STDMETHODIMP Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched);