test2
[test_vsfilter.git] / src / filters / BaseClasses / streams.h
blobbf4f50e4a19ca55d94eab8739164749a06a510ba
1 //------------------------------------------------------------------------------
2 // File: Streams.h
3 //
4 // Desc: DirectShow base classes - defines overall streams architecture.
5 //
6 // Copyright (c) 1992-2002 Microsoft Corporation. All rights reserved.
7 //------------------------------------------------------------------------------
10 #ifndef __STREAMS__
11 #define __STREAMS__
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:4127) // warning C4127: conditional expression is constant
17 #pragma warning(disable:4189) // warning C4189: local variable is initialized but not referenced
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 #pragma warning(disable:4710) // warning C4710: 'function' not inlined
24 #if _MSC_VER>=1100
25 #define AM_NOVTABLE __declspec(novtable)
26 #else
27 #define AM_NOVTABLE
28 #endif
29 #endif // MSC_VER
31 // Because of differences between Visual C++ and older Microsoft SDKs,
32 // you may have defined _DEBUG without defining DEBUG. This logic
33 // ensures that both will be set if Visual C++ sets _DEBUG.
34 #ifdef _DEBUG
35 #ifndef DEBUG
36 #define DEBUG
37 #endif
38 #endif
41 #include <windows.h>
42 #include <windowsx.h>
43 #include <olectl.h>
44 #include <ddraw.h>
46 // Disable warning message for C4201 - use of nameless struct/union
47 // Otherwise, strmif.h will generate warnings for Win32 debug builds
48 #pragma warning( disable : 4201 )
50 #include <mmsystem.h>
52 #ifndef NUMELMS
53 #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
54 #endif
56 ///////////////////////////////////////////////////////////////////////////
57 // The following definitions come from the Platform SDK and are required if
58 // the applicaiton is being compiled with the headers from Visual C++ 6.0.
59 ///////////////////////////////////////////////////////////////////////////
60 #ifndef InterlockedExchangePointer
61 #define InterlockedExchangePointer(Target, Value) \
62 (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
63 #endif
65 #ifndef _WAVEFORMATEXTENSIBLE_
66 #define _WAVEFORMATEXTENSIBLE_
67 typedef struct {
68 WAVEFORMATEX Format;
69 union {
70 WORD wValidBitsPerSample; /* bits of precision */
71 WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */
72 WORD wReserved; /* If neither applies, set to zero. */
73 } Samples;
74 DWORD dwChannelMask; /* which channels are */
75 /* present in stream */
76 GUID SubFormat;
77 } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
78 #endif // !_WAVEFORMATEXTENSIBLE_
80 #if !defined(WAVE_FORMAT_EXTENSIBLE)
81 #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
82 #endif // !defined(WAVE_FORMAT_EXTENSIBLE)
84 #ifndef GetWindowLongPtr
85 #define GetWindowLongPtrA GetWindowLongA
86 #define GetWindowLongPtrW GetWindowLongW
87 #ifdef UNICODE
88 #define GetWindowLongPtr GetWindowLongPtrW
89 #else
90 #define GetWindowLongPtr GetWindowLongPtrA
91 #endif // !UNICODE
92 #endif // !GetWindowLongPtr
94 #ifndef SetWindowLongPtr
95 #define SetWindowLongPtrA SetWindowLongA
96 #define SetWindowLongPtrW SetWindowLongW
97 #ifdef UNICODE
98 #define SetWindowLongPtr SetWindowLongPtrW
99 #else
100 #define SetWindowLongPtr SetWindowLongPtrA
101 #endif // !UNICODE
102 #endif // !SetWindowLongPtr
104 #ifndef GWLP_WNDPROC
105 #define GWLP_WNDPROC (-4)
106 #endif
107 #ifndef GWLP_HINSTANCE
108 #define GWLP_HINSTANCE (-6)
109 #endif
110 #ifndef GWLP_HWNDPARENT
111 #define GWLP_HWNDPARENT (-8)
112 #endif
113 #ifndef GWLP_USERDATA
114 #define GWLP_USERDATA (-21)
115 #endif
116 #ifndef GWLP_ID
117 #define GWLP_ID (-12)
118 #endif
119 #ifndef DWLP_MSGRESULT
120 #define DWLP_MSGRESULT 0
121 #endif
122 #ifndef DWLP_DLGPROC
123 #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
124 #endif
125 #ifndef DWLP_USER
126 #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
127 #endif
128 ///////////////////////////////////////////////////////////////////////////
129 // End Platform SDK definitions
130 ///////////////////////////////////////////////////////////////////////////
133 #pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
134 #include <strmif.h> // Generated IDL header file for streams interfaces
136 #include <reftime.h> // Helper class for REFERENCE_TIME management
137 #include <wxdebug.h> // Debug support for logging and ASSERTs
138 #include <amvideo.h> // ActiveMovie video interfaces and definitions
139 //include amaudio.h explicitly if you need it. it requires the DirectX SDK.
140 //#include <amaudio.h> // ActiveMovie audio interfaces and definitions
141 #include <wxutil.h> // General helper classes for threads etc
142 #include <combase.h> // Base COM classes to support IUnknown
143 #include <dllsetup.h> // Filter registration support functions
144 #include <measure.h> // Performance measurement
145 #include <comlite.h> // Light weight com function prototypes
147 #include <cache.h> // Simple cache container class
148 #include <wxlist.h> // Non MFC generic list class
149 #include <msgthrd.h> // CMsgThread
150 #include <mtype.h> // Helper class for managing media types
151 #include <fourcc.h> // conversions between FOURCCs and GUIDs
152 #include <control.h> // generated from control.odl
153 #include <ctlutil.h> // control interface utility classes
154 #include <evcode.h> // event code definitions
155 #include <amfilter.h> // Main streams architecture class hierachy
156 #include <transfrm.h> // Generic transform filter
157 #include <transip.h> // Generic transform-in-place filter
158 #include <uuids.h> // declaration of type GUIDs and well-known clsids
159 #include <source.h> // Generic source filter
160 #include <outputq.h> // Output pin queueing
161 #include <errors.h> // HRESULT status and error definitions
162 #include <renbase.h> // Base class for writing ActiveX renderers
163 #include <winutil.h> // Helps with filters that manage windows
164 #include <winctrl.h> // Implements the IVideoWindow interface
165 #include <videoctl.h> // Specifically video related classes
166 #include <refclock.h> // Base clock class
167 #include <sysclock.h> // System clock
168 #include <pstream.h> // IPersistStream helper class
169 #include <vtrans.h> // Video Transform Filter base class
170 #include <amextra.h>
171 #include <cprop.h> // Base property page class
172 #include <strmctl.h> // IAMStreamControl support
173 #include <edevdefs.h> // External device control interface defines
174 #include <audevcod.h> // audio filter device error event codes
176 #else
177 #ifdef DEBUG
178 #pragma message("STREAMS.H included TWICE")
179 #endif
180 #endif // __STREAMS__