1 |
bearsoft |
1.1 |
/*++
|
2 |
|
|
|
3 |
|
|
Copyright (C) Microsoft Corporation, 1996 - 1999
|
4 |
|
|
|
5 |
|
|
Module Name:
|
6 |
|
|
|
7 |
|
|
ksproxy.h
|
8 |
|
|
|
9 |
|
|
Abstract:
|
10 |
|
|
|
11 |
|
|
Interface definitions for WDM-CSA proxy filters.
|
12 |
|
|
|
13 |
|
|
--*/
|
14 |
|
|
|
15 |
|
|
#ifndef __KSPROXY__
|
16 |
|
|
#define __KSPROXY__
|
17 |
|
|
|
18 |
|
|
#ifdef __cplusplus
|
19 |
|
|
extern "C" {
|
20 |
|
|
#endif
|
21 |
|
|
|
22 |
|
|
#undef KSDDKAPI
|
23 |
|
|
#ifdef _KSDDK_
|
24 |
|
|
#define KSDDKAPI
|
25 |
|
|
#else // !_KSDDK_
|
26 |
|
|
#define KSDDKAPI DECLSPEC_IMPORT
|
27 |
|
|
#endif // _KSDDK_
|
28 |
|
|
|
29 |
|
|
#define STATIC_IID_IKsObject\
|
30 |
|
|
0x423c13a2L, 0x2070, 0x11d0, 0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
|
31 |
|
|
|
32 |
|
|
#define STATIC_IID_IKsPinEx\
|
33 |
|
|
0x7bb38260L, 0xd19c, 0x11d2, 0xb3, 0x8a, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e
|
34 |
|
|
|
35 |
|
|
#define STATIC_IID_IKsPin\
|
36 |
|
|
0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
|
37 |
|
|
|
38 |
|
|
#define STATIC_IID_IKsPinPipe\
|
39 |
|
|
0xe539cd90L, 0xa8b4, 0x11d1, 0x81, 0x89, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
40 |
|
|
|
41 |
|
|
#define STATIC_IID_IKsDataTypeHandler\
|
42 |
|
|
0x5ffbaa02L, 0x49a3, 0x11d0, 0x9f, 0x36, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1
|
43 |
|
|
|
44 |
|
|
#define STATIC_IID_IKsDataTypeCompletion\
|
45 |
|
|
0x827D1A0EL, 0x0F73, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
46 |
|
|
|
47 |
|
|
#define STATIC_IID_IKsInterfaceHandler\
|
48 |
|
|
0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
49 |
|
|
|
50 |
|
|
#define STATIC_IID_IKsClockPropertySet\
|
51 |
|
|
0x5C5CBD84L, 0xE755, 0x11D0, 0xAC, 0x18, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
52 |
|
|
|
53 |
|
|
#define STATIC_IID_IKsAllocator\
|
54 |
|
|
0x8da64899L, 0xc0d9, 0x11d0, 0x84, 0x13, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a
|
55 |
|
|
|
56 |
|
|
#define STATIC_IID_IKsAllocatorEx\
|
57 |
|
|
0x091bb63aL, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
#ifndef STATIC_IID_IKsPropertySet
|
61 |
|
|
#define STATIC_IID_IKsPropertySet\
|
62 |
|
|
0x31EFAC30L, 0x515C, 0x11d0, 0xA9, 0xAA, 0x00, 0xAA, 0x00, 0x61, 0xBE, 0x93
|
63 |
|
|
#endif // STATIC_IID_IKsPropertySet
|
64 |
|
|
|
65 |
|
|
#define STATIC_IID_IKsTopology\
|
66 |
|
|
0x28F54683L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
67 |
|
|
|
68 |
|
|
#ifndef STATIC_IID_IKsControl
|
69 |
|
|
#define STATIC_IID_IKsControl\
|
70 |
|
|
0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
71 |
|
|
#endif // STATIC_IID_IKsControl
|
72 |
|
|
|
73 |
|
|
#define STATIC_IID_IKsAggregateControl\
|
74 |
|
|
0x7F40EAC0L, 0x3947, 0x11D2, 0x87, 0x4E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
75 |
|
|
|
76 |
|
|
#define STATIC_CLSID_Proxy \
|
77 |
|
|
0x17CCA71BL, 0xECD7, 0x11D0, 0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
|
78 |
|
|
|
79 |
|
|
#ifdef _KS_
|
80 |
|
|
|
81 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
82 |
|
|
DEFINE_GUIDEX(IID_IKsObject);
|
83 |
|
|
|
84 |
|
|
DEFINE_GUIDEX(IID_IKsPin);
|
85 |
|
|
|
86 |
|
|
DEFINE_GUIDEX(IID_IKsPinEx);
|
87 |
|
|
|
88 |
|
|
DEFINE_GUIDEX(IID_IKsPinPipe);
|
89 |
|
|
|
90 |
|
|
DEFINE_GUIDEX(IID_IKsDataTypeHandler);
|
91 |
|
|
|
92 |
|
|
DEFINE_GUIDEX(IID_IKsDataTypeCompletion);
|
93 |
|
|
|
94 |
|
|
DEFINE_GUIDEX(IID_IKsInterfaceHandler);
|
95 |
|
|
|
96 |
|
|
DEFINE_GUIDEX(IID_IKsClockPropertySet);
|
97 |
|
|
|
98 |
|
|
DEFINE_GUIDEX(IID_IKsAllocator);
|
99 |
|
|
|
100 |
|
|
DEFINE_GUIDEX(IID_IKsAllocatorEx);
|
101 |
|
|
|
102 |
|
|
#define IID_IKsQualityForwarder KSCATEGORY_QUALITY
|
103 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
104 |
|
|
|
105 |
|
|
#define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY
|
106 |
|
|
|
107 |
|
|
typedef enum {
|
108 |
|
|
KsAllocatorMode_User,
|
109 |
|
|
KsAllocatorMode_Kernel
|
110 |
|
|
} KSALLOCATORMODE;
|
111 |
|
|
|
112 |
|
|
|
113 |
|
|
typedef enum {
|
114 |
|
|
FramingProp_Uninitialized,
|
115 |
|
|
FramingProp_None,
|
116 |
|
|
FramingProp_Old,
|
117 |
|
|
FramingProp_Ex
|
118 |
|
|
} FRAMING_PROP;
|
119 |
|
|
|
120 |
|
|
typedef FRAMING_PROP *PFRAMING_PROP;
|
121 |
|
|
|
122 |
|
|
|
123 |
|
|
typedef enum {
|
124 |
|
|
Framing_Cache_Update, // request to bypass cache when read/write
|
125 |
|
|
Framing_Cache_ReadLast,
|
126 |
|
|
Framing_Cache_ReadOrig,
|
127 |
|
|
Framing_Cache_Write
|
128 |
|
|
} FRAMING_CACHE_OPS;
|
129 |
|
|
|
130 |
|
|
|
131 |
|
|
typedef struct {
|
132 |
|
|
LONGLONG MinTotalNominator;
|
133 |
|
|
LONGLONG MaxTotalNominator;
|
134 |
|
|
LONGLONG TotalDenominator;
|
135 |
|
|
} OPTIMAL_WEIGHT_TOTALS;
|
136 |
|
|
|
137 |
|
|
// forward declaration
|
138 |
|
|
typedef struct IPin IPin;
|
139 |
|
|
typedef struct IKsPin IKsPin;
|
140 |
|
|
typedef struct IKsAllocator IKsAllocator;
|
141 |
|
|
typedef struct IKsAllocatorEx IKsAllocatorEx;
|
142 |
|
|
|
143 |
|
|
|
144 |
|
|
//
|
145 |
|
|
// allocators strategy is defined by graph manager
|
146 |
|
|
//
|
147 |
|
|
#define AllocatorStrategy_DontCare 0
|
148 |
|
|
|
149 |
|
|
//
|
150 |
|
|
// what to optimize
|
151 |
|
|
//
|
152 |
|
|
#define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001
|
153 |
|
|
#define AllocatorStrategy_MinimizeFrameSize 0x00000002
|
154 |
|
|
#define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004
|
155 |
|
|
#define AllocatorStrategy_MaximizeSpeed 0x00000008
|
156 |
|
|
|
157 |
|
|
//
|
158 |
|
|
// factors (flags) defining the Pipes properties
|
159 |
|
|
//
|
160 |
|
|
#define PipeFactor_None 0
|
161 |
|
|
#define PipeFactor_UserModeUpstream 0x00000001
|
162 |
|
|
#define PipeFactor_UserModeDownstream 0x00000002
|
163 |
|
|
#define PipeFactor_MemoryTypes 0x00000004
|
164 |
|
|
#define PipeFactor_Flags 0x00000008
|
165 |
|
|
#define PipeFactor_PhysicalRanges 0x00000010
|
166 |
|
|
#define PipeFactor_OptimalRanges 0x00000020
|
167 |
|
|
#define PipeFactor_FixedCompression 0x00000040
|
168 |
|
|
#define PipeFactor_UnknownCompression 0x00000080
|
169 |
|
|
|
170 |
|
|
#define PipeFactor_Buffers 0x00000100
|
171 |
|
|
#define PipeFactor_Align 0x00000200
|
172 |
|
|
|
173 |
|
|
#define PipeFactor_PhysicalEnd 0x00000400
|
174 |
|
|
#define PipeFactor_LogicalEnd 0x00000800
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
typedef enum {
|
179 |
|
|
PipeState_DontCare,
|
180 |
|
|
PipeState_RangeNotFixed,
|
181 |
|
|
PipeState_RangeFixed,
|
182 |
|
|
PipeState_CompressionUnknown,
|
183 |
|
|
PipeState_Finalized
|
184 |
|
|
} PIPE_STATE;
|
185 |
|
|
|
186 |
|
|
|
187 |
|
|
//
|
188 |
|
|
// pipe dimensions relative to BeginPin.
|
189 |
|
|
//
|
190 |
|
|
|
191 |
|
|
typedef struct _PIPE_DIMENSIONS {
|
192 |
|
|
KS_COMPRESSION AllocatorPin;
|
193 |
|
|
KS_COMPRESSION MaxExpansionPin;
|
194 |
|
|
KS_COMPRESSION EndPin;
|
195 |
|
|
} PIPE_DIMENSIONS, *PPIPE_DIMENSIONS;
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
typedef enum {
|
199 |
|
|
Pipe_Allocator_None,
|
200 |
|
|
Pipe_Allocator_FirstPin,
|
201 |
|
|
Pipe_Allocator_LastPin,
|
202 |
|
|
Pipe_Allocator_MiddlePin
|
203 |
|
|
} PIPE_ALLOCATOR_PLACE;
|
204 |
|
|
|
205 |
|
|
typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE;
|
206 |
|
|
|
207 |
|
|
|
208 |
|
|
typedef enum {
|
209 |
|
|
KS_MemoryTypeDontCare = 0,
|
210 |
|
|
KS_MemoryTypeKernelPaged,
|
211 |
|
|
KS_MemoryTypeKernelNonPaged,
|
212 |
|
|
KS_MemoryTypeDeviceHostMapped,
|
213 |
|
|
KS_MemoryTypeDeviceSpecific,
|
214 |
|
|
KS_MemoryTypeUser,
|
215 |
|
|
KS_MemoryTypeAnyHost
|
216 |
|
|
} KS_LogicalMemoryType;
|
217 |
|
|
|
218 |
|
|
typedef KS_LogicalMemoryType *PKS_LogicalMemoryType;
|
219 |
|
|
|
220 |
|
|
|
221 |
|
|
|
222 |
|
|
typedef struct _PIPE_TERMINATION {
|
223 |
|
|
ULONG Flags;
|
224 |
|
|
ULONG OutsideFactors;
|
225 |
|
|
ULONG Weigth; // outside weight
|
226 |
|
|
KS_FRAMING_RANGE PhysicalRange;
|
227 |
|
|
KS_FRAMING_RANGE_WEIGHTED OptimalRange;
|
228 |
|
|
KS_COMPRESSION Compression; // relative to the connected pin on a neighboring filter.
|
229 |
|
|
} PIPE_TERMINATION;
|
230 |
|
|
|
231 |
|
|
|
232 |
|
|
//
|
233 |
|
|
// extended allocator properties
|
234 |
|
|
//
|
235 |
|
|
typedef struct _ALLOCATOR_PROPERTIES_EX
|
236 |
|
|
{
|
237 |
|
|
long cBuffers;
|
238 |
|
|
long cbBuffer;
|
239 |
|
|
long cbAlign;
|
240 |
|
|
long cbPrefix;
|
241 |
|
|
// new part
|
242 |
|
|
GUID MemoryType;
|
243 |
|
|
GUID BusType; // one of the buses this pipe is using
|
244 |
|
|
PIPE_STATE State;
|
245 |
|
|
PIPE_TERMINATION Input;
|
246 |
|
|
PIPE_TERMINATION Output;
|
247 |
|
|
ULONG Strategy;
|
248 |
|
|
ULONG Flags;
|
249 |
|
|
ULONG Weight;
|
250 |
|
|
KS_LogicalMemoryType LogicalMemoryType;
|
251 |
|
|
PIPE_ALLOCATOR_PLACE AllocatorPlace;
|
252 |
|
|
PIPE_DIMENSIONS Dimensions;
|
253 |
|
|
KS_FRAMING_RANGE PhysicalRange; // on allocator pin
|
254 |
|
|
IKsAllocatorEx* PrevSegment; // doubly-linked list of KS allocators
|
255 |
|
|
ULONG CountNextSegments; // possible multiple dependent pipes
|
256 |
|
|
IKsAllocatorEx** NextSegments;
|
257 |
|
|
ULONG InsideFactors; // existing factors (different from "don't care")
|
258 |
|
|
ULONG NumberPins;
|
259 |
|
|
} ALLOCATOR_PROPERTIES_EX;
|
260 |
|
|
|
261 |
|
|
typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX;
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
#ifdef __STREAMS__
|
265 |
|
|
|
266 |
|
|
struct DECLSPEC_UUID("5C5CBD84-E755-11D0-AC18-00A0C9223196") IKsClockPropertySet;
|
267 |
|
|
#undef INTERFACE
|
268 |
|
|
#define INTERFACE IKsClockPropertySet
|
269 |
|
|
DECLARE_INTERFACE_(IKsClockPropertySet, IUnknown)
|
270 |
|
|
{
|
271 |
|
|
STDMETHOD(KsGetTime)(
|
272 |
|
|
THIS_
|
273 |
|
|
LONGLONG* Time
|
274 |
|
|
) PURE;
|
275 |
|
|
STDMETHOD(KsSetTime)(
|
276 |
|
|
THIS_
|
277 |
|
|
LONGLONG Time
|
278 |
|
|
) PURE;
|
279 |
|
|
STDMETHOD(KsGetPhysicalTime)(
|
280 |
|
|
THIS_
|
281 |
|
|
LONGLONG* Time
|
282 |
|
|
) PURE;
|
283 |
|
|
STDMETHOD(KsSetPhysicalTime)(
|
284 |
|
|
THIS_
|
285 |
|
|
LONGLONG Time
|
286 |
|
|
) PURE;
|
287 |
|
|
STDMETHOD(KsGetCorrelatedTime)(
|
288 |
|
|
THIS_
|
289 |
|
|
KSCORRELATED_TIME* CorrelatedTime
|
290 |
|
|
) PURE;
|
291 |
|
|
STDMETHOD(KsSetCorrelatedTime)(
|
292 |
|
|
THIS_
|
293 |
|
|
KSCORRELATED_TIME* CorrelatedTime
|
294 |
|
|
) PURE;
|
295 |
|
|
STDMETHOD(KsGetCorrelatedPhysicalTime)(
|
296 |
|
|
THIS_
|
297 |
|
|
KSCORRELATED_TIME* CorrelatedTime
|
298 |
|
|
) PURE;
|
299 |
|
|
STDMETHOD(KsSetCorrelatedPhysicalTime)(
|
300 |
|
|
THIS_
|
301 |
|
|
KSCORRELATED_TIME* CorrelatedTime
|
302 |
|
|
) PURE;
|
303 |
|
|
STDMETHOD(KsGetResolution)(
|
304 |
|
|
THIS_
|
305 |
|
|
KSRESOLUTION* Resolution
|
306 |
|
|
) PURE;
|
307 |
|
|
STDMETHOD(KsGetState)(
|
308 |
|
|
THIS_
|
309 |
|
|
KSSTATE* State
|
310 |
|
|
) PURE;
|
311 |
|
|
};
|
312 |
|
|
|
313 |
|
|
|
314 |
|
|
interface DECLSPEC_UUID("8da64899-c0d9-11d0-8413-0000f822fe8a") IKsAllocator;
|
315 |
|
|
#undef INTERFACE
|
316 |
|
|
#define INTERFACE IKsAllocator
|
317 |
|
|
DECLARE_INTERFACE_(IKsAllocator, IUnknown)
|
318 |
|
|
{
|
319 |
|
|
STDMETHOD_(HANDLE, KsGetAllocatorHandle)(
|
320 |
|
|
THIS
|
321 |
|
|
) PURE;
|
322 |
|
|
STDMETHOD_(KSALLOCATORMODE, KsGetAllocatorMode)(
|
323 |
|
|
THIS
|
324 |
|
|
) PURE;
|
325 |
|
|
STDMETHOD(KsGetAllocatorStatus)(
|
326 |
|
|
THIS_
|
327 |
|
|
PKSSTREAMALLOCATOR_STATUS AllocatorStatus
|
328 |
|
|
) PURE;
|
329 |
|
|
STDMETHOD_(VOID, KsSetAllocatorMode)(
|
330 |
|
|
THIS_
|
331 |
|
|
KSALLOCATORMODE Mode
|
332 |
|
|
) PURE;
|
333 |
|
|
};
|
334 |
|
|
|
335 |
|
|
interface DECLSPEC_UUID("091bb63a-603f-11d1-b067-00a0c9062802") IKsAllocatorEx;
|
336 |
|
|
#undef INTERFACE
|
337 |
|
|
#define INTERFACE IKsAllocatorEx
|
338 |
|
|
DECLARE_INTERFACE_(IKsAllocatorEx, IKsAllocator)
|
339 |
|
|
{
|
340 |
|
|
STDMETHOD_(PALLOCATOR_PROPERTIES_EX, KsGetProperties)(
|
341 |
|
|
THIS
|
342 |
|
|
) PURE;
|
343 |
|
|
STDMETHOD_(VOID, KsSetProperties)(
|
344 |
|
|
THIS_
|
345 |
|
|
PALLOCATOR_PROPERTIES_EX
|
346 |
|
|
) PURE;
|
347 |
|
|
STDMETHOD_(VOID, KsSetAllocatorHandle)(
|
348 |
|
|
THIS_
|
349 |
|
|
HANDLE AllocatorHandle
|
350 |
|
|
) PURE;
|
351 |
|
|
STDMETHOD_(HANDLE, KsCreateAllocatorAndGetHandle)(
|
352 |
|
|
THIS_
|
353 |
|
|
IKsPin* KsPin
|
354 |
|
|
) PURE;
|
355 |
|
|
};
|
356 |
|
|
|
357 |
|
|
typedef enum {
|
358 |
|
|
KsPeekOperation_PeekOnly,
|
359 |
|
|
KsPeekOperation_AddRef
|
360 |
|
|
} KSPEEKOPERATION;
|
361 |
|
|
|
362 |
|
|
typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT;
|
363 |
|
|
|
364 |
|
|
interface DECLSPEC_UUID("b61178d1-a2d9-11cf-9e53-00aa00a216a1") IKsPin;
|
365 |
|
|
|
366 |
|
|
#undef INTERFACE
|
367 |
|
|
#define INTERFACE IKsPin
|
368 |
|
|
DECLARE_INTERFACE_(IKsPin, IUnknown)
|
369 |
|
|
{
|
370 |
|
|
STDMETHOD(KsQueryMediums)(
|
371 |
|
|
THIS_
|
372 |
|
|
PKSMULTIPLE_ITEM* MediumList
|
373 |
|
|
) PURE;
|
374 |
|
|
STDMETHOD(KsQueryInterfaces)(
|
375 |
|
|
THIS_
|
376 |
|
|
PKSMULTIPLE_ITEM* InterfaceList
|
377 |
|
|
) PURE;
|
378 |
|
|
STDMETHOD(KsCreateSinkPinHandle)(
|
379 |
|
|
THIS_
|
380 |
|
|
KSPIN_INTERFACE& Interface,
|
381 |
|
|
KSPIN_MEDIUM& Medium
|
382 |
|
|
) PURE;
|
383 |
|
|
STDMETHOD(KsGetCurrentCommunication)(
|
384 |
|
|
THIS_
|
385 |
|
|
KSPIN_COMMUNICATION *Communication,
|
386 |
|
|
KSPIN_INTERFACE *Interface,
|
387 |
|
|
KSPIN_MEDIUM *Medium
|
388 |
|
|
) PURE;
|
389 |
|
|
STDMETHOD(KsPropagateAcquire)(
|
390 |
|
|
THIS
|
391 |
|
|
) PURE;
|
392 |
|
|
STDMETHOD(KsDeliver)(
|
393 |
|
|
THIS_
|
394 |
|
|
IMediaSample* Sample,
|
395 |
|
|
ULONG Flags
|
396 |
|
|
) PURE;
|
397 |
|
|
STDMETHOD(KsMediaSamplesCompleted)(
|
398 |
|
|
THIS_
|
399 |
|
|
PKSSTREAM_SEGMENT StreamSegment
|
400 |
|
|
) PURE;
|
401 |
|
|
STDMETHOD_(IMemAllocator *, KsPeekAllocator)(
|
402 |
|
|
THIS_
|
403 |
|
|
KSPEEKOPERATION Operation
|
404 |
|
|
) PURE;
|
405 |
|
|
STDMETHOD(KsReceiveAllocator)(
|
406 |
|
|
THIS_
|
407 |
|
|
IMemAllocator *MemAllocator
|
408 |
|
|
) PURE;
|
409 |
|
|
STDMETHOD(KsRenegotiateAllocator)(
|
410 |
|
|
THIS
|
411 |
|
|
) PURE;
|
412 |
|
|
STDMETHOD_(LONG, KsIncrementPendingIoCount)(
|
413 |
|
|
THIS
|
414 |
|
|
) PURE;
|
415 |
|
|
STDMETHOD_(LONG, KsDecrementPendingIoCount)(
|
416 |
|
|
THIS
|
417 |
|
|
) PURE;
|
418 |
|
|
STDMETHOD(KsQualityNotify)(
|
419 |
|
|
THIS_
|
420 |
|
|
ULONG Proportion,
|
421 |
|
|
REFERENCE_TIME TimeDelta
|
422 |
|
|
) PURE;
|
423 |
|
|
};
|
424 |
|
|
|
425 |
|
|
interface DECLSPEC_UUID("7bb38260-d19c-11d2-b38a-00a0c95ec22e") IKsPinEx;
|
426 |
|
|
#undef INTERFACE
|
427 |
|
|
#define INTERFACE IKsPinEx
|
428 |
|
|
DECLARE_INTERFACE_(IKsPinEx, IKsPin)
|
429 |
|
|
{
|
430 |
|
|
STDMETHOD_(VOID, KsNotifyError)(
|
431 |
|
|
THIS_
|
432 |
|
|
IMediaSample* Sample,
|
433 |
|
|
HRESULT hr
|
434 |
|
|
) PURE;
|
435 |
|
|
};
|
436 |
|
|
|
437 |
|
|
interface DECLSPEC_UUID("e539cd90-a8b4-11d1-8189-00a0c9062802") IKsPinPipe;
|
438 |
|
|
#undef INTERFACE
|
439 |
|
|
#define INTERFACE IKsPinPipe
|
440 |
|
|
DECLARE_INTERFACE_(IKsPinPipe, IUnknown)
|
441 |
|
|
{
|
442 |
|
|
STDMETHOD(KsGetPinFramingCache)(
|
443 |
|
|
THIS_
|
444 |
|
|
PKSALLOCATOR_FRAMING_EX *FramingEx,
|
445 |
|
|
PFRAMING_PROP FramingProp,
|
446 |
|
|
FRAMING_CACHE_OPS Option
|
447 |
|
|
) PURE;
|
448 |
|
|
STDMETHOD(KsSetPinFramingCache)(
|
449 |
|
|
THIS_
|
450 |
|
|
PKSALLOCATOR_FRAMING_EX FramingEx,
|
451 |
|
|
PFRAMING_PROP FramingProp,
|
452 |
|
|
FRAMING_CACHE_OPS Option
|
453 |
|
|
) PURE;
|
454 |
|
|
STDMETHOD_(IPin*, KsGetConnectedPin)(
|
455 |
|
|
THIS
|
456 |
|
|
) PURE;
|
457 |
|
|
STDMETHOD_(IKsAllocatorEx*, KsGetPipe)(
|
458 |
|
|
THIS_
|
459 |
|
|
KSPEEKOPERATION Operation
|
460 |
|
|
) PURE;
|
461 |
|
|
STDMETHOD(KsSetPipe)(
|
462 |
|
|
THIS_
|
463 |
|
|
IKsAllocatorEx *KsAllocator
|
464 |
|
|
) PURE;
|
465 |
|
|
STDMETHOD_(ULONG, KsGetPipeAllocatorFlag)(
|
466 |
|
|
THIS
|
467 |
|
|
) PURE;
|
468 |
|
|
STDMETHOD(KsSetPipeAllocatorFlag)(
|
469 |
|
|
THIS_
|
470 |
|
|
ULONG Flag
|
471 |
|
|
) PURE;
|
472 |
|
|
STDMETHOD_(GUID, KsGetPinBusCache)(
|
473 |
|
|
THIS
|
474 |
|
|
) PURE;
|
475 |
|
|
STDMETHOD(KsSetPinBusCache)(
|
476 |
|
|
THIS_
|
477 |
|
|
GUID Bus
|
478 |
|
|
) PURE;
|
479 |
|
|
//
|
480 |
|
|
// very useful methods for tracing.
|
481 |
|
|
//
|
482 |
|
|
STDMETHOD_(PWCHAR, KsGetPinName)(
|
483 |
|
|
THIS
|
484 |
|
|
) PURE;
|
485 |
|
|
STDMETHOD_(PWCHAR, KsGetFilterName)(
|
486 |
|
|
THIS
|
487 |
|
|
) PURE;
|
488 |
|
|
};
|
489 |
|
|
|
490 |
|
|
|
491 |
|
|
interface DECLSPEC_UUID("CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196") IKsPinFactory;
|
492 |
|
|
#undef INTERFACE
|
493 |
|
|
#define INTERFACE IKsPinFactory
|
494 |
|
|
DECLARE_INTERFACE_(IKsPinFactory, IUnknown)
|
495 |
|
|
{
|
496 |
|
|
STDMETHOD(KsPinFactory)(
|
497 |
|
|
THIS_
|
498 |
|
|
ULONG* PinFactory
|
499 |
|
|
) PURE;
|
500 |
|
|
};
|
501 |
|
|
|
502 |
|
|
typedef enum {
|
503 |
|
|
KsIoOperation_Write,
|
504 |
|
|
KsIoOperation_Read
|
505 |
|
|
} KSIOOPERATION;
|
506 |
|
|
|
507 |
|
|
interface DECLSPEC_UUID("5ffbaa02-49a3-11d0-9f36-00aa00a216a1") IKsDataTypeHandler;
|
508 |
|
|
#undef INTERFACE
|
509 |
|
|
#define INTERFACE IKsDataTypeHandler
|
510 |
|
|
DECLARE_INTERFACE_(IKsDataTypeHandler, IUnknown)
|
511 |
|
|
{
|
512 |
|
|
STDMETHOD(KsCompleteIoOperation)(
|
513 |
|
|
THIS_
|
514 |
|
|
IMediaSample *Sample,
|
515 |
|
|
PVOID StreamHeader,
|
516 |
|
|
KSIOOPERATION IoOperation,
|
517 |
|
|
BOOL Cancelled
|
518 |
|
|
) PURE;
|
519 |
|
|
STDMETHOD(KsIsMediaTypeInRanges)(
|
520 |
|
|
THIS_
|
521 |
|
|
PVOID DataRanges
|
522 |
|
|
) PURE;
|
523 |
|
|
STDMETHOD(KsPrepareIoOperation)(
|
524 |
|
|
THIS_
|
525 |
|
|
IMediaSample *Sample,
|
526 |
|
|
PVOID StreamHeader,
|
527 |
|
|
KSIOOPERATION IoOperation
|
528 |
|
|
) PURE;
|
529 |
|
|
STDMETHOD(KsQueryExtendedSize)(
|
530 |
|
|
THIS_
|
531 |
|
|
ULONG* ExtendedSize
|
532 |
|
|
) PURE;
|
533 |
|
|
STDMETHOD(KsSetMediaType)(
|
534 |
|
|
THIS_
|
535 |
|
|
const AM_MEDIA_TYPE* AmMediaType
|
536 |
|
|
) PURE;
|
537 |
|
|
};
|
538 |
|
|
|
539 |
|
|
interface DECLSPEC_UUID("827D1A0E-0F73-11D2-B27A-00A0C9223196") IKsDataTypeCompletion;
|
540 |
|
|
#undef INTERFACE
|
541 |
|
|
#define INTERFACE IKsDataTypeCompletion
|
542 |
|
|
DECLARE_INTERFACE_(IKsDataTypeCompletion, IUnknown)
|
543 |
|
|
{
|
544 |
|
|
STDMETHOD(KsCompleteMediaType)(
|
545 |
|
|
THIS_
|
546 |
|
|
HANDLE FilterHandle,
|
547 |
|
|
ULONG PinFactoryId,
|
548 |
|
|
AM_MEDIA_TYPE* AmMediaType
|
549 |
|
|
) PURE;
|
550 |
|
|
};
|
551 |
|
|
|
552 |
|
|
interface DECLSPEC_UUID("D3ABC7E0-9A61-11d0-A40D-00A0C9223196") IKsInterfaceHandler;
|
553 |
|
|
#undef INTERFACE
|
554 |
|
|
#define INTERFACE IKsInterfaceHandler
|
555 |
|
|
DECLARE_INTERFACE_(IKsInterfaceHandler, IUnknown)
|
556 |
|
|
{
|
557 |
|
|
STDMETHOD(KsSetPin)(
|
558 |
|
|
THIS_
|
559 |
|
|
IKsPin *KsPin
|
560 |
|
|
) PURE;
|
561 |
|
|
STDMETHOD(KsProcessMediaSamples)(
|
562 |
|
|
THIS_
|
563 |
|
|
IKsDataTypeHandler *KsDataTypeHandler,
|
564 |
|
|
IMediaSample** SampleList,
|
565 |
|
|
PLONG SampleCount,
|
566 |
|
|
KSIOOPERATION IoOperation,
|
567 |
|
|
PKSSTREAM_SEGMENT *StreamSegment
|
568 |
|
|
) PURE;
|
569 |
|
|
STDMETHOD(KsCompleteIo)(
|
570 |
|
|
THIS_
|
571 |
|
|
PKSSTREAM_SEGMENT StreamSegment
|
572 |
|
|
) PURE;
|
573 |
|
|
};
|
574 |
|
|
|
575 |
|
|
|
576 |
|
|
//
|
577 |
|
|
// This structure definition is the common header required by the proxy to
|
578 |
|
|
// dispatch the stream segment to the interface handler. Interface handlers
|
579 |
|
|
// will create extended structures to include other information such as
|
580 |
|
|
// media samples, extended header size and so on.
|
581 |
|
|
//
|
582 |
|
|
|
583 |
|
|
typedef struct _KSSTREAM_SEGMENT {
|
584 |
|
|
IKsInterfaceHandler *KsInterfaceHandler;
|
585 |
|
|
IKsDataTypeHandler *KsDataTypeHandler;
|
586 |
|
|
KSIOOPERATION IoOperation;
|
587 |
|
|
HANDLE CompletionEvent;
|
588 |
|
|
|
589 |
|
|
} KSSTREAM_SEGMENT;
|
590 |
|
|
|
591 |
|
|
interface DECLSPEC_UUID("423c13a2-2070-11d0-9ef7-00aa00a216a1") IKsObject;
|
592 |
|
|
#undef INTERFACE
|
593 |
|
|
#define INTERFACE IKsObject
|
594 |
|
|
DECLARE_INTERFACE_(IKsObject, IUnknown)
|
595 |
|
|
{
|
596 |
|
|
STDMETHOD_(HANDLE, KsGetObjectHandle)(
|
597 |
|
|
THIS
|
598 |
|
|
) PURE;
|
599 |
|
|
};
|
600 |
|
|
|
601 |
|
|
interface DECLSPEC_UUID("97ebaacb-95bd-11d0-a3ea-00a0c9223196") IKsQualityForwarder;
|
602 |
|
|
#undef INTERFACE
|
603 |
|
|
#define INTERFACE IKsQualityForwarder
|
604 |
|
|
DECLARE_INTERFACE_(IKsQualityForwarder, IKsObject)
|
605 |
|
|
{
|
606 |
|
|
STDMETHOD_(VOID, KsFlushClient)(
|
607 |
|
|
THIS_
|
608 |
|
|
IKsPin* Pin
|
609 |
|
|
) PURE;
|
610 |
|
|
};
|
611 |
|
|
|
612 |
|
|
KSDDKAPI
|
613 |
|
|
HRESULT
|
614 |
|
|
WINAPI
|
615 |
|
|
KsResolveRequiredAttributes(
|
616 |
|
|
PKSDATARANGE DataRange,
|
617 |
|
|
PKSMULTIPLE_ITEM Attributes OPTIONAL
|
618 |
|
|
);
|
619 |
|
|
|
620 |
|
|
KSDDKAPI
|
621 |
|
|
HRESULT
|
622 |
|
|
WINAPI
|
623 |
|
|
KsOpenDefaultDevice(
|
624 |
|
|
REFGUID Category,
|
625 |
|
|
ACCESS_MASK Access,
|
626 |
|
|
PHANDLE DeviceHandle
|
627 |
|
|
);
|
628 |
|
|
KSDDKAPI
|
629 |
|
|
HRESULT
|
630 |
|
|
WINAPI
|
631 |
|
|
KsSynchronousDeviceControl(
|
632 |
|
|
HANDLE Handle,
|
633 |
|
|
ULONG IoControl,
|
634 |
|
|
PVOID InBuffer,
|
635 |
|
|
ULONG InLength,
|
636 |
|
|
PVOID OutBuffer,
|
637 |
|
|
ULONG OutLength,
|
638 |
|
|
PULONG BytesReturned
|
639 |
|
|
);
|
640 |
|
|
KSDDKAPI
|
641 |
|
|
HRESULT
|
642 |
|
|
WINAPI
|
643 |
|
|
KsGetMultiplePinFactoryItems(
|
644 |
|
|
HANDLE FilterHandle,
|
645 |
|
|
ULONG PinFactoryId,
|
646 |
|
|
ULONG PropertyId,
|
647 |
|
|
PVOID* Items
|
648 |
|
|
);
|
649 |
|
|
KSDDKAPI
|
650 |
|
|
HRESULT
|
651 |
|
|
WINAPI
|
652 |
|
|
KsGetMediaTypeCount(
|
653 |
|
|
HANDLE FilterHandle,
|
654 |
|
|
ULONG PinFactoryId,
|
655 |
|
|
ULONG* MediaTypeCount
|
656 |
|
|
);
|
657 |
|
|
KSDDKAPI
|
658 |
|
|
HRESULT
|
659 |
|
|
WINAPI
|
660 |
|
|
KsGetMediaType(
|
661 |
|
|
int Position,
|
662 |
|
|
AM_MEDIA_TYPE* AmMediaType,
|
663 |
|
|
HANDLE FilterHandle,
|
664 |
|
|
ULONG PinFactoryId
|
665 |
|
|
);
|
666 |
|
|
|
667 |
|
|
#endif // __STREAMS__
|
668 |
|
|
|
669 |
|
|
#ifndef _IKsPropertySet_
|
670 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
671 |
|
|
DEFINE_GUIDEX(IID_IKsPropertySet);
|
672 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
673 |
|
|
#endif // _IKsPropertySet_
|
674 |
|
|
|
675 |
|
|
#ifndef _IKsControl_
|
676 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
677 |
|
|
DEFINE_GUIDEX(IID_IKsControl);
|
678 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
679 |
|
|
#endif // _IKsControl_
|
680 |
|
|
|
681 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
682 |
|
|
DEFINE_GUIDEX(IID_IKsAggregateControl);
|
683 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
684 |
|
|
|
685 |
|
|
#ifndef _IKsTopology_
|
686 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
687 |
|
|
DEFINE_GUIDEX(IID_IKsTopology);
|
688 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
689 |
|
|
#endif // _IKsTopology_
|
690 |
|
|
|
691 |
|
|
DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196", CLSID_Proxy);
|
692 |
|
|
#define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy)
|
693 |
|
|
|
694 |
|
|
#else // !_KS_
|
695 |
|
|
|
696 |
|
|
#ifndef _IKsPropertySet_
|
697 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
698 |
|
|
DEFINE_GUID(IID_IKsPropertySet, STATIC_IID_IKsPropertySet);
|
699 |
|
|
#endif // !defined(__cplusplus) || _MSC_VER < 1100
|
700 |
|
|
#endif // _IKsPropertySet_
|
701 |
|
|
|
702 |
|
|
#if !defined(__cplusplus) || _MSC_VER < 1100
|
703 |
|
|
DEFINE_GUID(CLSID_Proxy, STATIC_CLSID_Proxy);
|
704 |
|
|
#else // defined(__cplusplus) && _MSC_VER >= 1100
|
705 |
|
|
DECLSPEC_UUID("17CCA71B-ECD7-11D0-B908-00A0C9223196") CLSID_Proxy;
|
706 |
|
|
#endif // defined(__cplusplus) && _MSC_VER >= 1100
|
707 |
|
|
|
708 |
|
|
#endif // !_KS_
|
709 |
|
|
|
710 |
|
|
#ifndef _IKsPropertySet_
|
711 |
|
|
#define _IKsPropertySet_
|
712 |
|
|
|
713 |
|
|
#define KSPROPERTY_SUPPORT_GET 1
|
714 |
|
|
#define KSPROPERTY_SUPPORT_SET 2
|
715 |
|
|
|
716 |
|
|
#ifdef DECLARE_INTERFACE_
|
717 |
|
|
|
718 |
|
|
interface DECLSPEC_UUID("31EFAC30-515C-11d0-A9AA-00aa0061be93") IKsPropertySet;
|
719 |
|
|
#undef INTERFACE
|
720 |
|
|
#define INTERFACE IKsPropertySet
|
721 |
|
|
DECLARE_INTERFACE_(IKsPropertySet, IUnknown)
|
722 |
|
|
{
|
723 |
|
|
STDMETHOD(Set)(
|
724 |
|
|
THIS_
|
725 |
|
|
IN REFGUID PropSet,
|
726 |
|
|
IN ULONG Id,
|
727 |
|
|
IN LPVOID InstanceData,
|
728 |
|
|
IN ULONG InstanceLength,
|
729 |
|
|
IN LPVOID PropertyData,
|
730 |
|
|
IN ULONG DataLength
|
731 |
|
|
) PURE;
|
732 |
|
|
|
733 |
|
|
STDMETHOD(Get)(
|
734 |
|
|
THIS_
|
735 |
|
|
IN REFGUID PropSet,
|
736 |
|
|
IN ULONG Id,
|
737 |
|
|
IN LPVOID InstanceData,
|
738 |
|
|
IN ULONG InstanceLength,
|
739 |
|
|
OUT LPVOID PropertyData,
|
740 |
|
|
IN ULONG DataLength,
|
741 |
|
|
OUT ULONG* BytesReturned
|
742 |
|
|
) PURE;
|
743 |
|
|
|
744 |
|
|
STDMETHOD(QuerySupported)(
|
745 |
|
|
THIS_
|
746 |
|
|
IN REFGUID PropSet,
|
747 |
|
|
IN ULONG Id,
|
748 |
|
|
OUT ULONG* TypeSupport
|
749 |
|
|
) PURE;
|
750 |
|
|
};
|
751 |
|
|
|
752 |
|
|
#endif // DECLARE_INTERFACE_
|
753 |
|
|
|
754 |
|
|
#endif // _IKsPropertySet_
|
755 |
|
|
|
756 |
|
|
#ifndef _IKsControl_
|
757 |
|
|
#define _IKsControl_
|
758 |
|
|
|
759 |
|
|
#ifdef DECLARE_INTERFACE_
|
760 |
|
|
|
761 |
|
|
interface DECLSPEC_UUID("28F54685-06FD-11D2-B27A-00A0C9223196") IKsControl;
|
762 |
|
|
#undef INTERFACE
|
763 |
|
|
#define INTERFACE IKsControl
|
764 |
|
|
DECLARE_INTERFACE_(IKsControl, IUnknown)
|
765 |
|
|
{
|
766 |
|
|
STDMETHOD(KsProperty)(
|
767 |
|
|
THIS_
|
768 |
|
|
IN PKSPROPERTY Property,
|
769 |
|
|
IN ULONG PropertyLength,
|
770 |
|
|
IN OUT LPVOID PropertyData,
|
771 |
|
|
IN ULONG DataLength,
|
772 |
|
|
OUT ULONG* BytesReturned
|
773 |
|
|
) PURE;
|
774 |
|
|
STDMETHOD(KsMethod)(
|
775 |
|
|
THIS_
|
776 |
|
|
IN PKSMETHOD Method,
|
777 |
|
|
IN ULONG MethodLength,
|
778 |
|
|
IN OUT LPVOID MethodData,
|
779 |
|
|
IN ULONG DataLength,
|
780 |
|
|
OUT ULONG* BytesReturned
|
781 |
|
|
) PURE;
|
782 |
|
|
STDMETHOD(KsEvent)(
|
783 |
|
|
THIS_
|
784 |
|
|
IN PKSEVENT Event OPTIONAL,
|
785 |
|
|
IN ULONG EventLength,
|
786 |
|
|
IN OUT LPVOID EventData,
|
787 |
|
|
IN ULONG DataLength,
|
788 |
|
|
OUT ULONG* BytesReturned
|
789 |
|
|
) PURE;
|
790 |
|
|
};
|
791 |
|
|
|
792 |
|
|
#endif // DECLARE_INTERFACE_
|
793 |
|
|
|
794 |
|
|
#endif // _IKsControl_
|
795 |
|
|
|
796 |
|
|
|
797 |
|
|
#ifdef DECLARE_INTERFACE_
|
798 |
|
|
|
799 |
|
|
interface DECLSPEC_UUID("7F40EAC0-3947-11D2-874E-00A0C9223196") IKsAggregateControl;
|
800 |
|
|
#undef INTERFACE
|
801 |
|
|
#define INTERFACE IKsAggregateControl
|
802 |
|
|
DECLARE_INTERFACE_(IKsAggregateControl, IUnknown)
|
803 |
|
|
{
|
804 |
|
|
STDMETHOD(KsAddAggregate)(
|
805 |
|
|
THIS_
|
806 |
|
|
IN REFGUID AggregateClass
|
807 |
|
|
) PURE;
|
808 |
|
|
STDMETHOD(KsRemoveAggregate)(
|
809 |
|
|
THIS_
|
810 |
|
|
IN REFGUID AggregateClass
|
811 |
|
|
) PURE;
|
812 |
|
|
};
|
813 |
|
|
|
814 |
|
|
#endif // DECLARE_INTERFACE_
|
815 |
|
|
|
816 |
|
|
#ifndef _IKsTopology_
|
817 |
|
|
#define _IKsTopology_
|
818 |
|
|
|
819 |
|
|
#ifdef DECLARE_INTERFACE_
|
820 |
|
|
|
821 |
|
|
interface DECLSPEC_UUID("28F54683-06FD-11D2-B27A-00A0C9223196") IKsTopology;
|
822 |
|
|
#undef INTERFACE
|
823 |
|
|
#define INTERFACE IKsTopology
|
824 |
|
|
DECLARE_INTERFACE_(IKsTopology, IUnknown)
|
825 |
|
|
{
|
826 |
|
|
STDMETHOD(CreateNodeInstance)(
|
827 |
|
|
THIS_
|
828 |
|
|
IN ULONG NodeId,
|
829 |
|
|
IN ULONG Flags,
|
830 |
|
|
IN ACCESS_MASK DesiredAccess,
|
831 |
|
|
IN IUnknown* UnkOuter OPTIONAL,
|
832 |
|
|
IN REFGUID InterfaceId,
|
833 |
|
|
OUT LPVOID* Interface
|
834 |
|
|
) PURE;
|
835 |
|
|
};
|
836 |
|
|
|
837 |
|
|
#endif // DECLARE_INTERFACE_
|
838 |
|
|
|
839 |
|
|
#endif // _IKsTopology_
|
840 |
|
|
|
841 |
|
|
#ifdef __cplusplus
|
842 |
|
|
}
|
843 |
|
|
#endif // __cplusplus
|
844 |
|
|
|
845 |
|
|
#endif // __KSPROXY__
|