Leaked source code of windows server 2003
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.

156 lines
3.8 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: cni.h
  4. //
  5. // Description: Connect Node Instance Class
  6. //
  7. //
  8. //@@BEGIN_MSINTERNAL
  9. // Development Team:
  10. // Mike McLaughlin
  11. //
  12. // History: Date Author Comment
  13. //
  14. //@@END_MSINTERNAL
  15. //---------------------------------------------------------------------------
  16. //
  17. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  18. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  19. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  20. // PURPOSE.
  21. //
  22. // Copyright (c) 1996-1999 Microsoft Corporation. All Rights Reserved.
  23. //
  24. //---------------------------------------------------------------------------
  25. //---------------------------------------------------------------------------
  26. // Constants and Macros
  27. //---------------------------------------------------------------------------
  28. //---------------------------------------------------------------------------
  29. // Classes
  30. //---------------------------------------------------------------------------
  31. typedef class CConnectNodeInstance : public CListMultiItem
  32. {
  33. friend class CStartNodeInstance;
  34. private:
  35. CConnectNodeInstance(
  36. IN PCONNECT_NODE pConnectNode
  37. );
  38. ~CConnectNodeInstance(
  39. );
  40. public:
  41. static NTSTATUS
  42. Create(
  43. PSTART_NODE_INSTANCE pStartNodeInstance,
  44. PDEVICE_NODE pDeviceNode
  45. );
  46. VOID
  47. AddRef(
  48. )
  49. {
  50. Assert(this);
  51. ++cReference;
  52. };
  53. NTSTATUS
  54. AddListEnd(
  55. PCLIST_MULTI plm
  56. );
  57. ENUMFUNC
  58. Destroy(
  59. );
  60. BOOL
  61. IsTopDown(
  62. )
  63. {
  64. Assert(this);
  65. return(pConnectNode->IsTopDown());
  66. };
  67. NTSTATUS
  68. Connect(
  69. IN PWAVEFORMATEX pWaveFormatEx,
  70. IN PKSPIN_CONNECT pPinConnectDirect
  71. );
  72. NTSTATUS
  73. SetStateTopDown(
  74. KSSTATE NewState,
  75. KSSTATE PreviousState,
  76. ULONG ulFlags
  77. );
  78. NTSTATUS
  79. SetStateBottomUp(
  80. KSSTATE NewState,
  81. KSSTATE PreviousState,
  82. ULONG ulFlags
  83. );
  84. private:
  85. BOOL fRender;
  86. LONG cReference;
  87. PCONNECT_NODE pConnectNode;
  88. PFILTER_NODE_INSTANCE pFilterNodeInstanceSource;
  89. PFILTER_NODE_INSTANCE pFilterNodeInstanceSink;
  90. PPIN_NODE_INSTANCE pPinNodeInstanceSource;
  91. PPIN_NODE_INSTANCE pPinNodeInstanceSink;
  92. public:
  93. DefineSignature(0x20494E43); // CNI
  94. } CONNECT_NODE_INSTANCE, *PCONNECT_NODE_INSTANCE;
  95. //---------------------------------------------------------------------------
  96. typedef ListMultiDestroy<CONNECT_NODE_INSTANCE> LIST_CONNECT_NODE_INSTANCE;
  97. typedef LIST_CONNECT_NODE_INSTANCE *PLIST_CONNECT_NODE_INSTANCE;
  98. //---------------------------------------------------------------------------
  99. // Local prototypes
  100. //---------------------------------------------------------------------------
  101. NTSTATUS
  102. CreatePinConnect(
  103. PKSPIN_CONNECT *ppPinConnect,
  104. PCONNECT_NODE pConnectNode,
  105. PFILTER_NODE_INSTANCE pFilterNodeInstanceSink,
  106. PFILTER_NODE_INSTANCE pFilterNodeInstanceSource,
  107. PWAVEFORMATEX pWaveFormatExLimit
  108. );
  109. NTSTATUS
  110. CreatePinIntersection(
  111. PKSPIN_CONNECT *ppPinConnect,
  112. PPIN_NODE pPinNode1,
  113. PPIN_NODE pPinNode2,
  114. PFILTER_NODE_INSTANCE pFilterNodeInstance1,
  115. PFILTER_NODE_INSTANCE pFilterNodeInstance2
  116. );
  117. NTSTATUS
  118. CreateWaveFormatEx(
  119. PKSPIN_CONNECT *ppPinConnect,
  120. PCONNECT_NODE pConnectNode,
  121. PWAVEFORMATEX pWaveFormatExLimit
  122. );
  123. VOID
  124. WaveFormatFromAudioRange(
  125. PKSDATARANGE_AUDIO pDataRangeAudio,
  126. WAVEFORMATEX *pWavFormatEx
  127. );
  128. BOOL
  129. LimitAudioRangeToWave(
  130. PWAVEFORMATEX pWaveFormatEx,
  131. PKSDATARANGE_AUDIO pDataRangeAudio
  132. );
  133. //---------------------------------------------------------------------------