Bug 1322459 part 1 - Remove duplicate mRefCnt in CaptureSinkFilter. r?ehsan
MozReview-Commit-ID: IdIjzeMI9fI
--- a/media/webrtc/trunk/webrtc/modules/video_capture/windows/sink_filter_ds.h
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/windows/sink_filter_ds.h
@@ -76,31 +76,16 @@ public:
void SetFilterGraph(IGraphBuilder* graph); // Used if EVR
// --------------------------------------------------------------------
// COM interfaces
STDMETHODIMP QueryInterface(REFIID aIId, void **aInterface)
{
return mozilla::media::BaseFilter::QueryInterface(aIId, aInterface);
}
- STDMETHODIMP_(ULONG) AddRef()
- {
- return ::InterlockedIncrement(&mRefCnt);
- }
-
- STDMETHODIMP_(ULONG) Release()
- {
- unsigned long newRefCnt = ::InterlockedDecrement(&mRefCnt);
-
- if (!newRefCnt) {
- delete this;
- }
-
- return newRefCnt;
- }
STDMETHODIMP SetMatchingMediaType(const VideoCaptureCapability& capability);
// --------------------------------------------------------------------
// CBaseFilter methods
int GetPinCount ();
mozilla::media::BasePin * GetPin ( IN int Index);
STDMETHODIMP Pause ();
@@ -110,13 +95,12 @@ public:
// class factory calls this
static IUnknown * CreateInstance (IN LPUNKNOWN punk, OUT HRESULT * phr);
private:
mozilla::CriticalSection m_crtFilter; // filter lock
mozilla::CriticalSection m_crtRecv; // receiver lock; always acquire before filter lock
CaptureInputPin * m_pInput;
VideoCaptureExternal& _captureObserver;
int32_t _moduleId;
- unsigned long mRefCnt;
};
} // namespace videocapturemodule
} // namespace webrtc
#endif // WEBRTC_MODULES_VIDEO_CAPTURE_MAIN_SOURCE_WINDOWS_SINK_FILTER_DS_H_