home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Game Programming for Teens / VBGPFT.cdr / DirectX8 / dx8a_sdk.exe / samples / multimedia / directshow / baseclasses / streams.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-04  |  6.1 KB  |  164 lines

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