diff options
author | Liong Sauw Ming <ming@teluu.com> | 2012-04-18 02:38:42 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2012-04-18 02:38:42 +0000 |
commit | be78f596a56580ae6984895355168376d49d9099 (patch) | |
tree | 7ebce483258005e403f973dac299c435675b53bf /third_party/BaseClasses/amextra.h | |
parent | 64f7c5f55ec54621141ba3676298510dcf0bdb70 (diff) |
Fixed #1276: Add baseclasses sample in third_party directory required by dshow_dev
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4061 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/BaseClasses/amextra.h')
-rw-r--r-- | third_party/BaseClasses/amextra.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/third_party/BaseClasses/amextra.h b/third_party/BaseClasses/amextra.h new file mode 100644 index 00000000..5a861bf1 --- /dev/null +++ b/third_party/BaseClasses/amextra.h @@ -0,0 +1,56 @@ +//------------------------------------------------------------------------------
+// File: AMExtra.h
+//
+// Desc: DirectShow base classes.
+//
+// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
+//------------------------------------------------------------------------------
+
+
+#ifndef __AMEXTRA__
+#define __AMEXTRA__
+
+// Simple rendered input pin
+//
+// NOTE if your filter queues stuff before rendering then it may not be
+// appropriate to use this class
+//
+// In that case queue the end of stream condition until the last sample
+// is actually rendered and flush the condition appropriately
+
+class CRenderedInputPin : public CBaseInputPin
+{
+public:
+
+ CRenderedInputPin(__in_opt LPCTSTR pObjectName,
+ __in CBaseFilter *pFilter,
+ __in CCritSec *pLock,
+ __inout HRESULT *phr,
+ __in_opt LPCWSTR pName);
+#ifdef UNICODE
+ CRenderedInputPin(__in_opt LPCSTR pObjectName,
+ __in CBaseFilter *pFilter,
+ __in CCritSec *pLock,
+ __inout HRESULT *phr,
+ __in_opt LPCWSTR pName);
+#endif
+
+ // Override methods to track end of stream state
+ STDMETHODIMP EndOfStream();
+ STDMETHODIMP EndFlush();
+
+ HRESULT Active();
+ HRESULT Run(REFERENCE_TIME tStart);
+
+protected:
+
+ // Member variables to track state
+ BOOL m_bAtEndOfStream; // Set by EndOfStream
+ BOOL m_bCompleteNotified; // Set when we notify for EC_COMPLETE
+
+private:
+ void DoCompleteHandling();
+};
+
+#endif // __AMEXTRA__
+
|