~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.2.1/third_party/BaseClasses/streams.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//------------------------------------------------------------------------------
 
2
// File: Streams.h
 
3
//
 
4
// Desc: DirectShow base classes - defines overall streams architecture.
 
5
//
 
6
// Copyright (c) 1992-2001 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
// Because of differences between Visual C++ and older Microsoft SDKs,
 
30
// you may have defined _DEBUG without defining DEBUG.  This logic
 
31
// ensures that both will be set if Visual C++ sets _DEBUG.
 
32
#ifdef _DEBUG
 
33
#ifndef DEBUG
 
34
#define DEBUG
 
35
#endif
 
36
#endif
 
37
 
 
38
 
 
39
#include <windows.h>
 
40
#include <windowsx.h>
 
41
#include <olectl.h>
 
42
#include <ddraw.h>
 
43
#include <mmsystem.h>
 
44
 
 
45
 
 
46
#ifndef NUMELMS
 
47
#if _WIN32_WINNT < 0x0600
 
48
   #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
 
49
#else
 
50
   #define NUMELMS(aa) ARRAYSIZE(aa)
 
51
#endif   
 
52
#endif
 
53
 
 
54
///////////////////////////////////////////////////////////////////////////
 
55
// The following definitions come from the Platform SDK and are required if
 
56
// the applicaiton is being compiled with the headers from Visual C++ 6.0.
 
57
/////////////////////////////////////////////////// ////////////////////////
 
58
#ifndef InterlockedExchangePointer
 
59
        #define InterlockedExchangePointer(Target, Value) \
 
60
   (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
 
61
#endif
 
62
 
 
63
#ifndef _WAVEFORMATEXTENSIBLE_
 
64
#define _WAVEFORMATEXTENSIBLE_
 
65
typedef struct {
 
66
    WAVEFORMATEX    Format;
 
67
    union {
 
68
        WORD wValidBitsPerSample;       /* bits of precision  */
 
69
        WORD wSamplesPerBlock;          /* valid if wBitsPerSample==0 */
 
70
        WORD wReserved;                 /* If neither applies, set to zero. */
 
71
    } Samples;
 
72
    DWORD           dwChannelMask;      /* which channels are */
 
73
                                        /* present in stream  */
 
74
    GUID            SubFormat;
 
75
} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
 
76
#endif // !_WAVEFORMATEXTENSIBLE_
 
77
 
 
78
#if !defined(WAVE_FORMAT_EXTENSIBLE)
 
79
#define  WAVE_FORMAT_EXTENSIBLE                 0xFFFE
 
80
#endif // !defined(WAVE_FORMAT_EXTENSIBLE)
 
81
 
 
82
#ifndef GetWindowLongPtr
 
83
  #define GetWindowLongPtrA   GetWindowLongA
 
84
  #define GetWindowLongPtrW   GetWindowLongW
 
85
  #ifdef UNICODE
 
86
    #define GetWindowLongPtr  GetWindowLongPtrW
 
87
  #else
 
88
    #define GetWindowLongPtr  GetWindowLongPtrA
 
89
  #endif // !UNICODE
 
90
#endif // !GetWindowLongPtr
 
91
 
 
92
#ifndef SetWindowLongPtr
 
93
  #define SetWindowLongPtrA   SetWindowLongA
 
94
  #define SetWindowLongPtrW   SetWindowLongW
 
95
  #ifdef UNICODE
 
96
    #define SetWindowLongPtr  SetWindowLongPtrW
 
97
  #else
 
98
    #define SetWindowLongPtr  SetWindowLongPtrA
 
99
  #endif // !UNICODE
 
100
#endif // !SetWindowLongPtr
 
101
 
 
102
#ifndef GWLP_WNDPROC
 
103
  #define GWLP_WNDPROC        (-4)
 
104
#endif
 
105
#ifndef GWLP_HINSTANCE
 
106
  #define GWLP_HINSTANCE      (-6)
 
107
#endif
 
108
#ifndef GWLP_HWNDPARENT
 
109
  #define GWLP_HWNDPARENT     (-8)
 
110
#endif
 
111
#ifndef GWLP_USERDATA
 
112
  #define GWLP_USERDATA       (-21)
 
113
#endif
 
114
#ifndef GWLP_ID
 
115
  #define GWLP_ID             (-12)
 
116
#endif
 
117
#ifndef DWLP_MSGRESULT
 
118
  #define DWLP_MSGRESULT  0
 
119
#endif
 
120
#ifndef DWLP_DLGPROC 
 
121
  #define DWLP_DLGPROC    DWLP_MSGRESULT + sizeof(LRESULT)
 
122
#endif
 
123
#ifndef DWLP_USER
 
124
  #define DWLP_USER       DWLP_DLGPROC + sizeof(DLGPROC)
 
125
#endif
 
126
 
 
127
 
 
128
#pragma warning(push)
 
129
#pragma warning(disable: 4312 4244)
 
130
// _GetWindowLongPtr
 
131
// Templated version of GetWindowLongPtr, to suppress spurious compiler warning.
 
132
template <class T>
 
133
T _GetWindowLongPtr(HWND hwnd, int nIndex)
 
134
{
 
135
    return (T)GetWindowLongPtr(hwnd, nIndex);
 
136
}
 
137
 
 
138
// _SetWindowLongPtr
 
139
// Templated version of SetWindowLongPtr, to suppress spurious compiler warning.
 
140
template <class T>
 
141
LONG_PTR _SetWindowLongPtr(HWND hwnd, int nIndex, T p)
 
142
{
 
143
    return SetWindowLongPtr(hwnd, nIndex, (LONG_PTR)p);
 
144
}
 
145
#pragma warning(pop)
 
146
 
 
147
///////////////////////////////////////////////////////////////////////////
 
148
// End Platform SDK definitions
 
149
///////////////////////////////////////////////////////////////////////////
 
150
 
 
151
 
 
152
#include <strmif.h>     // Generated IDL header file for streams interfaces
 
153
#include <intsafe.h>    // required by amvideo.h
 
154
 
 
155
#include <reftime.h>    // Helper class for REFERENCE_TIME management
 
156
#include <wxdebug.h>    // Debug support for logging and ASSERTs
 
157
#include <amvideo.h>    // ActiveMovie video interfaces and definitions
 
158
//include amaudio.h explicitly if you need it.  it requires the DX SDK.
 
159
//#include <amaudio.h>    // ActiveMovie audio interfaces and definitions
 
160
#include <wxutil.h>     // General helper classes for threads etc
 
161
#include <combase.h>    // Base COM classes to support IUnknown
 
162
//#include <dllsetup.h>   // Filter registration support functions
 
163
#include <measure.h>    // Performance measurement
 
164
//#include <comlite.h>    // Light weight com function prototypes
 
165
 
 
166
//#include <cache.h>      // Simple cache container class
 
167
#include <wxlist.h>     // Non MFC generic list class
 
168
#include <msgthrd.h>    // CMsgThread
 
169
#include <mtype.h>      // Helper class for managing media types
 
170
#include <fourcc.h>     // conversions between FOURCCs and GUIDs
 
171
#include <control.h>    // generated from control.odl
 
172
#include <ctlutil.h>    // control interface utility classes
 
173
#include <evcode.h>     // event code definitions
 
174
#include <amfilter.h>   // Main streams architecture class hierachy
 
175
//#include <transfrm.h>   // Generic transform filter
 
176
//#include <transip.h>    // Generic transform-in-place filter
 
177
#include <uuids.h>      // declaration of type GUIDs and well-known clsids
 
178
//#include <source.h>   // Generic source filter
 
179
//#include <outputq.h>    // Output pin queueing
 
180
#include <errors.h>     // HRESULT status and error definitions
 
181
#include <renbase.h>    // Base class for writing ActiveX renderers
 
182
//#include <winutil.h>    // Helps with filters that manage windows
 
183
//#include <winctrl.h>    // Implements the IVideoWindow interface
 
184
//#include <videoctl.h>   // Specifically video related classes
 
185
const LONGLONG MAX_TIME = 0x7FFFFFFFFFFFFFFF;   /* Maximum LONGLONG value */
 
186
//#include <refclock.h> // Base clock class
 
187
//#include <sysclock.h> // System clock
 
188
//#include <pstream.h>    // IPersistStream helper class
 
189
//#include <vtrans.h>     // Video Transform Filter base class
 
190
//#include <amextra.h>
 
191
//#include <cprop.h>      // Base property page class
 
192
//#include <strmctl.h>    // IAMStreamControl support
 
193
//#include <edevdefs.h>   // External device control interface defines
 
194
//#include <audevcod.h>   // audio filter device error event codes
 
195
 
 
196
 
 
197
#else
 
198
    #ifdef DEBUG
 
199
    #pragma message("STREAMS.H included TWICE")
 
200
    #endif
 
201
#endif // __STREAMS__
 
202