Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. ConfStrm.h
  5. Abstract:
  6. Definitions for CH323MSPStream class.
  7. Author:
  8. Mu Han (muhan) 1-November-1997
  9. --*/
  10. #ifndef __CONFSTRM_H
  11. #define __CONFSTRM_H
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CH323MSPStream
  14. /////////////////////////////////////////////////////////////////////////////
  15. const DWORD DEFAULT_TTL = 127;
  16. //#define DEBUG_REFCOUNT
  17. #ifdef DEBUG_REFCOUNT
  18. extern LONG g_lStreamObjects;
  19. #endif
  20. class CH323MSPStream :
  21. public CMSPStream,
  22. public CMSPObjectSafetyImpl
  23. {
  24. public:
  25. BEGIN_COM_MAP(CH323MSPStream)
  26. COM_INTERFACE_ENTRY(IObjectSafety)
  27. COM_INTERFACE_ENTRY_CHAIN(CMSPStream)
  28. END_COM_MAP()
  29. CH323MSPStream();
  30. DWORD MediaType() const { return m_dwMediaType; }
  31. TERMINAL_DIRECTION Direction() const { return m_Direction; }
  32. HANDLE TSPChannel();
  33. BOOL IsConfigured();
  34. BOOL IsTerminalSelected();
  35. VOID CallConnect();
  36. #ifdef DEBUG_REFCOUNT
  37. ULONG InternalAddRef();
  38. ULONG InternalRelease();
  39. #endif
  40. virtual HRESULT Configure(
  41. IN HANDLE htChannel,
  42. IN STREAMSETTINGS &StreamSettings
  43. ) = 0;
  44. virtual HRESULT SendIFrame() { return S_OK; }
  45. virtual HRESULT ChangeMaxBitRate(DWORD dwMaxBitRate) { return S_OK; }
  46. // CMSPStream methods.
  47. HRESULT ShutDown ();
  48. // ITStream
  49. STDMETHOD (get_Name) (
  50. OUT BSTR * ppName
  51. );
  52. STDMETHOD (StartStream) ();
  53. STDMETHOD (PauseStream) ();
  54. STDMETHOD (StopStream) ();
  55. STDMETHOD (SelectTerminal)(
  56. IN ITTerminal * pTerminal
  57. );
  58. STDMETHOD (UnselectTerminal)(
  59. IN ITTerminal * pTerminal
  60. );
  61. protected:
  62. virtual HRESULT CheckTerminalTypeAndDirection(
  63. IN ITTerminal * pTerminal
  64. );
  65. virtual HRESULT SendStreamEvent(
  66. IN MSP_CALL_EVENT Event,
  67. IN MSP_CALL_EVENT_CAUSE Cause,
  68. IN HRESULT hrError,
  69. IN ITTerminal * pTerminal
  70. );
  71. virtual HRESULT ConnectTerminal(
  72. IN ITTerminal * pITTerminal
  73. ) = 0;
  74. virtual HRESULT DisconnectTerminal(
  75. IN ITTerminal * pITTerminal
  76. );
  77. virtual HRESULT InternalConfigure();
  78. virtual HRESULT SetUpFilters() = 0;
  79. virtual HRESULT CleanUpFilters();
  80. HRESULT ProcessGraphEvent(
  81. IN long lEventCode,
  82. IN long lParam1,
  83. IN long lParam2
  84. );
  85. virtual HRESULT ProcessQOSEvent(
  86. IN long lEventCode
  87. );
  88. virtual HRESULT HandlePacketReceiveLoss(
  89. IN DWORD dwLossRate
  90. );
  91. virtual HRESULT HandlePacketTransmitLoss(
  92. IN DWORD dwLossRate
  93. );
  94. protected:
  95. const WCHAR * m_szName;
  96. const GUID * m_pClsidPHFilter;
  97. const GUID * m_pClsidCodecFilter;
  98. const GUID * m_pRPHInputMinorType; // only used in receiving stream.
  99. BOOL m_fNeedsToOpenChannel;
  100. BOOL m_fIsConfigured;
  101. STREAMSETTINGS m_Settings;
  102. IBaseFilter * m_pEdgeFilter;
  103. HANDLE m_htChannel;
  104. };
  105. #endif