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.

124 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1998-1999 Microsoft Corporation
  3. Module Name:
  4. wavecall.h
  5. Abstract:
  6. Declaration of the CWaveMSPCall
  7. Author:
  8. Zoltan Szilagyi September 7th, 1998
  9. --*/
  10. #ifndef __WAVECALL_H_
  11. #define __WAVECALL_H_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CWaveMSPCall
  17. /////////////////////////////////////////////////////////////////////////////
  18. class CWaveMSPCall : public CMSPCallMultiGraph, public CMSPObjectSafetyImpl
  19. {
  20. public:
  21. // DECLARE_POLY_AGGREGATABLE(CWaveMSP)
  22. // To add extra interfaces to this class, use the following:
  23. BEGIN_COM_MAP(CWaveMSPCall)
  24. COM_INTERFACE_ENTRY( IObjectSafety )
  25. COM_INTERFACE_ENTRY_CHAIN(CMSPCallMultiGraph)
  26. END_COM_MAP()
  27. public:
  28. CWaveMSPCall();
  29. virtual ~CWaveMSPCall();
  30. virtual ULONG MSPCallAddRef(void);
  31. virtual ULONG MSPCallRelease(void);
  32. virtual HRESULT Init(
  33. IN CMSPAddress * pMSPAddress,
  34. IN MSP_HANDLE htCall,
  35. IN DWORD dwReserved,
  36. IN DWORD dwMediaType
  37. );
  38. virtual HRESULT CreateStreamObject(
  39. IN DWORD dwMediaType,
  40. IN TERMINAL_DIRECTION Direction,
  41. IN IMediaEvent * pGraph,
  42. IN ITStream ** ppStream
  43. );
  44. virtual HRESULT ReceiveTSPCallData(
  45. IN PBYTE pBuffer,
  46. IN DWORD dwSize
  47. );
  48. //
  49. // We override these to make sure the number of
  50. // streams we have is constant.
  51. //
  52. STDMETHOD (CreateStream) (
  53. IN long lMediaType,
  54. IN TERMINAL_DIRECTION Direction,
  55. IN OUT ITStream ** ppStream
  56. );
  57. STDMETHOD (RemoveStream) (
  58. IN ITStream * pStream
  59. );
  60. //
  61. // Public method called by the address to tell us the
  62. // per-address wave IDs. We hold on to them until
  63. // we know whether we have per-call waveids, and if we
  64. // don't, then we set them on the streams.
  65. //
  66. virtual HRESULT SetWaveIDs(
  67. IN DWORD dwWaveInID,
  68. IN DWORD dwWaveOutID
  69. );
  70. //
  71. // Public method for creating the filter mapper cache up front.
  72. // Called by the stream when an intelligent connection is
  73. // attempted. Simply forwarded to the call's owning address object.
  74. //
  75. virtual HRESULT CreateFilterMapper(void)
  76. {
  77. //
  78. // m_pMSPAddress is valid here, because it is released in
  79. // CMSPCallBase::FinalRelease, and FinalRelease cannot occur
  80. // until after all connection attempts are complete.
  81. //
  82. return ((CWaveMSP *) m_pMSPAddress)->CreateFilterMapper();
  83. }
  84. protected:
  85. //
  86. // Protected data members.
  87. //
  88. CWaveMSPStream * m_pRenderStream;
  89. CWaveMSPStream * m_pCaptureStream;
  90. BOOL m_fHavePerAddressWaveIDs;
  91. DWORD m_dwPerAddressWaveInID;
  92. DWORD m_dwPerAddressWaveOutID;
  93. };
  94. #endif //__WAVEADDR_H_