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.

189 lines
4.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. ConfStrm.h
  5. Abstract:
  6. Definitions for CIPConfMSPStream class.
  7. Author:
  8. Mu Han (muhan) 1-November-1997
  9. --*/
  10. #ifndef __CONFSTRM_H
  11. #define __CONFSTRM_H
  12. #include <amrtpnet.h> // rtp guilds
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CIPConfMSPStream
  15. /////////////////////////////////////////////////////////////////////////////
  16. //#define DEBUG_REFCOUNT
  17. #ifdef DEBUG_REFCOUNT
  18. extern LONG g_lStreamObjects;
  19. #endif
  20. class ATL_NO_VTABLE CIPConfMSPStream :
  21. public CMSPStream,
  22. public CMSPObjectSafetyImpl
  23. {
  24. public:
  25. BEGIN_COM_MAP(CIPConfMSPStream)
  26. COM_INTERFACE_ENTRY(IObjectSafety)
  27. COM_INTERFACE_ENTRY_CHAIN(CMSPStream)
  28. END_COM_MAP()
  29. CIPConfMSPStream();
  30. #ifdef DEBUG_REFCOUNT
  31. ULONG InternalAddRef();
  32. ULONG InternalRelease();
  33. #endif
  34. DWORD MediaType() const { return m_dwMediaType; }
  35. TERMINAL_DIRECTION Direction() const { return m_Direction; }
  36. BOOL IsConfigured();
  37. virtual HRESULT Configure(
  38. IN STREAMSETTINGS &StreamSettings
  39. ) = 0;
  40. // CMSPStream methods.
  41. HRESULT ShutDown ();
  42. // ITStream
  43. STDMETHOD (get_Name) (
  44. OUT BSTR * ppName
  45. );
  46. STDMETHOD (StartStream) ();
  47. STDMETHOD (PauseStream) ();
  48. STDMETHOD (StopStream) ();
  49. STDMETHOD (SelectTerminal)(
  50. IN ITTerminal * pTerminal
  51. );
  52. STDMETHOD (UnselectTerminal)(
  53. IN ITTerminal * pTerminal
  54. );
  55. // methods called by the MSPCall object.
  56. HRESULT Init(
  57. IN HANDLE hAddress,
  58. IN CMSPCallBase * pMSPCall,
  59. IN IMediaEvent * pGraph,
  60. IN DWORD dwMediaType,
  61. IN TERMINAL_DIRECTION Direction
  62. );
  63. HRESULT SetLocalParticipantInfo(
  64. IN PARTICIPANT_TYPED_INFO InfoType,
  65. IN char * pInfo,
  66. IN DWORD dwLen
  67. );
  68. // Called by stream and substream to send event to tapi.
  69. virtual HRESULT SendStreamEvent(
  70. IN MSP_CALL_EVENT Event,
  71. IN MSP_CALL_EVENT_CAUSE Cause,
  72. IN HRESULT hrError,
  73. IN ITTerminal * pTerminal
  74. );
  75. protected:
  76. HRESULT ProcessGraphEvent(
  77. IN long lEventCode,
  78. IN long lParam1,
  79. IN long lParam2
  80. );
  81. virtual HRESULT CheckTerminalTypeAndDirection(
  82. IN ITTerminal * pTerminal
  83. );
  84. virtual HRESULT ConnectTerminal(
  85. IN ITTerminal * pITTerminal
  86. ) = 0;
  87. virtual HRESULT DisconnectTerminal(
  88. IN ITTerminal * pITTerminal
  89. );
  90. virtual HRESULT InternalConfigure();
  91. virtual HRESULT SetUpFilters() = 0;
  92. virtual HRESULT CleanUpFilters();
  93. virtual HRESULT ProcessParticipantTimeOutOrRecovered(
  94. IN BOOL fTimeOutOrRecovered,
  95. IN DWORD dwSSRC
  96. );
  97. virtual HRESULT ProcessRTCPReport(
  98. IN DWORD dwSSRC,
  99. IN DWORD dwSendRecv
  100. );
  101. virtual HRESULT ProcessParticipantLeave(
  102. IN DWORD dwSSRC
  103. );
  104. virtual HRESULT ProcessQOSEvent(
  105. IN long lEventCode
  106. );
  107. virtual HRESULT ProcessNewSender(
  108. IN DWORD dwSSRC,
  109. IN ITParticipant *pITParticipant
  110. );
  111. virtual HRESULT ProcessNewParticipant(
  112. IN int index,
  113. IN DWORD dwSSRC,
  114. IN DWORD dwSendRecv,
  115. IN char * szCName,
  116. OUT ITParticipant ** ppITParticipant
  117. );
  118. virtual HRESULT NewParticipantPostProcess(
  119. IN DWORD dwSSRC,
  120. IN ITParticipant *pITParticipant
  121. );
  122. virtual HRESULT SetLocalInfoOnRTPFilter(
  123. IN IBaseFilter * pRTPFilter
  124. );
  125. protected:
  126. const WCHAR * m_szName;
  127. const GUID * m_pClsidPHFilter;
  128. const GUID * m_pClsidCodecFilter;
  129. const GUID * m_pRPHInputMinorType; //only used in receiving stream.
  130. BOOL m_fIsConfigured;
  131. STREAMSETTINGS m_Settings;
  132. IBaseFilter * m_pEdgeFilter;
  133. IRTPParticipant * m_pRTPFilter;
  134. // The list of participant in the stream.
  135. CParticipantList m_Participants;
  136. // the local info needed to be set on the RTP filter.
  137. char * m_InfoItems[RTCP_SDES_LAST - 1];
  138. };
  139. #endif