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.

151 lines
3.7 KiB

  1. /****************************************************************************
  2. *
  3. * $Archive: S:/STURGEON/SRC/INCLUDE/VCS/ppmif.h_v $
  4. *
  5. * INTEL Corporation Prorietary Information
  6. *
  7. * This listing is supplied under the terms of a license agreement
  8. * with INTEL Corporation and may not be copied nor disclosed except
  9. * in accordance with the terms of that agreement.
  10. *
  11. * Copyright (c) 1993-1996 Intel Corporation.
  12. *
  13. * $Revision: 1.10 $
  14. * $Date: 30 Jul 1996 15:18:58 $
  15. * $Author: SLI $
  16. *
  17. * Deliverable: audmsp32.dll
  18. *
  19. * Abstract: 32-bit Audio Source/Sink Media Service Provider code.
  20. *
  21. * Notes:
  22. *
  23. ***************************************************************************/
  24. #ifndef PPMIF_H
  25. #define PPMIF_H
  26. #include "ippm.h" // PPM interface include file
  27. // Includes isubmit.h
  28. #define ulong ULONG
  29. #define MAX_PPM_PACKET_SIZE 1000
  30. #define G723_CODEC 723
  31. #define G711_ALAW_CODEC 711
  32. #define G711_MULAW_CODEC 712
  33. #define H263_CODEC 263
  34. #define H261_CODEC 261
  35. #define IVI41_CODEC 41
  36. #define LH_CODEC 111
  37. #define GENERIC_CODEC 999
  38. extern BOOL bCOMInitialized;
  39. // MSP COM Interfaces to provide to PPM
  40. // The Send and Receive interfaces use ISubmit/ISubmitCallback. The new interface
  41. // also implies that the SRC (ISubmit) side allocates and manages buffers.
  42. class MSPISubmit : public ISubmit
  43. {
  44. public:
  45. LPVOID m_pToken;
  46. LPVOID m_pParent;
  47. ISubmitCallback* m_pPPMISubmitCallback;
  48. // IUnknown Interface functions
  49. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  50. STDMETHODIMP_ ( ULONG )AddRef(void){ return 0; }
  51. STDMETHODIMP_ ( ULONG )Release(void){ return 0; }
  52. // ISubmit functions
  53. STDMETHOD(InitSubmit)(ISubmitCallback* pSubmitCallback);
  54. STDMETHOD(Submit)(WSABUF* pWSABuffer, DWORD BufferCount, void *pUserToken, HRESULT Error);
  55. STDMETHOD_(void,ReportError)(HRESULT Error);
  56. STDMETHOD(Flush)(void);
  57. // Constructor and Destructor
  58. MSPISubmit(LPVOID pToken, LPVOID pParent); // { m_pPPMISubmitCallback = NULL; }
  59. ~MSPISubmit();
  60. };
  61. class MSPISubmitCB : public ISubmitCallback
  62. {
  63. public:
  64. LPVOID m_pToken;
  65. // IUnknown Interface functions
  66. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  67. STDMETHODIMP_ ( ULONG )AddRef(void){ return 0; }
  68. STDMETHODIMP_ ( ULONG )Release(void){ return 0; }
  69. // ISubmitCallback functions
  70. STDMETHOD_(void,SubmitComplete)(void *pUserToken, HRESULT Error);
  71. STDMETHOD_(void,ReportError)(HRESULT Error, int Value);
  72. MSPISubmitCB(LPVOID pToken);
  73. ~MSPISubmitCB() {};
  74. };
  75. class MSPPPMInterface
  76. {
  77. public:
  78. // Our interfaces to PPM
  79. MSPISubmit *pMSPISubmit;
  80. MSPISubmitCB *pMSPISubmitCB;
  81. public:
  82. // PPM's interfaces we call
  83. ISubmit *pPPMISubmit;
  84. ISubmitUser *pPPMISubmitUser;
  85. ISubmitCallback *pPPMISubmitCB;
  86. // PPM's interface to initialize either send or receive
  87. IPPMSend *pPPMInitISend;
  88. IPPMReceive *pPPMInitIReceive;
  89. // Constructor and destructor
  90. MSPPPMInterface ();
  91. ~MSPPPMInterface ();
  92. BOOL InitMSPPPMInterface (LPVOID pToken, BOOL IsSrcMsp, UINT CodecType);
  93. BOOL InitMSPPPMInterface (LPVOID pToken, BOOL IsSrcMsp, GUID guidPPMClass);
  94. HRESULT Submit(WSABUF *pWSABuffer,
  95. DWORD BufferCount,
  96. void *pCookie);
  97. HRESULT Submit(WSABUF *pWSABuffer,
  98. DWORD BufferCount,
  99. void *pCookie,
  100. HRESULT hresult);
  101. void SubmitComplete(void *pCookie,
  102. HRESULT Error);
  103. void SetSession (PPMSESSPARAM_T *pSessparam);
  104. void Flush();
  105. private:
  106. BOOL m_bIsSrcMsp;
  107. };
  108. extern void
  109. ProcessSubmitCompleteFromPPM
  110. (
  111. LPVOID pToken,
  112. LPVOID pCookie,
  113. DWORD dwError
  114. );
  115. extern HRESULT
  116. ProcessSubmitFromPPM
  117. (
  118. LPVOID pToken,
  119. LPWSABUF pWSABuf,
  120. DWORD dwBufferCount,
  121. LPVOID pCookie
  122. );
  123. #endif