Remove dependency on DECLARE_IUNKNOWN macro on Windows.

Bug: webrtc:10355
Change-Id: I8baea58a3523ed812a3a760ccde123d8405040df
Reviewed-on: https://webrtc-review.googlesource.com/c/124982
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26893}
This commit is contained in:
Tommi 2019-02-28 11:19:10 +01:00 committed by Commit Bot
parent 7c5541557b
commit 8f385e39fa
2 changed files with 20 additions and 5 deletions

View File

@ -424,6 +424,18 @@ void CaptureSinkFilter::ProcessCapturedFrame(
return;
}
STDMETHODIMP CaptureSinkFilter::QueryInterface(REFIID riid, void** ppv) {
return GetOwner()->QueryInterface(riid, ppv);
}
STDMETHODIMP_(ULONG) CaptureSinkFilter::AddRef() {
return GetOwner()->AddRef();
}
STDMETHODIMP_(ULONG) CaptureSinkFilter::Release() {
return GetOwner()->Release();
}
STDMETHODIMP CaptureSinkFilter::SetMatchingMediaType(
const VideoCaptureCapability& capability) {
LockReceive();

View File

@ -67,16 +67,19 @@ class CaptureSinkFilter : public CBaseFilter {
// --------------------------------------------------------------------
// COM interfaces
DECLARE_IUNKNOWN
STDMETHODIMP SetMatchingMediaType(const VideoCaptureCapability& capability);
STDMETHOD(QueryInterface)(REFIID riid, void** ppv) override;
STDMETHOD_(ULONG, AddRef)() override;
STDMETHOD_(ULONG, Release)() override;
STDMETHOD(SetMatchingMediaType)(const VideoCaptureCapability& capability);
// --------------------------------------------------------------------
// CBaseFilter methods
int GetPinCount() override;
CBasePin* GetPin(IN int Index) override;
STDMETHODIMP Pause() override;
STDMETHODIMP Stop() override;
STDMETHODIMP GetClassID(OUT CLSID* pCLSID) override;
STDMETHOD(Pause)() override;
STDMETHOD(Stop)() override;
STDMETHOD(GetClassID)(OUT CLSID* pCLSID) override;
// --------------------------------------------------------------------
// class factory calls this
static CUnknown* CreateInstance(IN LPUNKNOWN punk, OUT HRESULT* phr);