amextra.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //------------------------------------------------------------------------------
  2. // File: AMExtra.h
  3. //
  4. // Desc: DirectShow base classes.
  5. //
  6. // Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
  7. //------------------------------------------------------------------------------
  8. #ifndef __AMEXTRA__
  9. #define __AMEXTRA__
  10. // Simple rendered input pin
  11. //
  12. // NOTE if your filter queues stuff before rendering then it may not be
  13. // appropriate to use this class
  14. //
  15. // In that case queue the end of stream condition until the last sample
  16. // is actually rendered and flush the condition appropriately
  17. class CRenderedInputPin : public CBaseInputPin
  18. {
  19. public:
  20. CRenderedInputPin(__in_opt LPCTSTR pObjectName,
  21. __in CBaseFilter *pFilter,
  22. __in CCritSec *pLock,
  23. __inout HRESULT *phr,
  24. __in_opt LPCWSTR pName);
  25. #ifdef UNICODE
  26. CRenderedInputPin(__in_opt LPCSTR pObjectName,
  27. __in CBaseFilter *pFilter,
  28. __in CCritSec *pLock,
  29. __inout HRESULT *phr,
  30. __in_opt LPCWSTR pName);
  31. #endif
  32. // Override methods to track end of stream state
  33. STDMETHODIMP EndOfStream();
  34. STDMETHODIMP EndFlush();
  35. HRESULT Active();
  36. HRESULT Run(REFERENCE_TIME tStart);
  37. protected:
  38. // Member variables to track state
  39. BOOL m_bAtEndOfStream; // Set by EndOfStream
  40. BOOL m_bCompleteNotified; // Set when we notify for EC_COMPLETE
  41. private:
  42. void DoCompleteHandling();
  43. };
  44. #endif // __AMEXTRA__