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.

168 lines
6.1 KiB

  1. //------------------------------------------------------------------------------
  2. // File: Streams.h
  3. //
  4. // Desc: DirectShow base classes - defines overall streams architecture.
  5. //
  6. //@@BEGIN_MSINTERNAL
  7. //
  8. // January 1995
  9. //
  10. //@@END_MSINTERNAL
  11. // Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
  12. //------------------------------------------------------------------------------
  13. #ifndef __STREAMS__
  14. #define __STREAMS__
  15. #ifdef _MSC_VER
  16. // disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
  17. #pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
  18. #pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
  19. #pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
  20. #pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
  21. #pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"
  22. #if _MSC_VER>=1100
  23. #define AM_NOVTABLE __declspec(novtable)
  24. #else
  25. #define AM_NOVTABLE
  26. #endif
  27. #endif // MSC_VER
  28. #include <windows.h>
  29. #include <windowsx.h>
  30. #include <olectl.h>
  31. #include <ddraw.h>
  32. #include <mmsystem.h>
  33. #ifndef NUMELMS
  34. #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
  35. #endif
  36. ///////////////////////////////////////////////////////////////////////////
  37. // The following definitions come from the Platform SDK and are required if
  38. // the applicaiton is being compiled with the headers from Visual C++ 6.0.
  39. ///////////////////////////////////////////////////////////////////////////
  40. #ifndef InterlockedExchangePointer
  41. #define InterlockedExchangePointer(Target, Value) \
  42. (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
  43. #endif
  44. #ifndef _WAVEFORMATEXTENSIBLE_
  45. #define _WAVEFORMATEXTENSIBLE_
  46. typedef struct {
  47. WAVEFORMATEX Format;
  48. union {
  49. WORD wValidBitsPerSample; /* bits of precision */
  50. WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */
  51. WORD wReserved; /* If neither applies, set to zero. */
  52. } Samples;
  53. DWORD dwChannelMask; /* which channels are */
  54. /* present in stream */
  55. GUID SubFormat;
  56. } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
  57. #endif // !_WAVEFORMATEXTENSIBLE_
  58. #if !defined(WAVE_FORMAT_EXTENSIBLE)
  59. #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
  60. #endif // !defined(WAVE_FORMAT_EXTENSIBLE)
  61. #ifndef GetWindowLongPtr
  62. #define GetWindowLongPtrA GetWindowLongA
  63. #define GetWindowLongPtrW GetWindowLongW
  64. #ifdef UNICODE
  65. #define GetWindowLongPtr GetWindowLongPtrW
  66. #else
  67. #define GetWindowLongPtr GetWindowLongPtrA
  68. #endif // !UNICODE
  69. #endif // !GetWindowLongPtr
  70. #ifndef SetWindowLongPtr
  71. #define SetWindowLongPtrA SetWindowLongA
  72. #define SetWindowLongPtrW SetWindowLongW
  73. #ifdef UNICODE
  74. #define SetWindowLongPtr SetWindowLongPtrW
  75. #else
  76. #define SetWindowLongPtr SetWindowLongPtrA
  77. #endif // !UNICODE
  78. #endif // !SetWindowLongPtr
  79. #ifndef GWLP_WNDPROC
  80. #define GWLP_WNDPROC (-4)
  81. #endif
  82. #ifndef GWLP_HINSTANCE
  83. #define GWLP_HINSTANCE (-6)
  84. #endif
  85. #ifndef GWLP_HWNDPARENT
  86. #define GWLP_HWNDPARENT (-8)
  87. #endif
  88. #ifndef GWLP_USERDATA
  89. #define GWLP_USERDATA (-21)
  90. #endif
  91. #ifndef GWLP_ID
  92. #define GWLP_ID (-12)
  93. #endif
  94. #ifndef DWLP_MSGRESULT
  95. #define DWLP_MSGRESULT 0
  96. #endif
  97. #ifndef DWLP_DLGPROC
  98. #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
  99. #endif
  100. #ifndef DWLP_USER
  101. #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
  102. #endif
  103. ///////////////////////////////////////////////////////////////////////////
  104. // End Platform SDK definitions
  105. ///////////////////////////////////////////////////////////////////////////
  106. #include <strmif.h> // Generated IDL header file for streams interfaces
  107. #include <reftime.h> // Helper class for REFERENCE_TIME management
  108. #include <wxdebug.h> // Debug support for logging and ASSERTs
  109. #include <amvideo.h> // ActiveMovie video interfaces and definitions
  110. //include amaudio.h explicitly if you need it. it requires the DX SDK.
  111. //#include <amaudio.h> // ActiveMovie audio interfaces and definitions
  112. #include <wxutil.h> // General helper classes for threads etc
  113. #include <combase.h> // Base COM classes to support IUnknown
  114. #include <dllsetup.h> // Filter registration support functions
  115. #include <measure.h> // Performance measurement
  116. #include <comlite.h> // Light weight com function prototypes
  117. #include <cache.h> // Simple cache container class
  118. #include <wxlist.h> // Non MFC generic list class
  119. #include <msgthrd.h> // CMsgThread
  120. #include <mtype.h> // Helper class for managing media types
  121. #include <fourcc.h> // conversions between FOURCCs and GUIDs
  122. #include <control.h> // generated from control.odl
  123. #include <ctlutil.h> // control interface utility classes
  124. #include <evcode.h> // event code definitions
  125. #include <amfilter.h> // Main streams architecture class hierachy
  126. #include <transfrm.h> // Generic transform filter
  127. #include <transip.h> // Generic transform-in-place filter
  128. #include <uuids.h> // declaration of type GUIDs and well-known clsids
  129. #include <source.h> // Generic source filter
  130. #include <outputq.h> // Output pin queueing
  131. #include <errors.h> // HRESULT status and error definitions
  132. #include <renbase.h> // Base class for writing ActiveX renderers
  133. #include <winutil.h> // Helps with filters that manage windows
  134. #include <winctrl.h> // Implements the IVideoWindow interface
  135. #include <videoctl.h> // Specifically video related classes
  136. #include <refclock.h> // Base clock class
  137. #include <sysclock.h> // System clock
  138. #include <pstream.h> // IPersistStream helper class
  139. #include <vtrans.h> // Video Transform Filter base class
  140. #include <amextra.h>
  141. #include <cprop.h> // Base property page class
  142. #include <strmctl.h> // IAMStreamControl support
  143. #include <edevdefs.h> // External device control interface defines
  144. #include <audevcod.h> // audio filter device error event codes
  145. #else
  146. #ifdef DEBUG
  147. #pragma message("STREAMS.H included TWICE")
  148. #endif
  149. #endif // __STREAMS__