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.

103 lines
2.6 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: pni.h
  4. //
  5. // Description: Pin 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. #define SETSTATE_FLAG_IGNORE_ERROR 0x00000001
  29. #define SETSTATE_FLAG_SINK 0x00000002
  30. #define SETSTATE_FLAG_SOURCE 0x00000004
  31. #define MAX_STATES (KSSTATE_RUN+1)
  32. // Enable temp fix for LEAKING the last portion of previous sound.
  33. #define FIX_SOUND_LEAK 1
  34. //---------------------------------------------------------------------------
  35. // Classes
  36. //---------------------------------------------------------------------------
  37. #ifdef DEBUG
  38. typedef class CPinNodeInstance : public CListMultiItem
  39. #else
  40. typedef class CPinNodeInstance : public CObj
  41. #endif
  42. {
  43. private:
  44. ~CPinNodeInstance(
  45. );
  46. public:
  47. static NTSTATUS
  48. Create(
  49. PPIN_NODE_INSTANCE *ppPinNodeInstance,
  50. PFILTER_NODE_INSTANCE pFilterNodeInstance,
  51. PPIN_NODE pPinNode,
  52. PKSPIN_CONNECT pPinConnect,
  53. BOOL fRender
  54. #ifdef FIX_SOUND_LEAK
  55. ,BOOL fDirectConnection
  56. #endif
  57. );
  58. VOID
  59. Destroy(
  60. )
  61. {
  62. if(this != NULL) {
  63. Assert(this);
  64. delete this;
  65. }
  66. };
  67. NTSTATUS
  68. SetState(
  69. KSSTATE NewState,
  70. KSSTATE PreviousState,
  71. ULONG ulFlags
  72. );
  73. PPIN_NODE pPinNode;
  74. PFILE_OBJECT pFileObject;
  75. HANDLE hPin;
  76. private:
  77. KSSTATE CurrentState;
  78. int cState[MAX_STATES];
  79. PFILTER_NODE_INSTANCE pFilterNodeInstance;
  80. BOOL fRender;
  81. #ifdef FIX_SOUND_LEAK
  82. BOOL fDirectConnection;
  83. BOOL ForceRun;
  84. #endif
  85. public:
  86. DefineSignature(0x20494E50); // PNI
  87. } PIN_NODE_INSTANCE, *PPIN_NODE_INSTANCE;
  88. //---------------------------------------------------------------------------