123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- #ifndef __STREAMS__
- #define __STREAMS__
- #ifdef _MSC_VER
- #pragma warning(disable:4100)
- #pragma warning(disable:4201)
- #pragma warning(disable:4511)
- #pragma warning(disable:4512)
- #pragma warning(disable:4514)
- #if _MSC_VER>=1100
- #define AM_NOVTABLE __declspec(novtable)
- #else
- #define AM_NOVTABLE
- #endif
- #else
- #include <sal.h>
- #include <sal2.h>
- #define AM_NOVTABLE
- #pragma GCC diagnostic ignored "-Wwrite-strings"
- #endif
- #ifdef _DEBUG
- #ifndef DEBUG
- #define DEBUG
- #endif
- #endif
- #include <windows.h>
- #include <windowsx.h>
- #include <olectl.h>
- #include <ddraw.h>
- #include <mmsystem.h>
- #ifndef NUMELMS
- #if _WIN32_WINNT < 0x0600
- #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
- #else
- #define NUMELMS(aa) ARRAYSIZE(aa)
- #endif
- #endif
- #ifndef InterlockedExchangePointer
- #define InterlockedExchangePointer(Target, Value) \
- (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
- #endif
- #ifndef _WAVEFORMATEXTENSIBLE_
- #define _WAVEFORMATEXTENSIBLE_
- typedef struct {
- WAVEFORMATEX Format;
- union {
- WORD wValidBitsPerSample;
- WORD wSamplesPerBlock;
- WORD wReserved;
- } Samples;
- DWORD dwChannelMask;
-
- GUID SubFormat;
- } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
- #endif
- #if !defined(WAVE_FORMAT_EXTENSIBLE)
- #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
- #endif
- #ifndef GetWindowLongPtr
- #define GetWindowLongPtrA GetWindowLongA
- #define GetWindowLongPtrW GetWindowLongW
- #ifdef UNICODE
- #define GetWindowLongPtr GetWindowLongPtrW
- #else
- #define GetWindowLongPtr GetWindowLongPtrA
- #endif
- #endif
- #ifndef SetWindowLongPtr
- #define SetWindowLongPtrA SetWindowLongA
- #define SetWindowLongPtrW SetWindowLongW
- #ifdef UNICODE
- #define SetWindowLongPtr SetWindowLongPtrW
- #else
- #define SetWindowLongPtr SetWindowLongPtrA
- #endif
- #endif
- #ifndef GWLP_WNDPROC
- #define GWLP_WNDPROC (-4)
- #endif
- #ifndef GWLP_HINSTANCE
- #define GWLP_HINSTANCE (-6)
- #endif
- #ifndef GWLP_HWNDPARENT
- #define GWLP_HWNDPARENT (-8)
- #endif
- #ifndef GWLP_USERDATA
- #define GWLP_USERDATA (-21)
- #endif
- #ifndef GWLP_ID
- #define GWLP_ID (-12)
- #endif
- #ifndef DWLP_MSGRESULT
- #define DWLP_MSGRESULT 0
- #endif
- #ifndef DWLP_DLGPROC
- #define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
- #endif
- #ifndef DWLP_USER
- #define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
- #endif
- #pragma warning(push)
- #pragma warning(disable: 4312 4244)
- template <class T>
- T _GetWindowLongPtr(HWND hwnd, int nIndex)
- {
- return (T)GetWindowLongPtr(hwnd, nIndex);
- }
- template <class T>
- LONG_PTR _SetWindowLongPtr(HWND hwnd, int nIndex, T p)
- {
- return SetWindowLongPtr(hwnd, nIndex, (LONG_PTR)p);
- }
- #pragma warning(pop)
- #include <strmif.h> // Generated IDL header file for streams interfaces
- #include <intsafe.h> // required by amvideo.h
- #include <reftime.h> // Helper class for REFERENCE_TIME management
- #include <wxdebug.h> // Debug support for logging and ASSERTs
- #include <amvideo.h> // ActiveMovie video interfaces and definitions
- #include <wxutil.h> // General helper classes for threads etc
- #include <combase.h> // Base COM classes to support IUnknown
- #include <measure.h> // Performance measurement
- #include <wxlist.h> // Non MFC generic list class
- #include <msgthrd.h> // CMsgThread
- #include <mtype.h> // Helper class for managing media types
- #include <fourcc.h> // conversions between FOURCCs and GUIDs
- #include <control.h> // generated from control.odl
- #include <ctlutil.h> // control interface utility classes
- #include <evcode.h> // event code definitions
- #include <amfilter.h> // Main streams architecture class hierachy
- #include <uuids.h> // declaration of type GUIDs and well-known clsids
- #include <errors.h> // HRESULT status and error definitions
- #include <renbase.h> // Base class for writing ActiveX renderers
- const LONGLONG MAX_TIME = 0x7FFFFFFFFFFFFFFF;
- #ifndef _MSC_VER
- #define min(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
- #include <amvideo2.h>
- #endif
- #else
- #ifdef DEBUG
- #pragma message("STREAMS.H included TWICE")
- #endif
- #endif
|