Subversion Repositories spacemission

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 daniel-mar 1
(*==========================================================================;
2
 *
3
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
4
 *
5
 *  DirectX header version 98.08.07
6
 *
7
 *  Present by Hiroyuki Hori.
8
 *
9
 *  E-Mail: hori@ingjapan.ne.jp
10
 *  Homepage: http://www.ingjapan.ne.jp/hori/index-e.html
11
 *
12
 *  Present unit:
13
 *    DirectX.pas    DirectX 6 (DirectX 6 SDK)
14
 *    DShow.pas      DirectShow (DirectX Media SDK 5.1)
15
 *    DAnim.pas      DirectAnimation (DirectX Media SDK 5.1)
16
 *
17
 ***************************************************************************)
18
 
19
unit DShow;
20
 
21
interface
22
 
23
{$Z4}
24
{$A+}
25
{$WEAKPACKAGEUNIT}
26
 
27
uses Windows, ActiveX, DirectX, MMSystem;
28
 
29
(*==========================================================================;
30
 *
31
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
32
 *
33
 *  File:       comlite.h
34
 *
35
 ***************************************************************************)
36
 
37
function QzInitialize(pvReserved: Pointer): HResult; stdcall;
38
procedure QzUninitialize; stdcall;
39
procedure QzFreeUnusedLibraries; stdcall;
40
 
41
function QzGetMalloc(dwMemContext: Longint; out malloc: IMalloc): HResult; stdcall;
42
function QzTaskMemAlloc(cb: Longint): Pointer; stdcall;
43
function QzTaskMemRealloc(pv: Pointer; cb: Longint): Pointer; stdcall;
44
procedure QzTaskMemFree(pv: Pointer); stdcall;
45
function QzCreateFilterObject(const clsid: TCLSID; unkOuter: IUnknown;
46
  dwClsContext: Longint; const iid: TIID; out pv): HResult; stdcall;
47
function QzCLSIDFromString(psz: POleStr; out clsid: TCLSID): HResult; stdcall;
48
function QzStringFromGUID2(const guid: TGUID; psz: POleStr; cbMax: Integer): Integer; stdcall;
49
 
50
(*==========================================================================;
51
 *
52
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
53
 *
54
 *  File:       errors.h
55
 *
56
 ***************************************************************************)
57
 
58
const
59
  VFW_FIRST_CODE = $200;
60
  MAX_ERROR_TEXT_LEN = 160;
61
 
62
type
63
  AMGETERRORTEXTPROCA = function(hr: HResult; pbuffer: PChar; MaxLen: DWORD): BOOL; stdcall;
64
 
65
  AMGETERRORTEXTPROCW = function(hr: HResult; pbuffer: PWideChar; MaxLen: DWORD): BOOL; stdcall;
66
 
67
  AMGETERRORTEXTPROC = AMGETERRORTEXTPROCA;
68
 
69
function AMGetErrorTextA(hr: HResult; pbuffer: PChar; MaxLen: DWORD): DWORD; stdcall;
70
function AMGetErrorTextW(hr: HResult; pbuffer: PWideChar; MaxLen: DWORD): DWORD; stdcall;
71
function AMGetErrorText(hr: HResult; pbuffer: PChar; MaxLen: DWORD): DWORD; stdcall;
72
 
73
(*==========================================================================;
74
 *
75
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
76
 *
77
 *  File:       strmif.h
78
 *
79
 ***************************************************************************)
80
 
81
const
82
  IID_IPin: TGUID = '{56A86891-0AD4-11CE-B03A-0020AF0BA770}';
83
  IID_IEnumPins: TGUID = '{56A86892-0AD4-11CE-B03A-0020AF0BA770}';
84
  IID_IEnumMediaTypes: TGUID = '{89C31040-846B-11CE-97D3-00AA0055595A}';
85
  IID_IFilterGraph: TGUID = '{56A8689F-0AD4-11CE-B03A-0020AF0BA770}';
86
  IID_IEnumFilters: TGUID = '{56A86893-0AD4-11CE-B03A-0020AF0BA770}';
87
  IID_IMediaFilter: TGUID = '{56A86899-0AD4-11CE-B03A-0020AF0BA770}';
88
  IID_IBaseFilter: TGUID = '{56A86895-0AD4-11CE-B03A-0020AF0BA770}';
89
  IID_IReferenceClock: TGUID = '{56A86897-0AD4-11CE-B03A-0020AF0BA770}';
90
  IID_IReferenceClock2: TGUID = '{36B73885-C2C8-11CF-8B46-00805F6CEF60}';
91
  IID_IMediaSample: TGUID = '{56A8689A-0AD4-11CE-B03A-0020AF0BA770}';
92
  IID_IMediaSample2: TGUID = '{36B73884-C2C8-11CF-8B46-00805F6CEF60}';
93
  IID_IMemAllocator: TGUID = '{56A8689C-0AD4-11CE-B03A-0020AF0BA770}';
94
  IID_IMemInputPin: TGUID = '{56A8689D-0AD4-11CE-B03A-0020AF0BA770}';
95
  IID_IAMovieSetup: TGUID = '{A3D8CEC0-7E5A-11CF-BBC5-00805F6CEF20}';
96
  IID_IMediaSeeking: TGUID = '{36B73880-C2C8-11CF-8B46-00805F6CEF60}';
97
  IID_IEnumRegFilters: TGUID = '{56A868A4-0AD4-11CE-B03A-0020AF0BA770}';
98
  IID_IFilterMapper: TGUID = '{56A868A3-0AD4-11CE-B03A-0020AF0BA770}';
99
  IID_IFilterMapper2: TGUID = '{B79BB0B0-33C1-11D1-ABE1-00A0C905F375}';
100
  IID_IQualityControl: TGUID = '{56A868A5-0AD4-11CE-B03A-0020AF0BA770}';
101
  IID_IOverlayNotify: TGUID = '{56A868A0-0AD4-11CE-B03A-0020AF0BA770}';
102
  IID_IOverlay: TGUID = '{56A868A1-0AD4-11CE-B03A-0020AF0BA770}';
103
  IID_IMediaEventSink: TGUID = '{56A868A2-0AD4-11CE-B03A-0020AF0BA770}';
104
  IID_IFileSourceFilter: TGUID = '{56A868A6-0AD4-11CE-B03A-0020AF0BA770}';
105
  IID_IFileSinkFilter: TGUID = '{A2104830-7C70-11CF-8BCE-00AA00A3F1A6}';
106
  IID_IFileSinkFilter2: TGUID = '{00855B90-CE1B-11D0-BD4F-00A0C911CE86}';
107
  IID_IFileAsyncIO: TGUID = '{56A868A7-0AD4-11CE-B03A-0020AF0BA770}';
108
  IID_IGraphBuilder: TGUID = '{56A868A9-0AD4-11CE-B03A-0020AF0BA770}';
109
  IID_ICaptureGraphBuilder: TGUID = '{BF87B6E0-8C27-11D0-B3F0-00AA003761C5}';
110
  IID_IAMCopyCaptureFileProgress: TGUID = '{670D1D20-A068-11D0-B3F0-00AA003761C5}';
111
  IID_IFilterGraph2: TGUID = '{36B73882-C2C8-11CF-8B46-00805F6CEF60}';
112
  IID_IStreamBuilder: TGUID = '{56A868BF-0AD4-11CE-B03A-0020AF0BA770}';
113
  IID_IAsyncReader: TGUID = '{56A868AA-0AD4-11CE-B03A-0020AF0BA770}';
114
  IID_IGraphVersion: TGUID = '{56A868AB-0AD4-11CE-B03A-0020AF0BA770}';
115
  IID_IResourceConsumer: TGUID = '{56A868AD-0AD4-11CE-B03A-0020AF0BA770}';
116
  IID_IResourceManager: TGUID = '{56A868AC-0AD4-11CE-B03A-0020AF0BA770}';
117
  IID_IDistributorNotify: TGUID = '{56A868AF-0AD4-11CE-B03A-0020AF0BA770}';
118
  IID_IAMStreamControl: TGUID = '{36b73881-c2c8-11cf-8b46-00805f6cef60}';
119
  IID_ISeekingPassThru: TGUID = '{36B73883-C2C8-11CF-8B46-00805F6CEF60}';
120
  IID_IAMStreamConfig: TGUID = '{C6E13340-30AC-11d0-A18C-00A0C9118956}';
121
  IID_IConfigInterleaving: TGUID = '{BEE3D220-157B-11d0-BD23-00A0C911CE86}';
122
  IID_IConfigAviMux: TGUID = '{5ACD6AA0-F482-11ce-8B67-00AA00A3F1A6}';
123
  IID_IAMVideoCompression: TGUID = '{C6E13343-30AC-11d0-A18C-00A0C9118956}';
124
  IID_IAMVfwCaptureDialogs: TGUID = '{D8D715A0-6E5E-11D0-B3F0-00AA003761C5}';
125
  IID_IAMVfwCompressDialogs: TGUID = '{D8D715A3-6E5E-11D0-B3F0-00AA003761C5}';
126
  IID_IAMDroppedFrames: TGUID = '{C6E13344-30AC-11d0-A18C-00A0C9118956}';
127
  IID_IAMAudioInputMixer: TGUID = '{54C39221-8380-11d0-B3F0-00AA003761C5}';
128
  IID_IAMAnalogVideoDecoder: TGUID = '{C6E13350-30AC-11d0-A18C-00A0C9118956}';
129
  IID_IAMVideoProcAmp: TGUID = '{C6E13360-30AC-11d0-A18C-00A0C9118956}';
130
  IID_IAMCameraControl: TGUID = '{C6E13370-30AC-11d0-A18C-00A0C9118956}';
131
  IID_IAMCrossbar: TGUID = '{C6E13380-30AC-11d0-A18C-00A0C9118956}';
132
  IID_IAMTuner: TGUID = '{211A8761-03AC-11d1-8D13-00AA00BD8339}';
133
  IID_IAMTunerNotification: TGUID = '{211A8760-03AC-11d1-8D13-00AA00BD8339}';
134
  IID_IAMTVTuner: TGUID = '{211A8766-03AC-11d1-8D13-00AA00BD8339}';
135
  IID_IBPCSatelliteTuner: TGUID = '{211A8765-03AC-11d1-8D13-00AA00BD8339}';
136
  IID_IAMTVAudio: TGUID = '{83EC1C30-23D1-11d1-99E6-00A0C9560266}';
137
  IID_IAMTVAudioNotification: TGUID = '{83EC1C33-23D1-11D1-99E6-00A0C9560266}';
138
  IID_IAMAnalogVideoEncoder: TGUID = '{C6E133B0-30AC-11d0-A18C-00A0C9118956}';
139
  IID_IMediaPropertyBag: TGUID = '{6025A880-C0D5-11D0-BD4E-00A0C911CE86}';
140
  IID_IPersistMediaPropertyBag: TGUID = '{5738E040-B67F-11d0-BD4D-00A0C911CE86}';
141
  IID_IAMPhysicalPinInfo: TGUID = '{F938C991-3029-11CF-8C44-00AA006B6814}';
142
  IID_IAMExtDevice: TGUID = '{B5730A90-1A2C-11CF-8C23-00AA006B6814}';
143
  IID_IAMExtTransport: TGUID = '{A03CD5F0-3045-11CF-8C44-00AA006B6814}';
144
  IID_IAMTimecodeReader: TGUID = '{9B496CE1-811B-11CF-8C77-00AA006B6814}';
145
  IID_IAMTimecodeGenerator: TGUID = '{9B496CE0-811B-11CF-8C77-00AA006B6814}';
146
  IID_IAMTimecodeDisplay: TGUID = '{9B496CE2-811B-11CF-8C77-00AA006B6814}';
147
  IID_IAMDevMemoryAllocator: TGUID = '{C6545BF0-E76B-11D0-BD52-00A0C911CE86}';
148
  IID_IAMDevMemoryControl: TGUID = '{C6545BF1-E76B-11D0-BD52-00A0C911CE86}';
149
  IID_IAMStreamSelect: TGUID = '{C1960960-17F5-11D1-ABE1-00A0C905F375}';
150
  IID_IAMovie: TGUID = '{359ACE10-7688-11CF-8B23-00805F6CEF60}';
151
  IID_ICreateDevEnum: TGUID = '{29840822-5B84-11D0-BD3B-00A0C911CE86}';
152
  IID_IDvdControl: TGUID = '{A70EFE61-E2A3-11D0-A9BE-00AA0061BE93}';
153
  IID_IDvdInfo: TGUID = '{A70EFE60-E2A3-11D0-A9BE-00AA0061BE93}';
154
  IID_IDvdGraphBuilder: TGUID = '{FCC152B6-F372-11d0-8E00-00C04FD7C08B}';
155
 
156
const
157
  CHARS_IN_GUID = 39;
158
 
159
  MAX_PIN_NAME    = 128;
160
  MAX_FILTER_NAME = 128;
161
 
162
type
163
  TAM_Media_Type = record
164
    majortype: TGUID;
165
    subtype: TGUID;
166
    bFixedSizeSamples: BOOL;
167
    bTemporalCompression: BOOL;
168
    lSampleSize: ULONG;
169
    formattype: TGUID;
170
    pUnk: IUnknown;
171
    cbFormat: ULONG;
172
    pbFormat: Pointer;
173
  end;
174
  PAM_Media_Type = ^TAM_Media_Type;
175
 
176
  TPin_Direction = (
177
    PINDIR_INPUT,
178
    PINDIR_OUTPUT
179
  );
180
 
181
  TRefTime = double;
182
 
183
  HSEMAPHORE = Longint;
184
 
185
  TAllocator_Properties = record
186
    cBuffers: Longint;
187
    cbBuffer: Longint;
188
    cbAlign: Longint;
189
    cbPrefix: Longint;
190
  end;
191
 
192
  IBaseFilter = interface;
193
 
194
  TPin_Info = record
195
    pFilter: IBaseFilter;
196
    dir: TPin_Direction;
197
    achName: array[0..127] of WCHAR;
198
  end;
199
 
200
  IEnumMediaTypes = interface;
201
 
202
  IPin = interface(IUnknown)
203
    ['{56A86891-0AD4-11CE-B03A-0020AF0BA770}']
204
    function Connect(pReceivePin: IPin; const pmt: TAM_Media_Type): HResult; stdcall;
205
    function ReceiveConnection(pConnector: IPin; const pmt: TAM_Media_Type): HResult; stdcall;
206
    function Disconnect: HResult; stdcall;
207
    function ConnectedTo(out pPin: IPin): HResult; stdcall;
208
    function ConnectionMediaType(out pmt: TAM_Media_Type): HResult; stdcall;
209
    function QueryPinInfo(out pInfo: TPin_Info): HResult; stdcall;
210
    function QueryDirection(var pPinDir: TPin_Direction): HResult; stdcall;
211
    function QueryId(var Id: LPWSTR): HResult; stdcall;
212
    function QueryAccept(const pmt: TAM_Media_Type): HResult; stdcall;
213
    function EnumMediaTypes(out ppEnum: IEnumMediaTypes): HResult; stdcall;
214
    function QueryInternalConnections(out apPin: IPin; var nPin: ULONG): HResult; stdcall;
215
    function EndOfStream: HResult; stdcall;
216
    function BeginFlush: HResult; stdcall;
217
    function EndFlush: HResult; stdcall;
218
    function NewSegment(tStart, tStop: TReference_Time; dRate: double): HResult; stdcall;
219
  end;
220
 
221
  IEnumPins = interface(IUnknown)
222
    ['{56A86892-0AD4-11CE-B03A-0020AF0BA770}']
223
    function Next(cPins: ULONG; out ppPins; var pcFetched: ULONG): HResult; stdcall;
224
    function Skip(cPins: ULONG): HResult; stdcall;
225
    function Reset: HResult; stdcall;
226
    function Clone(out ppEnum: IEnumPins): HResult; stdcall;
227
  end;
228
 
229
  IEnumMediaTypes = interface(IUnknown)
230
    ['{89C31040-846B-11CE-97D3-00AA0055595A}']
231
    function Next(cMediaTypes: ULONG; var ppMediaTypes: PAM_Media_Type;
232
        var pcFetched: ULONG): HResult; stdcall;
233
    function Skip(cMediaTypes: ULONG): HResult; stdcall;
234
    function Reset: HResult; stdcall;
235
    function Clone(out ppEnum: IEnumMediaTypes): HResult; stdcall;
236
  end;
237
 
238
  IEnumFilters = interface;
239
 
240
  IFilterGraph = interface(IUnknown)
241
    ['{56A8689F-0AD4-11CE-B03A-0020AF0BA770}']
242
    function AddFilter(pFilter: IBaseFilter; pName: LPCWSTR): HResult; stdcall;
243
    function RemoveFilter(pFilter: IBaseFilter): HResult; stdcall;
244
    function EnumFilters(out ppEnum: IEnumFilters): HResult; stdcall;
245
    function FindFilterByName(pName: LPCWSTR; out ppFilter: IBaseFilter): HResult; stdcall;
246
    function ConnectDirect(ppinOut, ppinIn: IPin; const pmt: TAM_Media_Type): HResult; stdcall;
247
    function Reconnect(ppin: IPin): HResult; stdcall;
248
    function Disconnect(ppin: IPin): HResult; stdcall;
249
    function SetDefaultSyncSource: HResult; stdcall;
250
  end;
251
 
252
  IEnumFilters = interface(IUnknown)
253
    ['{56A86893-0AD4-11CE-B03A-0020AF0BA770}']
254
    function Next(cFilters: ULONG; out ppFilter: IBaseFilter;
255
        var pcFetched: ULONG): HResult; stdcall;
256
    function Skip(cFilters: ULONG): HResult; stdcall;
257
    function Reset: HResult; stdcall;
258
    function Clone(out ppEnum: IEnumFilters): HResult; stdcall;
259
  end;
260
 
261
  TFilter_State = (
262
    State_Stopped,
263
    State_Paused,
264
    State_Running
265
  );
266
 
267
  IReferenceClock = interface;
268
 
269
  IMediaFilter = interface(IPersist)
270
    ['{56A86899-0AD4-11CE-B03A-0020AF0BA770}']
271
    function Stop: HResult; stdcall;
272
    function Pause: HResult; stdcall;
273
    function Run(tStart: TReference_Time): HResult; stdcall;
274
    function GetState(dwMilliSecsTimeout: DWORD; var State: TFilter_State): HResult; stdcall;
275
    function SetSyncSource(pClock: IReferenceClock): HResult; stdcall;
276
    function GetSyncSource(out pClock: IReferenceClock): HResult; stdcall;
277
  end;
278
 
279
  TFilterInfo = record
280
    achName: array[0..127] of WCHAR;
281
    pGraph: IFilterGraph;
282
  end;
283
 
284
  IBaseFilter = interface(IMediaFilter)
285
    ['{56A86895-0AD4-11CE-B03A-0020AF0BA770}']
286
    function EnumPins(out ppEnum: IEnumPins): HResult; stdcall;
287
    function FindPin(Id: LPCWSTR; out ppPin: IPin): HResult; stdcall;
288
    function QueryFilterInfo(out pInfo: TFilterInfo): HResult; stdcall;
289
    function JoinFilterGraph(pGraph: IFilterGraph; pName: LPCWSTR): HResult; stdcall;
290
    function QueryVendorInfo(var pVendorInfo: LPWSTR): HResult; stdcall;
291
  end;
292
 
293
  IReferenceClock = interface(IUnknown)
294
    ['{56A86897-0AD4-11CE-B03A-0020AF0BA770}']
295
    function GetTime(var pTime: TReference_Time): HResult; stdcall;
296
    function AdviseTime(baseTime, streamTime: TReference_Time;
297
        hEvent: THandle; var pdwAdviseCookie: DWORD): HResult; stdcall;
298
    function AdvisePeriodic(startTime, periodTime: TReference_Time;
299
        hSemaphore: HSEMAPHORE; var pdwAdviseCookie: DWORD): HResult; stdcall;
300
    function Unadvise(dwAdviseCookie: DWORD): HResult; stdcall;
301
  end;
302
 
303
  IReferenceClock2 = interface(IReferenceClock)
304
    ['{36B73885-C2C8-11CF-8B46-00805F6CEF60}']
305
  end;
306
 
307
  IMediaSample = interface(IUnknown)
308
    ['{56A8689A-0AD4-11CE-B03A-0020AF0BA770}']
309
    function GetPointer(var ppBuffer: Pointer): HResult; stdcall;
310
    function GetSize: Longint; stdcall;
311
    function GetTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
312
    function SetTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
313
    function IsSyncPoint: HResult; stdcall;
314
    function SetSyncPoint(bIsSyncPoint: BOOL): HResult; stdcall;
315
    function IsPreroll: HResult; stdcall;
316
    function SetPreroll(bIsPreroll: BOOL): HResult; stdcall;
317
    function GetActualDataLength: Longint; stdcall;
318
    function SetActualDataLength(lLen: Longint): HResult; stdcall;
319
    function GetMediaType(var ppMediaType: PAM_Media_Type): HResult; stdcall;
320
    function SetMediaType(const pMediaType: TAM_Media_Type): HResult; stdcall;
321
    function IsDiscontinuity: HResult; stdcall;
322
    function SetDiscontinuity(bDiscontinuity: BOOL): HResult; stdcall;
323
    function GetMediaTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
324
    function SetMediaTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
325
  end;                                    
326
 
327
const
328
  AM_SAMPLE_SPLICEPOINT         = $1;
329
  AM_SAMPLE_PREROLL             = $2;
330
  AM_SAMPLE_DATADISCONTINUITY   = $4;
331
  AM_SAMPLE_TYPECHANGED         = $8;
332
  AM_SAMPLE_TIMEVALID           = $10;
333
  AM_SAMPLE_TIMEDISCONTINUITY   = $40;
334
  AM_SAMPLE_FLUSH_ON_PAUSE      = $80;
335
  AM_SAMPLE_STOPVALID           = $100;
336
  AM_SAMPLE_ENDOFSTREAM         = $200;
337
  AM_STREAM_MEDIA               = 0;
338
  AM_STREAM_CONTROL             = 1;
339
 
340
type
341
  TAM_Sample2_Properties = record
342
    cbData: DWORD;
343
    dwTypeSpecificFlags: DWORD;
344
    dwSampleFlags: DWORD;
345
    lActual: Longint;
346
    tStart: TReference_Time;
347
    tStop: TReference_Time;
348
    dwStreamId: DWORD;
349
    pMediaType: PAM_Media_Type;
350
    pbBuffer: Pointer;
351
    cbBuffer: Longint;
352
  end;
353
 
354
type
355
  IMediaSample2 = interface(IMediaSample)
356
    ['{36B73884-C2C8-11CF-8B46-00805F6CEF60}']
357
    function GetProperties(cbProperties: DWORD; var pbProperties): HResult; stdcall;
358
    function SetProperties(cbProperties: DWORD; const pbProperties): HResult; stdcall;
359
  end;
360
 
361
const
362
  AM_GBF_PREVFRAMESKIPPED = 1;
363
  AM_GBF_NOTASYNCPOINT    = 2;
364
  AM_GBF_NOWAIT           = 4;
365
 
366
type
367
  IMemAllocator = interface(IUnknown)
368
    ['{56A8689C-0AD4-11CE-B03A-0020AF0BA770}']
369
    function SetProperties(const pRequest: TAllocator_Properties;
370
        var pActual: TAllocator_Properties): HResult; stdcall;
371
    function GetProperties(var pProps: TAllocator_Properties): HResult; stdcall;
372
    function Commit: HResult; stdcall;
373
    function Decommit: HResult; stdcall;      
374
    function GetBuffer(out ppBuffer: IMediaSample;
375
        var pStartTime, pEndTime: TReference_Time; dwFlags: DWORD): HResult; stdcall;
376
    function ReleaseBuffer(pBuffer: IMediaSample): HResult; stdcall;
377
  end;
378
 
379
  IMemInputPin = interface(IUnknown)
380
    ['{56A8689D-0AD4-11CE-B03A-0020AF0BA770}']
381
    function GetAllocator(out ppAllocator: IMemAllocator): HResult; stdcall;
382
    function NotifyAllocator(pAllocator: IMemAllocator; bReadOnly: BOOL): HResult; stdcall;
383
    function GetAllocatorRequirements(var pProps: TAllocator_Properties): HResult; stdcall;
384
    function Receive(pSample: IMediaSample): HResult; stdcall;
385
    function ReceiveMultiple(const pSamples; nSamples: Longint;
386
        var nSamplesProcessed: Longint): HResult; stdcall;
387
    function ReceiveCanBlock: HResult; stdcall;
388
  end;
389
 
390
  IAMovieSetup = interface(IUnknown)
391
    ['{A3D8CEC0-7E5A-11CF-BBC5-00805F6CEF20}']
392
    function Register: HResult; stdcall;
393
    function Unregister: HResult; stdcall;
394
  end;
395
 
396
const
397
  AM_SEEKING_NoPositioning          = 0;
398
  AM_SEEKING_AbsolutePositioning    = $1;
399
  AM_SEEKING_RelativePositioning    = $2;
400
  AM_SEEKING_IncrementalPositioning = $3;
401
  AM_SEEKING_PositioningBitsMask    = $3;
402
  AM_SEEKING_SeekToKeyFrame         = $4;
403
  AM_SEEKING_ReturnTime             = $8;
404
  AM_SEEKING_Segment                = $10;
405
  AM_SEEKING_NoFlush                = $20;
406
 
407
  AM_SEEKING_CanSeekAbsolute        = $1;
408
  AM_SEEKING_CanSeekForwards        = $2;
409
  AM_SEEKING_CanSeekBackwards       = $4;
410
  AM_SEEKING_CanGetCurrentPos       = $8;
411
  AM_SEEKING_CanGetStopPos          = $10;
412
  AM_SEEKING_CanGetDuration         = $20;
413
  AM_SEEKING_CanPlayBackwards       = $40;
414
  AM_SEEKING_CanDoSegments          = $80;
415
  AM_SEEKING_Source                 = $100;
416
 
417
type
418
  IMediaSeeking = interface(IUnknown)
419
    ['{36B73880-C2C8-11CF-8B46-00805F6CEF60}']
420
    function GetCapabilities(var pCapabilities: DWORD): HResult; stdcall;
421
    function CheckCapabilities(var pCapabilities: DWORD): HResult; stdcall;
422
    function IsFormatSupported(const pFormat: TGUID): HResult; stdcall;
423
    function QueryPreferredFormat(var pFormat: TGUID): HResult; stdcall;
424
    function GetTimeFormat(var pFormat: TGUID): HResult; stdcall;
425
    function IsUsingTimeFormat(const pFormat: TGUID): HResult; stdcall;
426
    function SetTimeFormat(const pFormat: TGUID): HResult; stdcall;
427
    function GetDuration(var pDuration: LONGLONG): HResult; stdcall;
428
    function GetStopPosition(var pStop: LONGLONG): HResult; stdcall;
429
    function GetCurrentPosition(var pCurrent: LONGLONG): HResult; stdcall;
430
    function ConvertTimeFormat(var pTarget: LONGLONG; const pTargetFormat: TGUID;
431
        Source: LONGLONG; const pSourceFormat: TGUID): HResult; stdcall;
432
    function SetPositions(var pCurrent: LONGLONG; dwCurrentFlags: DWORD;
433
        var pStop: LONGLONG; dwStopFlags: DWORD): HResult; stdcall;
434
    function GetPositions(var pCurrent, pStop: LONGLONG): HResult; stdcall;
435
    function GetAvailable(var pEarliest, pLatest: LONGLONG): HResult; stdcall;
436
    function SetRate(dRate: double): HResult; stdcall;
437
    function GetRate(var pdRate: double): HResult; stdcall;
438
    function GetPreroll(var pllPreroll: LONGLONG): HResult; stdcall;
439
  end;
440
 
441
const
442
  AM_MEDIAEVENT_NONOTIFY = $01;
443
 
444
type
445
  TRefFilter = record
446
    Clsid: TGUID;
447
    Name: LPWSTR;
448
  end;
449
  PRefFilter = ^TRefFilter;
450
 
451
  IEnumRegFilters = interface(IUnknown)
452
    ['{56A868A4-0AD4-11CE-B03A-0020AF0BA770}']
453
    function Next(cFilters: ULONG; var apRegFilter: PRefFilter;
454
        var pcFetched: ULONG): HResult; stdcall;
455
    function Skip(cFilters: ULONG): HResult; stdcall;
456
    function Reset: HResult; stdcall;
457
    function Clone(out ppEnum: IEnumRegFilters): HResult; stdcall;
458
  end;
459
 
460
const
461
  MERIT_PREFERRED       = $800000;
462
  MERIT_NORMAL          = $600000;
463
  MERIT_UNLIKELY        = $400000;
464
  MERIT_DO_NOT_USE      = $200000;
465
  MERIT_SW_COMPRESSOR   = $100000;
466
  MERIT_HW_COMPRESSOR   = $100050;
467
 
468
type
469
  IFilterMapper = interface(IUnknown)
470
    ['{56A868A3-0AD4-11CE-B03A-0020AF0BA770}']
471
    function RegisterFilter(const clsid: TGUID; Name: LPCWSTR; dwMerit: DWORD): HResult; stdcall;
472
    function RegisterFilterInstance(const clsid: TGUID; Name: LPCWSTR;
473
        var MRId: TGUID): HResult; stdcall;
474
    function RegisterPin(const Filter: TGUID; Name: LPCWSTR;
475
        bRendered, bOutput, bZero, bMany: BOOL; const ConnectsToFilter: TGUID;
476
        ConnectsToPin: LPCWSTR): HResult; stdcall;
477
    function RegisterPinType(const clsFilter: TGUID; strName: LPCWSTR;
478
        const clsMajorType, clsSubType: TGUID): HResult; stdcall;
479
    function UnregisterFilter(const Filter: TGUID): HResult; stdcall;
480
    function UnregisterFilterInstance(const MRId: TGUID): HResult; stdcall;
481
    function UnregisterPin(const Filter: TGUID; Name: LPCWSTR): HResult; stdcall;
482
    function EnumMatchingFilters(out ppEnum: IEnumRegFilters; dwMerit: DWORD;
483
        bInputNeeded: BOOL; const clsInMaj, clsInSub: TGUID;
484
        bRender, bOututNeeded: BOOL; const clsOutMaj, clsOutSub: TGUID): HResult; stdcall;
485
  end;
486
 
487
  PRefInTypes = ^TRefInTypes;
488
  TRefInTypes = record
489
    clsMajorType: PGUID;
490
    clsMinorType: PGUID;
491
  end;
492
 
493
  PRegFilterPins = ^TRegFilterPins;
494
  TRegFilterPins = record
495
    strName: LPWSTR;
496
    bRendered: BOOL;
497
    bOutput: BOOL;
498
    bZero: BOOL;
499
    bMany: BOOL;
500
    oFilter: PGUID;
501
    strConnectsToPin: PWCHAR;
502
    nMediaTypes: UINT;
503
    lpMediaType: PRefInTypes;
504
  end;
505
 
506
  PRegPinMedium = ^TRegPinMedium;
507
  TRegPinMedium = record
508
    clsMedium: TGUID;
509
    dw1: DWORD;
510
    dw2: DWORD;
511
  end;
512
 
513
const
514
  REG_PINFLAG_B_ZERO     = $1;
515
  REG_PINFLAG_B_RENDERER = $2;
516
  REG_PINFLAG_B_MANY     = $4;
517
  REG_PINFLAG_B_OUTPUT   = $8;
518
 
519
type
520
  PRegFilterPins2 = ^TRegFilterPins2;
521
  TRegFilterPins2 = record
522
    dwFlags: DWORD;
523
    cInstances: UINT;
524
    nMediaTypes: UINT;
525
    lpMediaType: PRefInTypes;
526
    lpMedium: PRegPinMedium;
527
    clsPinCategory: PGUID;
528
  end;
529
 
530
  TRegFilter2 = record
531
    dwVersion: DWORD;
532
    dwMerit: DWORD;
533
    case Integer of
534
      0: (
535
        cPins: ULONG;
536
        cPins2: ULONG;
537
      );
538
      1: (
539
        rgPins: PRegFilterPins;
540
        rgPins2: PRegFilterPins2;
541
      );
542
  end;
543
 
544
  IFilterMapper2 = interface(IUnknown)
545
    ['{B79BB0B0-33C1-11D1-ABE1-00A0C905F375}']
546
    function CreateCategory(const clsidCategory: TGUID; dwCategoryMerit: DWORD;
547
        Description: LPCWSTR): HResult; stdcall;
548
    function UnregisterFilter(const pclsidCategory: TGUID;
549
        szInstance: PWCHAR; const Filter: TGUID): HResult; stdcall;
550
    function RegisterFilter(const clsidFilter: TGUID; Name: LPCWSTR;
551
        out ppMoniker: IMoniker; const pclsidCategory: TGUID;
552
        szInstance: PWCHAR; const prf2: TRegFilter2): HResult; stdcall;
553
 
554
    function EnumMatchingFilters(out ppEnum: IEnumMoniker; dwFlags: DWORD;
555
        bExactMatch: BOOL; dwMerit: DWORD; bInputNeeded: BOOL; cInputTypes: DWORD;
556
        const pInputTypes, pPinCategoryIn: TGUID; bRender, bOutputNeeded: BOOL;
557
        cOutputTypes: DWORD; const pMedOut: TRegPinMedium;
558
        const pPinCategoryOut: TGUID): HResult; stdcall;
559
  end;
560
 
561
  TQualityMessageType = (
562
    Famine,
563
    Flood
564
  );
565
 
566
  TQuality = record
567
    Typ: TQualityMessageType;
568
    Proportion: Longint;
569
    Late: TReference_Time;
570
    TimeStamp: TReference_Time;
571
  end;
572
 
573
  IQualityControl = interface(IUnknown)
574
    ['{56A868A5-0AD4-11CE-B03A-0020AF0BA770}']
575
    function Notify(pSelf: IBaseFilter; q: TQuality): HResult; stdcall;
576
    function SetSink(piqc: IQualityControl): HResult; stdcall;
577
  end;
578
 
579
const
580
  CK_NOCOLORKEY = $0;
581
  CK_INDEX      = $1;
582
  CK_RGB        = $2;
583
 
584
type
585
  TColorKey = record
586
    KeyType: DWORD;
587
    PaletteIndex: DWORD;
588
    LowColorValue: COLORREF;
589
    HighColorValue: COLORREF;
590
  end;
591
 
592
const
593
  ADVISE_NONE       = 0;
594
  ADVISE_CLIPPING   = $1;
595
  ADVISE_PALETTE    = $2;
596
  ADVISE_COLORKEY   = $4;
597
  ADVISE_POSITION   = $8;
598
 
599
  ADVISE_ALL = ADVISE_CLIPPING or ADVISE_PALETTE or ADVISE_COLORKEY or ADVISE_POSITION;
600
 
601
type
602
  IOverlayNotify = interface(IUnknown)
603
    ['{56A868A0-0AD4-11CE-B03A-0020AF0BA770}']
604
    function OnPaletteChange(dwColors: DWORD; const pPalette): HResult; stdcall;
605
    function OnClipChange(const pSourceRect, pDestinationRect: TRect;
606
        const pRgnData: TRgnData): HResult; stdcall;
607
    function OnColorKeyChange(const pColorKey: TColorKey): HResult; stdcall;
608
    function OnPositionChange(const pSourceRect, pDestinationRect: TRect): HResult; stdcall;
609
  end;
610
 
611
  IOverlay = interface(IUnknown)
612
    ['{56A868A1-0AD4-11CE-B03A-0020AF0BA770}']
613
    function GetPalette(var pdwColors: DWORD; var ppPalette): HResult; stdcall;
614
    function SetPalette(dwColors: DWORD; const pPalette): HResult; stdcall;
615
    function GetDefaultColorKey(var pColorKey: TColorKey): HResult; stdcall;
616
    function GetColorKey(var pColorKey: TColorKey): HResult; stdcall;
617
    function SetColorKey(const pColorKey: TColorKey): HResult; stdcall;
618
    function GetWindowHandle(var pHwnd: HWND): HResult; stdcall;
619
    function GetClipList(var pSourceRect, pDestinationRect: TRect;
620
        var ppRgnData: PRgnData): HResult; stdcall;
621
    function GetVideoPosition(var pSourceRect, pDestinationRect: TRect): HResult; stdcall;
622
    function Advise(pOverlayNotify: IOverlayNotify; dwInterests: DWORD): HResult; stdcall;
623
    function Unadvise: HResult; stdcall;
624
  end;
625
 
626
  IMediaEventSink = interface(IUnknown)
627
    ['{56A868A2-0AD4-11CE-B03A-0020AF0BA770}']
628
    function Notify(EventCode, EventParam1, EventParam2: Longint): HResult; stdcall;
629
  end;
630
 
631
  IFileSourceFilter = interface(IUnknown)
632
    ['{56A868A6-0AD4-11CE-B03A-0020AF0BA770}']
633
    function Load(pszFileName: PWCHAR; const pmt: TAM_Media_Type): HResult; stdcall;
634
    function GetCurFile(var ppszFileName: POLESTR; out pmt: TAM_Media_Type): HResult; stdcall;
635
  end;
636
 
637
  IFileSinkFilter = interface(IUnknown)
638
    ['{A2104830-7C70-11CF-8BCE-00AA00A3F1A6}']
639
    function SetFileName(pszFileName: POLESTR; const pmt: TAM_Media_Type): HResult; stdcall;
640
    function GetCurFile(var ppszFileName: POLESTR; out pmt: TAM_Media_Type): HResult; stdcall;
641
  end;
642
 
643
  IFileSinkFilter2 = interface(IFileSinkFilter)
644
    ['{00855B90-CE1B-11D0-BD4F-00A0C911CE86}']
645
    function SetMode(dwFlags: DWORD): HResult; stdcall;
646
    function GetMode(var pdwFlags: DWORD): HResult; stdcall;
647
  end;
648
 
649
  TAM_FileSink_Flags = (
650
    AM_FILE_INVALID_0,
651
    AM_FILE_OVERWRITE
652
  );
653
 
654
  PAsyncIOReq = ^TAsyncIOReq;
655
  TAsyncIOReq = record
656
    engine: array[0..3] of DWORD;
657
    lpv: Pointer;
658
    cb: DWORD;
659
    dwError: DWORD;
660
    cbDone: DWORD;
661
    liPos: TLargeInteger;
662
    hEvent: DWORD;
663
    dwUser: DWORD;
664
  end;
665
 
666
  IFileAsyncIO = interface(IUnknown)
667
    ['{56A868A7-0AD4-11CE-B03A-0020AF0BA770}']
668
    function QueryAlignment(var pdwAlign: DWORD): HResult; stdcall;
669
    function Read(const pReq: TAsyncIOReq): HResult; stdcall;
670
    function Write(const pReq: TAsyncIOReq): HResult; stdcall;
671
    function WaitForNext(var ppReq: PAsyncIOReq;
672
        dwTimeout: DWORD): HResult; stdcall;
673
    function WaitForSpecific(var pReq: TAsyncIOReq;
674
        dwTimeout: DWORD): HResult; stdcall;
675
    function DiscardPending: HResult; stdcall;
676
    function Flush: HResult; stdcall;
677
  end;
678
 
679
  IGraphBuilder = interface(IFilterGraph)
680
    ['{56A868A9-0AD4-11CE-B03A-0020AF0BA770}']
681
    function Connect(ppinOut, ppinIn: IPin): HResult; stdcall;
682
    function Render(ppinOut: IPin): HResult; stdcall;
683
    function RenderFile(lpcwstrFile, lpcwstrPlayList: LPCWSTR): HResult; stdcall;
684
    function AddSourceFilter(lpcwstrFileName, lpcwstrFilterName: LPCWSTR;
685
        out ppFilter: IBaseFilter): HResult; stdcall;
686
    function SetLogFile(hFile: THandle): HResult; stdcall;
687
    function Abort: HResult; stdcall;
688
    function ShouldOperationContinue: HResult; stdcall;
689
  end;
690
 
691
  IAMCopyCaptureFileProgress = interface;
692
 
693
  ICaptureGraphBuilder = interface(IUnknown)
694
    ['{BF87B6E0-8C27-11D0-B3F0-00AA003761C5}']
695
    function SetFiltergraph(pfg: IGraphBuilder): HResult; stdcall;
696
    function GetFiltergraph(out ppfg: IGraphBuilder): HResult; stdcall;
697
    function SetOutputFileName(const pType: TGUID; lpstrFile: PWCHAR;
698
        out ppf: IBaseFilter; out ppSink: IFileSinkFilter): HResult; stdcall;
699
    function FindInterface(const pCategory: TGUID; pf: IBaseFilter;
700
        const riid: TGUID; out ppint): HResult; stdcall;
701
    function RenderStream(const pCategory: TGUID; pSource: IUnknown;
702
        pfCompressor, pfRenderer: IBaseFilter): HResult; stdcall;
703
    function ControlStream(const pCategory: TGUID; pFilter: IBaseFilter;
704
        const pstart, pstop: TReference_Time; wStartCookie, wStopCookie: WORD): HResult; stdcall;
705
    function AllocCapFile(lpstr: PWCHAR; dwlSize: LONGLONG): HResult; stdcall;
706
    function CopyCaptureFile(lpwstrOld, lpwstrNew: PWCHAR; fAllowEscAbort: Integer;
707
        pCallback: IAMCopyCaptureFileProgress): HResult; stdcall;
708
  end;
709
 
710
  IAMCopyCaptureFileProgress = interface(IUnknown)
711
    ['{670D1D20-A068-11D0-B3F0-00AA003761C5}']
712
    function Progress(iProgress: Integer): HResult; stdcall;
713
  end;
714
 
715
const
716
  AM_RENDEREX_RENDERTOEXISTINGRENDERERS = $01;
717
 
718
type
719
  IFilterGraph2 = interface(IGraphBuilder)
720
    ['{36B73882-C2C8-11CF-8B46-00805F6CEF60}']
721
    function AddSourceFilterForMoniker(pMoniker: IMoniker; pCtx: IBindCtx;
722
        lpcwstrFilterName: LPCWSTR; out ppFilter: IBaseFilter): HResult; stdcall;
723
    function ReconnectEx(ppin: IPin; const pmt: TAM_Media_Type): HResult; stdcall;
724
    function RenderEx(pPinOut: IPin; dwFlags: DWORD; pvContext: Pointer): HResult; stdcall;
725
  end;
726
 
727
  IStreamBuilder = interface(IUnknown)
728
    ['{56A868BF-0AD4-11CE-B03A-0020AF0BA770}']
729
    function Render(ppinOut: IPin; pGraph: IGraphBuilder): HResult; stdcall;
730
    function Backout(ppinOut: IPin; pGraph: IGraphBuilder): HResult; stdcall;
731
  end;
732
 
733
  IAsyncReader = interface(IUnknown)
734
    ['{56A868AA-0AD4-11CE-B03A-0020AF0BA770}']
735
    function RequestAllocator(pPreferred: IMemAllocator;
736
        const pProps: TAllocator_Properties; out ppActual: IMemAllocator): HResult; stdcall;
737
    function Request(pSample: IMediaSample; dwUser: DWORD): HResult; stdcall;
738
    function WaitForNext(dwTimeout: DWORD; out ppSample: IMediaSample;
739
        var pdwUser: DWORD): HResult; stdcall;
740
    function SyncReadAligned(pSample: IMediaSample): HResult; stdcall;
741
    function SyncRead(llPosition: LONGLONG; lLength: Longint; var pBuffer): HResult; stdcall;
742
    function Length(var pTotal, pAvailable: LONGLONG): HResult; stdcall;
743
    function BeginFlush: HResult; stdcall;
744
    function EndFlush: HResult; stdcall;
745
  end;
746
 
747
  IGraphVersion = interface(IUnknown)
748
    ['{56A868AB-0AD4-11CE-B03A-0020AF0BA770}']
749
    function QueryVersion(var pVersion: Longint): HResult; stdcall;
750
  end;
751
 
752
  IResourceConsumer = interface(IUnknown)
753
    ['{56A868AD-0AD4-11CE-B03A-0020AF0BA770}']
754
    function AcquireResource(idResource: Longint): HResult; stdcall;
755
    function ReleaseResource(idResource: Longint): HResult; stdcall;
756
  end;
757
 
758
  IResourceManager = interface(IUnknown)
759
    ['{56A868AC-0AD4-11CE-B03A-0020AF0BA770}']
760
    function Register(pName: LPCWSTR; cResource: Longint;
761
        var plToken: Longint): HResult; stdcall;
762
    function RegisterGroup(pName: LPCWSTR; cResource: Longint;
763
        const palTokens: Longint; var plToken: Longint): HResult; stdcall;
764
    function RequestResource(idResource: Longint; pFocusObject: IUnknown;
765
        pConsumer: IResourceConsumer): HResult; stdcall;
766
    function NotifyAcquire(idResource: Longint; pConsumer: IResourceConsumer;
767
        hr: HResult): HResult; stdcall;
768
    function NotifyRelease(idResource: Longint; pConsumer: IResourceConsumer;
769
        bStillWant: BOOL): HResult; stdcall;
770
    function CancelRequest(idResource: Longint; pConsumer: IResourceConsumer): HResult; stdcall;
771
    function SetFocus(pFocusObject: IUnknown): HResult; stdcall;
772
    function ReleaseFocus(pFocusObject: IUnknown): HResult; stdcall;
773
  end;
774
 
775
  IDistributorNotify = interface(IUnknown)
776
    ['{56A868AF-0AD4-11CE-B03A-0020AF0BA770}']
777
    function Stop: HResult; stdcall;
778
    function Pause: HResult; stdcall;
779
    function Run(tStart: TReference_Time): HResult; stdcall;
780
    function SetSyncSource(pClock: IReferenceClock): HResult; stdcall;
781
    function NotifyGraphChange: HResult; stdcall;
782
  end;
783
 
784
const
785
  AM_STREAM_INFO_START_DEFINED   = $1;
786
  AM_STREAM_INFO_STOP_DEFINED    = $2;
787
  AM_STREAM_INFO_DISCARDING      = $4;
788
  AM_STREAM_INFO_STOP_SEND_EXTRA = $10;
789
 
790
type
791
  {TAM_Stream_Info_Flags = (
792
    AM_STREAM_INFO_INVALID_0,
793
    AM_STREAM_INFO_START_DEFINED,
794
    AM_STREAM_INFO_INVALID_1,
795
    AM_STREAM_INFO_STOP_DEFINED,
796
    AM_STREAM_INFO_INVALID_3,
797
    AM_STREAM_INFO_DISCARDING,
798
    AM_STREAM_INFO_INVALID_4,
799
    AM_STREAM_INFO_INVALID_5,
800
    AM_STREAM_INFO_INVALID_6,
801
    AM_STREAM_INFO_INVALID_7,
802
    AM_STREAM_INFO_INVALID_8,
803
    AM_STREAM_INFO_INVALID_9,
804
    AM_STREAM_INFO_INVALID_10,
805
    AM_STREAM_INFO_INVALID_11,
806
    AM_STREAM_INFO_INVALID_12,
807
    AM_STREAM_INFO_INVALID_13,
808
    AM_STREAM_INFO_INVALID_14,
809
    AM_STREAM_INFO_INVALID_15,
810
    AM_STREAM_INFO_STOP_SEND_EXTRA
811
  );
812
      }
813
  TAM_Stream_Info = record
814
    tStart: TReference_Time;
815
    tStop: TReference_Time;
816
    dwStartCookie: DWORD;
817
    dwStopCookie: DWORD;
818
    dwFlags: DWORD;
819
  end;
820
 
821
  IAMStreamControl = interface(IUnknown)
822
    ['{36b73881-c2c8-11cf-8b46-00805f6cef60}']
823
    function StartAt(const ptStart: TReference_Time; dwCookie: DWORD): HResult; stdcall;
824
    function StopAt(const ptStop: TReference_Time; bSendExtra: BOOL;
825
        dwCookie: DWORD): HResult; stdcall;
826
    function GetInfo(out pInfo: TAM_Stream_Info): HResult; stdcall;
827
  end;
828
 
829
  ISeekingPassThru = interface(IUnknown)
830
    ['{36B73883-C2C8-11CF-8B46-00805F6CEF60}']
831
    function Init(bSupportRendering: BOOL; pPin: IPin): HResult; stdcall;
832
  end;
833
 
834
  TVideo_Stream_Config_Caps = record
835
    guid: TGUID;
836
    VideoStandard: ULONG;
837
    InputSize: TSize;
838
    MinCroppingSize: TSize;
839
    MaxCroppingSize: TSize;
840
    CropGranularityX: Integer;
841
    CropGranularityY: Integer;
842
    CropAlignX: Integer;
843
    CropAlignY: Integer;
844
    MinOutputSize: TSize;
845
    MaxOutputSize: TSize;
846
    OutputGranularityX: Integer;
847
    OutputGranularityY: Integer;
848
    StretchTapsX: Integer;
849
    StretchTapsY: Integer;
850
    ShrinkTapsX: Integer;
851
    ShrinkTapsY: Integer;
852
    MinFrameInterval: LONGLONG;
853
    MaxFrameInterval: LONGLONG;
854
    MinBitsPerSecond: Longint;
855
    MaxBitsPerSecond: Longint;
856
  end;
857
 
858
  TAudio_Stream_Config_Caps = record
859
    guid: TGUID;
860
    MinimumChannels: ULONG;
861
    MaximumChannels: ULONG;
862
    ChannelsGranularity: ULONG;
863
    MinimumBitsPerSample: ULONG;
864
    MaximumBitsPerSample: ULONG;
865
    BitsPerSampleGranularity: ULONG;
866
    MinimumSampleFrequency: ULONG;
867
    MaximumSampleFrequency: ULONG;
868
    SampleFrequencyGranularity: ULONG;
869
  end;
870
 
871
  IAMStreamConfig = interface(IUnknown)
872
    ['{C6E13340-30AC-11d0-A18C-00A0C9118956}']
873
    function SetFormat(const pmt: TAM_Media_Type): HResult; stdcall;
874
    function GetFormat(var ppmt: PAM_Media_Type): HResult; stdcall;
875
    function GetNumberOfCapabilities(var piCount, piSize: Integer): HResult; stdcall;
876
    function GetStreamCaps(iIndex: Integer; var ppmt: PAM_Media_Type;
877
        var pSCC): HResult; stdcall;
878
  end;
879
 
880
  TInterleavingMode = (
881
    INTERLEAVE_NONE,
882
    INTERLEAVE_CAPTURE,
883
    INTERLEAVE_FULL
884
  );
885
 
886
  IConfigInterleaving = interface(IUnknown)
887
    ['{BEE3D220-157B-11d0-BD23-00A0C911CE86}']
888
    function put_Mode(mode: TInterleavingMode): HResult; stdcall;
889
    function get_Mode(var pMode: TInterleavingMode): HResult; stdcall;
890
    function put_Interleaving(const prtInterleave, prtPreroll: TReference_Time): HResult; stdcall;
891
    function get_Interleaving(var prtInterleave, prtPreroll: TReference_Time): HResult; stdcall;
892
  end;
893
 
894
  IConfigAviMux = interface(IUnknown)
895
    ['{5ACD6AA0-F482-11ce-8B67-00AA00A3F1A6}']
896
    function SetMasterStream(iStream: Longint): HResult; stdcall;
897
    function GetMasterStream(var pStream: Longint): HResult; stdcall;
898
    function SetOutputCompatibilityIndex(fOldIndex: BOOL): HResult; stdcall;
899
    function GetOutputCompatibilityIndex(var pfOldIndex: BOOL): HResult; stdcall;
900
  end;
901
 
902
const
903
  CompressionCaps_CanQuality    = $1;
904
  CompressionCaps_CanCrunch     = $2;
905
  CompressionCaps_CanKeyFrame   = $4;
906
  CompressionCaps_CanBFrame     = $8;
907
  CompressionCaps_CanWindow     = $10;
908
 
909
type
910
  IAMVideoCompression = interface(IUnknown)
911
    ['{C6E13343-30AC-11d0-A18C-00A0C9118956}']
912
    function put_KeyFrameRate(KeyFrameRate: Longint): HResult; stdcall;
913
    function get_KeyFrameRate(pKeyFrameRate: Longint): HResult; stdcall;
914
    function put_PFramesPerKeyFrame(PFramesPerKeyFrame: Longint): HResult; stdcall;
915
    function get_PFramesPerKeyFrame(var pPFramesPerKeyFrame: Longint): HResult; stdcall;
916
    function put_Quality(Quality: double): HResult; stdcall;
917
    function get_Quality(var pQuality: double): HResult; stdcall;
918
    function put_WindowSize(WindowSize: LONGLONG): HResult; stdcall;
919
    function get_WindowSize(var pWindowSize: LONGLONG): HResult; stdcall;
920
    function GetInfo(pszVersion: PWCHAR; var pcbVersion: Integer;
921
        pszDescription: LPWSTR; var pcbDescription: Integer;
922
        var pDefaultKeyFrameRate, pDefaultPFramesPerKey: Longint;
923
        var pDefaultQuality: double; pCapabilities: Longint): HResult; stdcall;
924
    function OverrideKeyFrame(FrameNumber: Longint): HResult; stdcall;
925
    function OverrideFrameSize(FrameNumber, Size: Longint): HResult; stdcall;
926
  end;
927
 
928
const
929
  VfwCaptureDialog_Source  = $1;
930
  VfwCaptureDialog_Format  = $2;
931
  VfwCaptureDialog_Display = $4;
932
 
933
  VfwCompressDialog_Config = $1;
934
  VfwCompressDialog_About  = $2;
935
 
936
type
937
  IAMVfwCaptureDialogs = interface(IUnknown)
938
    ['{D8D715A0-6E5E-11D0-B3F0-00AA003761C5}']
939
    function HasDialog(iDialog: Integer): HResult; stdcall;
940
    function ShowDialog(iDialog: Integer; hwnd: HWND): HResult; stdcall;
941
    function SendDriverMessage(iDialog: Integer; uMsg: Integer;
942
        dw1, dw2: Longint): HResult; stdcall;
943
  end;
944
 
945
  IAMVfwCompressDialogs = interface(IUnknown)
946
    ['{D8D715A3-6E5E-11D0-B3F0-00AA003761C5}']
947
    function ShowDialog(iDialog: Integer; hwnd: HWND): HResult; stdcall;
948
    function GetState(var pState; var pcbState: Integer): HResult; stdcall;
949
    function SetState(const pState; cbState: Integer): HResult; stdcall;
950
    function SendDriverMessage(uMsg: Integer; dw1, dw2: Longint): HResult; stdcall;
951
  end;
952
 
953
  IAMDroppedFrames = interface(IUnknown)
954
    ['{C6E13344-30AC-11d0-A18C-00A0C9118956}']
955
    function GetNumDropped(var plDropped: Longint): HResult; stdcall;
956
    function GetNumNotDropped(var plNotDropped: Longint): HResult; stdcall;
957
    function GetDroppedInfo(lSize: Longint; var plArray: Longint;
958
        var plNumCopied: Longint): HResult; stdcall;
959
    function GetAverageFrameSize(var plAverageSize: Longint): HResult; stdcall;
960
  end;
961
 
962
const
963
  AMF_AUTOMATICGAIN = -1;
964
 
965
type
966
  IAMAudioInputMixer = interface(IUnknown)
967
    ['{54C39221-8380-11d0-B3F0-00AA003761C5}']
968
    function put_Enable(fEnable: BOOL): HResult; stdcall;
969
    function get_Enable(var pfEnable: BOOL): HResult; stdcall;
970
    function put_Mono(fMono: BOOL): HResult; stdcall;
971
    function get_Mono(var pfMono: BOOL): HResult; stdcall;
972
    function put_MixLevel(Level: double): HResult; stdcall;
973
    function get_MixLevel(var pLevel: double): HResult; stdcall;
974
    function put_Pan(Pan: double): HResult; stdcall;
975
    function get_Pan(var pPan: double): HResult; stdcall;
976
    function put_Loudness(fLoudness: BOOL): HResult; stdcall;
977
    function get_Loudness(var pfLoudness: BOOL): HResult; stdcall;
978
    function put_Treble(Treble: double): HResult; stdcall;
979
    function get_Treble(var pTreble: double): HResult; stdcall;
980
    function get_TrebleRange(var pRange: double): HResult; stdcall;
981
    function put_Bass(Bass: double): HResult; stdcall;
982
    function get_Bass(var pBass: double): HResult; stdcall;
983
    function get_BassRange(var pRange: double): HResult; stdcall;
984
  end;
985
 
986
  IAMBufferNegotiation = interface(IUnknown)
987
    ['{56ED71A0-AF5F-11D0-B3F0-00AA003761C5}']
988
    function SuggestAllocatorProperties(const pprop: TAllocator_Properties): HResult; stdcall;
989
    function GetAllocatorProperties(var pprop: TAllocator_Properties): HResult; stdcall;
990
  end;
991
 
992
const
993
  AnalogVideo_None        = 0;
994
  AnalogVideo_NTSC_M      = $1;
995
  AnalogVideo_NTSC_M_J    = $2;
996
  AnalogVideo_NTSC_433    = $4;
997
  AnalogVideo_PAL_B       = $10;
998
  AnalogVideo_PAL_D       = $20;
999
  AnalogVideo_PAL_G       = $40;
1000
  AnalogVideo_PAL_H       = $80;
1001
  AnalogVideo_PAL_I       = $100;
1002
  AnalogVideo_PAL_M       = $200;
1003
  AnalogVideo_PAL_N       = $400;
1004
  AnalogVideo_PAL_60      = $800;
1005
  AnalogVideo_SECAM_B     = $1000;
1006
  AnalogVideo_SECAM_D     = $2000;
1007
  AnalogVideo_SECAM_G     = $4000;
1008
  AnalogVideo_SECAM_H     = $8000;
1009
  AnalogVideo_SECAM_K     = $10000;
1010
  AnalogVideo_SECAM_K1    = $20000;
1011
  AnalogVideo_SECAM_L     = $40000;
1012
  AnalogVideo_SECAM_L1    = $80000;
1013
 
1014
  AnalogVideo_NTSC_Mask   = $00000007;
1015
  AnalogVideo_PAL_Mask    = $00000FF0;
1016
  AnalogVideo_SECAM_Mask  = $000FF000;
1017
 
1018
type
1019
  TTunerInputType =(
1020
    TunerInputCable,
1021
    TunerInputAntenna
1022
  );
1023
 
1024
  TVideoCopyProtectionType = (
1025
    VideoCopyProtectionMacrovisionBasic,
1026
    VideoCopyProtectionMacrovisionCBI
1027
  );
1028
 
1029
  TPhysicalConnectorType = (
1030
    PhysConn_Video_Tuner,
1031
    PhysConn_Video_Composite,
1032
    PhysConn_Video_SVideo,
1033
    PhysConn_Video_RGB,
1034
    PhysConn_Video_YRYBY,
1035
    PhysConn_Video_SerialDigital,
1036
    PhysConn_Video_ParallelDigital,
1037
    PhysConn_Video_SCSI,
1038
    PhysConn_Video_AUX,
1039
    PhysConn_Video_1394,
1040
    PhysConn_Video_USB,
1041
    PhysConn_Video_VideoDecoder,
1042
    PhysConn_Video_VideoEncoder,
1043
    PhysConn_Video_SCART,
1044
    PhysConn_Video_Black,
1045
    PhysConn_Audio_Tuner,
1046
    PhysConn_Audio_Line,
1047
    PhysConn_Audio_Mic,
1048
    PhysConn_Audio_AESDigital,
1049
    PhysConn_Audio_SPDIFDigital,
1050
    PhysConn_Audio_SCSI,
1051
    PhysConn_Audio_AUX,
1052
    PhysConn_Audio_1394,
1053
    PhysConn_Audio_USB,
1054
    PhysConn_Audio_AudioDecoder
1055
  );
1056
 
1057
  IAMAnalogVideoDecoder = interface(IUnknown)
1058
    ['{C6E13350-30AC-11d0-A18C-00A0C9118956}']
1059
    function get_AvailableTVFormats(var lAnalogVideoStandard: Longint): HResult; stdcall;
1060
    function put_TVFormat(lAnalogVideoStandard: Longint): HResult; stdcall;
1061
    function get_TVFormat(var plAnalogVideoStandard: Longint): HResult; stdcall;
1062
    function get_HorizontalLocked(var plLocked: Longint): HResult; stdcall;
1063
    function put_VCRHorizontalLocking(lVCRHorizontalLocking: Longint): HResult; stdcall;
1064
    function get_VCRHorizontalLocking(var plVCRHorizontalLocking: Longint): HResult; stdcall;
1065
    function get_NumberOfLines(var plNumberOfLines: Longint): HResult; stdcall;
1066
    function put_OutputEnable(lOutputEnable: LongBool): HResult; stdcall;
1067
    function get_OutputEnable(var plOutputEnable: LongBool): HResult; stdcall;
1068
  end;
1069
 
1070
  TVideoProcAmpProperty = (
1071
    VideoProcAmp_Brightness,
1072
    VideoProcAmp_Contrast,
1073
    VideoProcAmp_Hue,
1074
    VideoProcAmp_Saturation,
1075
    VideoProcAmp_Sharpness,
1076
    VideoProcAmp_Gamma,
1077
    VideoProcAmp_ColorEnable,
1078
    VideoProcAmp_WhiteBalance,
1079
    VideoProcAmp_BacklightCompensation
1080
  );
1081
 
1082
  TVideoProcAmpFlags = (
1083
    VideoProcAmp_Flags_Manual,
1084
    VideoProcAmp_Flags_Auto
1085
  );
1086
 
1087
  IAMVideoProcAmp = interface(IUnknown)
1088
    ['{C6E13360-30AC-11d0-A18C-00A0C9118956}']
1089
    function GetRange(Property_: TVideoProcAmpProperty;
1090
        var pMin, pMax, pSteppingDelta, pDefault, pCapsFlags: TVideoProcAmpFlags): HResult; stdcall;
1091
    function Set_(Property_: TVideoProcAmpProperty; lValue: Longint;
1092
        Flags: TVideoProcAmpFlags): HResult; stdcall;
1093
    function Get(Property_: TVideoProcAmpProperty; var lValue: Longint;
1094
        var Flags: TVideoProcAmpFlags): HResult; stdcall;
1095
  end;
1096
 
1097
  TCameraControlProperty = (
1098
    CameraControl_Pan,
1099
    CameraControl_Tilt,
1100
    CameraControl_Roll,
1101
    CameraControl_Zoom,
1102
    CameraControl_Exposure,
1103
    CameraControl_Iris,
1104
    CameraControl_Focus
1105
  );
1106
 
1107
  TCameraControlFlags = (
1108
    CameraControl_Flags_Manual,
1109
    CameraControl_Flags_Auto
1110
  );
1111
 
1112
  IAMCameraControl = interface(IUnknown)
1113
    ['{C6E13370-30AC-11d0-A18C-00A0C9118956}']
1114
    function GetRange(Property_: TCameraControlProperty;
1115
        var pMin, pMax, pSteppingDelta, pDefault, pCapsFlags: Longint): HResult; stdcall;
1116
    function Set_(Property_: TCameraControlProperty; lValue: Longint;
1117
        Flags: TCameraControlFlags): HResult; stdcall;
1118
    function Get(Property_: TCameraControlProperty; var lValue: Longint;
1119
        var Flags: TCameraControlFlags): HResult; stdcall;
1120
  end;
1121
 
1122
  IAMCrossbar = interface(IUnknown)
1123
    ['{C6E13380-30AC-11d0-A18C-00A0C9118956}']
1124
    function get_PinCounts(var OutputPinCount, InputPinCount: Longint): HResult; stdcall;
1125
    function CanRoute(OutputPinIndex, InputPinIndex: Longint): HResult; stdcall;
1126
    function Route(OutputPinIndex, InputPinIndex: Longint): HResult; stdcall;
1127
    function get_IsRoutedTo(OutputPinIndex: Longint;
1128
        var InputPinIndex: Longint): HResult; stdcall;
1129
    function get_CrossbarPinInfo(IsInputPin: BOOL; PinIndex: Longint;
1130
        var PinIndexRelated, PhysicalType: Longint): HResult; stdcall;
1131
  end;
1132
 
1133
const
1134
  AMTUNER_SUBCHAN_NO_TUNE = -2;
1135
  AMTUNER_SUBCHAN_DEFAULT = -1;
1136
 
1137
  AMTUNER_HASNOSIGNALSTRENGTH = -1;
1138
  AMTUNER_NOSIGNAL            = 0;
1139
  AMTUNER_SIGNALPRESENT       = 1;
1140
 
1141
  AMTUNER_MODE_DEFAULT    = 0;
1142
  AMTUNER_MODE_TV         = $1;
1143
  AMTUNER_MODE_FM_RADIO   = $2;
1144
  AMTUNER_MODE_AM_RADIO   = $4;
1145
  AMTUNER_MODE_DSS        = $8;
1146
 
1147
type
1148
  TAMTunerModeType = DWORD;
1149
 
1150
  TAMTunerEventType = (
1151
    AMTUNER_EVENT_CHANGED
1152
  );
1153
  //AMTUNER_EVENT_CHANGED   = $1;
1154
 
1155
  IAMTunerNotification = interface;
1156
 
1157
  IAMTuner = interface(IUnknown)
1158
    ['{211A8761-03AC-11d1-8D13-00AA00BD8339}']
1159
    function put_Channel(lChannel, lVideoSubChannel, lAudioSubChannel: Longint): HResult; stdcall;
1160
    function get_Channel(var lChannel, lVideoSubChannel, lAudioSubChannel: Longint): HResult; stdcall;
1161
    function ChannelMinMax(var lChannelMin, lChannelMax): HResult; stdcall;
1162
    function put_CountryCode(lCountryCode: Longint): HResult; stdcall;
1163
    function get_CountryCode(var lCountryCode: Longint): HResult; stdcall;
1164
    function put_TuningSpace(lTuningSpace: Longint): HResult; stdcall;
1165
    function get_TuningSpace(var lTuningSpace: Longint): HResult; stdcall;
1166
    function Logon(hCurrentUser: THandle): HResult; stdcall;
1167
    function Logout: HResult; stdcall;
1168
    function SignalPresent(var plSignalStrength: Longint): HResult; stdcall;
1169
    function put_Mode(lMode: TAMTunerModeType): HResult; stdcall;
1170
    function get_Mode(var plMode: TAMTunerModeType): HResult; stdcall;
1171
    function GetAvailableModes(var plModes: Longint): HResult; stdcall;
1172
    function RegisterNotificationCallBack(pNotify: IAMTunerNotification;
1173
        lEvents: Longint): HResult; stdcall;
1174
    function UnRegisterNotificationCallBack(pNotify: IAMTunerNotification): HResult; stdcall;
1175
  end;
1176
 
1177
  IAMTunerNotification = interface(IUnknown)
1178
    ['{211A8760-03AC-11d1-8D13-00AA00BD8339}']
1179
    function OnEvent(Event: TAMTunerEventType): HResult; stdcall;
1180
  end;
1181
 
1182
  IAMTVTuner = interface(IAMTuner)
1183
    ['{211A8766-03AC-11d1-8D13-00AA00BD8339}']
1184
    function get_AvailableTVFormats(var lAnalogVideoStandard: Longint): HResult; stdcall;
1185
    function get_TVFormat(var plAnalogVideoStandard: Longint): HResult; stdcall;
1186
    function AutoTune(lChannel: Longint; var plFoundSignal: Longint): HResult; stdcall;
1187
    function StoreAutoTune: HResult; stdcall;
1188
    function get_NumInputConnections(var plNumInputConnections: Longint): HResult; stdcall;
1189
    function put_InputType(lIndex: Longint; InputType: TTunerInputType): HResult; stdcall;
1190
    function get_InputType(lIndex: Longint; var InputType: TTunerInputType): HResult; stdcall;
1191
    function put_ConnectInput(lIndex: Longint): HResult; stdcall;
1192
    function get_ConnectInput(var plIndex: Longint): HResult; stdcall;
1193
    function get_VideoFrequency(var lFreq: Longint): HResult; stdcall;
1194
    function get_AudioFrequency(var lFreq: Longint): HResult; stdcall;
1195
  end;
1196
 
1197
  IBPCSatelliteTuner = interface(IAMTuner)
1198
    ['{211A8765-03AC-11d1-8D13-00AA00BD8339}']
1199
    function get_DefaultSubChannelTypes(var plDefaultVideoType, plDefaultAudioType: Longint): HResult; stdcall;
1200
    function put_DefaultSubChannelTypes(lDefaultVideoType, lDefaultAudioType: Longint): HResult; stdcall;
1201
    function IsTapingPermitted: HResult; stdcall;
1202
  end;
1203
 
1204
const
1205
  AMTVAUDIO_MODE_MONO   = $1;
1206
  AMTVAUDIO_MODE_STEREO = $2;
1207
  AMTVAUDIO_MODE_LANG_A = $10;
1208
  AMTVAUDIO_MODE_LANG_B = $20;
1209
  AMTVAUDIO_MODE_LANG_C = $40;
1210
 
1211
type
1212
  TAMTVAudioEventType = (
1213
    AMTVAUDIO_EVENT_CHANGED
1214
  );
1215
 
1216
  IAMTVAudio = interface(IUnknown)
1217
    ['{83EC1C30-23D1-11d1-99E6-00A0C9560266}']
1218
    function GetHardwareSupportedTVAudioModes(var plModes: Longint): HResult; stdcall;
1219
    function GetAvailableTVAudioModes(var plModes: Longint): HResult; stdcall;
1220
    function get_TVAudioMode(var plMode: Longint): HResult; stdcall;
1221
    function put_TVAudioMode(lMode: Longint): HResult; stdcall;
1222
    function RegisterNotificationCallBack(pNotify: IAMTunerNotification;
1223
        lEvents: Longint): HResult; stdcall;
1224
    function UnRegisterNotificationCallBack(pNotify: IAMTunerNotification): HResult; stdcall;
1225
  end;
1226
 
1227
  IAMTVAudioNotification = interface(IUnknown)
1228
    ['{83EC1C33-23D1-11D1-99E6-00A0C9560266}']
1229
    function OnEvent(Event: TAMTVAudioEventType): HResult; stdcall;
1230
  end;
1231
 
1232
  IAMAnalogVideoEncoder = interface(IUnknown)
1233
    ['{C6E133B0-30AC-11d0-A18C-00A0C9118956}']
1234
    function get_AvailableTVFormats(var lAnalogVideoStandard: Longint): HResult; stdcall;
1235
    function put_TVFormat(lAnalogVideoStandard: Longint): HResult; stdcall;
1236
    function get_TVFormat(var plAnalogVideoStandard: Longint): HResult; stdcall;
1237
    function put_CopyProtection(lVideoCopyProtection: Longint): HResult; stdcall;
1238
    function get_CopyProtection(var lVideoCopyProtection: Longint): HResult; stdcall;
1239
    function put_CCEnable(lCCEnable: LongBool): HResult; stdcall;
1240
    function get_CCEnable(var lCCEnable: LongBool): HResult; stdcall;
1241
  end;
1242
 
1243
  TAMProperty_Pin = (
1244
    AMPROPERTY_PIN_CATEGORY,
1245
    AMPROPERTY_PIN_MEDIUM
1246
  );
1247
 
1248
  IMediaPropertyBag = interface(IPropertyBag)
1249
    ['{6025A880-C0D5-11D0-BD4E-00A0C911CE86}']
1250
    function EnumProperty(iProperty: ULONG; var pvarPropertyName,
1251
        pvarPropertyValue: Variant): HResult; stdcall;
1252
  end;
1253
 
1254
  IPersistMediaPropertyBag = interface(IPersist)
1255
     ['{5738E040-B67F-11d0-BD4D-00A0C911CE86}']
1256
     function InitNew: HResult; stdcall;
1257
     function Load(pPropBag: IMediaPropertyBag; pErrorLog: IErrorLog): HResult; stdcall;
1258
     function Save(pPropBag: IMediaPropertyBag; fClearDirty, fSaveAllProperties: BOOL): HResult; stdcall;
1259
  end;
1260
 
1261
  IAMPhysicalPinInfo = interface(IUnknown)
1262
    ['{F938C991-3029-11CF-8C44-00AA006B6814}']
1263
    function GetPhysicalType(var pType: Longint; var ppszType: POLESTR): HResult; stdcall;
1264
  end;
1265
 
1266
  IAMExtDevice = interface(IUnknown)
1267
    ['{B5730A90-1A2C-11CF-8C23-00AA006B6814}']
1268
    function GetCapability(Capability: Longint; var pValue: Longint; pdblValue: double): HResult; stdcall;
1269
    function get_ExternalDeviceID(var ppszData: POLESTR): HResult; stdcall;
1270
    function get_ExternalDeviceVersion(var ppszData: POLESTR): HResult; stdcall;
1271
    function put_DevicePower(PowerMode: Longint): HResult; stdcall;
1272
    function get_DevicePower(var pPowerMode: Longint): HResult; stdcall;
1273
    function Calibrate(hEvent: THandle; Mode: Longint; var pStatus: Longint): HResult; stdcall;
1274
    function put_DevicePort(DevicePort: Longint): HResult; stdcall;
1275
    function get_DevicePort(var pDevicePort: Longint): HResult; stdcall;
1276
  end;
1277
 
1278
  IAMExtTransport = interface(IUnknown)
1279
    ['{A03CD5F0-3045-11CF-8C44-00AA006B6814}']
1280
    function GetCapability(Capability: Longint; var pValue: Longint; var pdblValue: double): HResult; stdcall;
1281
    function put_MediaState(State: Longint): HResult; stdcall;
1282
    function get_MediaState(var pState: Longint): HResult; stdcall;
1283
    function put_LocalControl(State: Longint): HResult; stdcall;
1284
    function get_LocalControl(var pState: Longint): HResult; stdcall;
1285
    function GetStatus(StatusItem: Longint; var pValue: Longint): HResult; stdcall;
1286
    function GetTransportBasicParameters(Param: Longint; var pValue: Longint; var ppszData: POLESTR): HResult; stdcall;
1287
    function SetTransportBasicParameters(Param: Longint; Value: Longint; pszData: POLESTR): HResult; stdcall;
1288
    function GetTransportVideoParameters(Param: Longint; var pValue: Longint): HResult; stdcall;
1289
    function SetTransportVideoParameters(Param: Longint; Value: Longint): HResult; stdcall;
1290
    function GetTransportAudioParameters(Param: Longint; var pValue: Longint): HResult; stdcall;
1291
    function SetTransportAudioParameters(Param: Longint; Value: Longint): HResult; stdcall;
1292
    function put_Mode(Mode: Longint): HResult; stdcall;
1293
    function get_Mode(var pMode: Longint): HResult; stdcall;
1294
    function put_Rate(dblRate: double): HResult; stdcall;
1295
    function get_Rate(var pdblRate: double): HResult; stdcall;
1296
    function GetChase(var pEnabled, pOffset: Longint; var phEvent: THandle): HResult; stdcall;
1297
    function SetChase(Enable, Offset: Longint; hEvent: THandle): HResult; stdcall;
1298
    function GetBump(var pSpeed, pDuration: Longint): HResult; stdcall;
1299
    function SetBump(Speed, Duration: Longint): HResult; stdcall;
1300
    function get_AntiClogControl(var pEnabled: Longint): HResult; stdcall;
1301
    function put_AntiClogControl(Enable: Longint): HResult; stdcall;
1302
    function GetEditPropertySet(EditID: Longint; var pState: Longint): HResult; stdcall;
1303
    function SetEditPropertySet(var pEditID: Longint; State: Longint): HResult; stdcall;
1304
    function GetEditProperty(EditID, Param: Longint; var pValue: Longint): HResult; stdcall;
1305
    function SetEditProperty(EditID, Param, Value: Longint): HResult; stdcall;
1306
    function get_EditStart(var pValue: Longint): HResult; stdcall;
1307
    function put_EditStart(Value: Longint): HResult; stdcall;
1308
  end;
1309
 
1310
  TTimeCode = record
1311
    wFrameRate: Word;
1312
    wFrameFract: Word;
1313
    dwFrames: DWORD;
1314
    qw: LONGLONG;
1315
  end;
1316
 
1317
  TTimeCode_Sample = record
1318
    qwTick: LONGLONG;
1319
    timecode: TTimeCode;
1320
    dwUser: DWORD;
1321
    dwFlags: DWORD;
1322
  end;
1323
 
1324
  IAMTimecodeReader = interface(IUnknown)
1325
    ['{9B496CE1-811B-11CF-8C77-00AA006B6814}']
1326
    function GetTCRMode(Param: Longint; var pValue: Longint): HResult; stdcall;
1327
    function SetTCRMode(Param: Longint; Value: Longint): HResult; stdcall;
1328
    function put_VITCLine(Line: Longint): HResult; stdcall;
1329
    function get_VITCLine(var pLine: Longint): HResult; stdcall;
1330
    function GetTimecode(var pTimecodeSample: TTimeCode_Sample): HResult; stdcall;
1331
  end;
1332
 
1333
  IAMTimecodeGenerator = interface(IUnknown)
1334
    ['{9B496CE0-811B-11CF-8C77-00AA006B6814}']
1335
    function GetTCGMode(Param: Longint; var pValue: Longint): HResult; stdcall;
1336
    function SetTCGMode(Param: Longint; Value: Longint): HResult; stdcall;
1337
    function put_VITCLine(Line: Longint): HResult; stdcall;
1338
    function get_VITCLine(var Line: Longint): HResult; stdcall;
1339
    function SetTimecode(const pTimecodeSample: TTimeCode_Sample): HResult; stdcall;
1340
    function GetTimecode(var pTimecodeSample: TTimeCode_Sample): HResult; stdcall;
1341
  end;
1342
 
1343
  IAMTimecodeDisplay = interface(IUnknown)
1344
    ['{9B496CE2-811B-11CF-8C77-00AA006B6814}']
1345
    function GetTCDisplayEnable(var pState: Longint): HResult; stdcall;
1346
    function SetTCDisplayEnable(State: Longint): HResult; stdcall;
1347
    function GetTCDisplay(Param: Longint; var pValue: Longint): HResult; stdcall;
1348
    function SetTCDisplay(Param, Value: Longint): HResult; stdcall;
1349
  end;
1350
 
1351
  IAMDevMemoryAllocator = interface(IUnknown)
1352
    ['{C6545BF0-E76B-11D0-BD52-00A0C911CE86}']
1353
    function GetInfo(var pdwcbTotalFree, pdwcbLargestFree, pdwcbTotalMemory, pdwcbMinimumChunk: DWORD): HResult; stdcall;
1354
    function CheckMemory(pBuffer: Pointer): HResult; stdcall;
1355
    function Alloc(var ppBuffer: Pointer; var pdwcbBuffer: DWORD): HResult; stdcall;
1356
    function Free(pBuffer: Pointer): HResult; stdcall;
1357
    function GetDevMemoryObject(out ppUnkInnner: IUnknown; pUnkOuter: IUnknown): HResult; stdcall;
1358
  end;
1359
 
1360
  IAMDevMemoryControl = interface(IUnknown)
1361
    ['{C6545BF1-E76B-11D0-BD52-00A0C911CE86}']
1362
    function QueryWriteSync: HResult; stdcall;
1363
    function WriteSync: HResult; stdcall;
1364
    function GetDevId(var pdwDevId: DWORD): HResult; stdcall;
1365
  end;
1366
 
1367
const
1368
  AMSTREAMSELECTINFO_ENABLED     = $1;
1369
  AMSTREAMSELECTINFO_EXCLUSIVE   = $2;
1370
 
1371
  AMSTREAMSELECTENABLE_ENABLE    = $1;
1372
  AMSTREAMSELECTENABLE_ENABLEALL = $2;
1373
 
1374
type
1375
  IAMStreamSelect = interface(IUnknown)
1376
    ['{C1960960-17F5-11D1-ABE1-00A0C905F375}']
1377
    function Count(var pcStreams: DWORD): HResult; stdcall;
1378
    function Info(lIndex: Longint; var ppmt: PAM_Media_Type;
1379
        var pdwFlags: DWORD; var plcid: LCID; var pdwGroup: DWORD;
1380
        var ppszName: PWCHAR; out ppObject: IUnknown; out ppUnk : IUnknown): HResult; stdcall;
1381
    function Enable(lIndex: Longint; dwFlags: DWORD): HResult; stdcall;
1382
  end;
1383
 
1384
  IAMovie = interface(IFilterGraph)
1385
    ['{359ACE10-7688-11CF-8B23-00805F6CEF60}']
1386
    function Connect(ppinOut, ppinIn: IPin): HResult; stdcall;
1387
    function Render(ppinOut: IPin): HResult; stdcall;
1388
    function Run: HResult; stdcall;
1389
    function Pause: HResult; stdcall;
1390
    function Stop: HResult; stdcall;
1391
    function GetState(msTimeout: Longint; var pfs: TFilter_State): HResult; stdcall;
1392
    function RenderFile(strFilename: LPCWSTR): HResult; stdcall;
1393
    function AddSourceFilter(strFilename: LPCWSTR; out ppUnk: IBaseFilter): HResult; stdcall;
1394
    function GetEventHandle(out hEvent: THandle): HResult; stdcall;
1395
    function GetEvent(var lEventCode, lParam1, lParam2: Longint; msTimeout: Longint): HResult; stdcall;
1396
    function WaitForCompletion(msTimeout: Longint; var pEvCode: Longint): HResult; stdcall;
1397
    function CancelDefaultHandling(lEvCode: Longint): HResult; stdcall;
1398
    function RestoreDefaultHandling(lEvCode: Longint): HResult; stdcall;
1399
    function get_Duration(var plength: TRefTime): HResult; stdcall;
1400
    function put_CurrentPosition(llTime: TRefTime): HResult; stdcall;
1401
    function get_CurrentPosition(var pllTime: TRefTime): HResult; stdcall;
1402
    function get_StopTime(var pllTime: TRefTime): HResult; stdcall;
1403
    function put_StopTime(llTime: TRefTime): HResult; stdcall;
1404
    function get_PrerollTime(var pllTime: TRefTime): HResult; stdcall;
1405
    function put_PrerollTime(llTime: TRefTime): HResult; stdcall;
1406
    function put_Rate(dRate: double): HResult; stdcall;
1407
    function get_Rate(var pdRate: double): HResult; stdcall;
1408
    function RemoveAllFilters: HResult; stdcall;
1409
    function Play: HResult; stdcall;
1410
    function PlayFile(strFilename: LPCWSTR): HResult; stdcall;
1411
    function EnumFiltersByInterface(const riid: TGUID;
1412
        out ppEnum: IEnumFilters): HResult; stdcall;
1413
    function EnumPins(out ppEnum: IEnumPins): HResult; stdcall;
1414
    function EnumPinsIn(out ppEnum: IEnumPins): HResult; stdcall;
1415
    function EnumPinsOut(out ppEnum: IEnumPins): HResult; stdcall;
1416
    function RenderAll: HResult; stdcall;
1417
    function RenderNewFile(strFilename: LPCWSTR): HResult; stdcall;
1418
    function FreeEventParams(lEvCode, lParam1, lParam2: Longint): HResult; stdcall;
1419
  end;
1420
 
1421
const
1422
  CDEF_CLASS_DEFAULT        = $1000;
1423
  CDEF_BYPASS_CLASS_MANAGER = $2000;
1424
 
1425
type
1426
  ICreateDevEnum = interface(IUnknown)
1427
    ['{29840822-5B84-11D0-BD3B-00A0C911CE86}']
1428
    function CreateClassEnumerator(const clsidDeviceClass: TGUID;
1429
        out ppEnumMoniker: IEnumMoniker; dwFlags: DWORD): HResult; stdcall;
1430
  end;
1431
 
1432
  TDVD_Domain = (
1433
    DVD_DOMAIN_FirstPlay,
1434
    DVD_DOMAIN_VideoManagerMenu,
1435
    DVD_DOMAIN_VideoTitleSetMenu,
1436
    DVD_DOMAIN_Title,
1437
    DVD_DOMAIN_Stop
1438
  );
1439
 
1440
  TDVD_Menu_ID = (
1441
    DVD_MENU_INVALID_0,
1442
    DVD_MENU_INVALID_1,
1443
    DVD_MENU_Title,
1444
    DVD_MENU_Root,
1445
    DVD_MENU_Subpicture,
1446
    DVD_MENU_Audio,
1447
    DVD_MENU_Angle,
1448
    DVD_MENU_Chapter
1449
  );
1450
 
1451
  TDVD_Disc_Side = (
1452
    DVD_SIDE_INVALID_0,
1453
    DVD_SIDE_A,
1454
    DVD_SIDE_B
1455
  );
1456
 
1457
  TDVD_PREFERRED_Display_Mode = (
1458
    DISPLAY_CONTENT_DEFAULT,
1459
    DISPLAY_16x9,
1460
    DISPLAY_4x3_PANSCAN_PREFERRED,
1461
    DISPLAY_4x3_LETTERBOX_PREFERRED
1462
  );
1463
 
1464
  TDVD_REGISTER = Word;
1465
 
1466
  TGPRMArray = array[0..15] of TDVD_REGISTER;
1467
  TSPRMArray = array[0..23] of TDVD_REGISTER;
1468
 
1469
  TDVD_ATR = record
1470
    ulCAT: ULONG;
1471
    pbATRI: array[0..767] of Byte;
1472
  end;
1473
 
1474
  TDVD_VideoATR = array[0..1] of Byte;
1475
  TDVD_AudioATR = array[0..7] of Byte;
1476
  TDVD_SubpictureATR = array[0..5] of Byte;
1477
 
1478
  TDVD_FrameRate = (
1479
    DVD_FPS_INVALID_0,
1480
    DVD_FPS_25,
1481
    DVD_FPS_INVALID_2,
1482
    DVD_FPS_30NonDrop
1483
  );
1484
 
1485
  TDVD_TimeCode = record
1486
    Hours1: ULONG;        // Hours
1487
    Hours10: ULONG;       // Tens of Hours
1488
 
1489
    Minutes1: ULONG;      // Minutes
1490
    Minutes10: ULONG;     // Tens of Minutes
1491
 
1492
    Seconds1: ULONG;      // Seconds
1493
    Seconds10: ULONG;     // Tens of Seconds
1494
 
1495
    Frames1: ULONG;       // Frames
1496
    Frames10: ULONG;      // Tens of Frames
1497
 
1498
    FrameRateCode: ULONG; // use DVD_FRAMERATE to indicate frames/sec and drop/non-drop
1499
  end;
1500
 
1501
  TDVD_Playback_Location = record
1502
    TitleNum: ULONG;
1503
    ChapterNum: ULONG;
1504
    TimeCode: ULONG;
1505
  end;
1506
 
1507
  TVALID_UOP_SOMTHING_OR_OTHER = DWORD;
1508
 
1509
const
1510
  DVD_PARENTAL_LEVEL_8    = $8000;
1511
  DVD_PARENTAL_LEVEL_7    = $4000;
1512
  DVD_PARENTAL_LEVEL_6    = $2000;
1513
  DVD_PARENTAL_LEVEL_5    = $1000;
1514
  DVD_PARENTAL_LEVEL_4    = $0800;
1515
  DVD_PARENTAL_LEVEL_3    = $0400;
1516
  DVD_PARENTAL_LEVEL_2    = $0200;
1517
  DVD_PARENTAL_LEVEL_1    = $0100;
1518
 
1519
type
1520
  IDvdControl = interface(IUnknown)
1521
    ['{A70EFE61-E2A3-11D0-A9BE-00AA0061BE93}']
1522
    function TitlePlay(uiTitle: ULONG): HResult; stdcall;
1523
    function ChapterPlay(uiTitle: ULONG; uiChapter: ULONG): HResult; stdcall;
1524
    function TimePlay(uiTitle: ULONG; bcdTime: ULONG): HResult; stdcall;
1525
    function StopForResume: HResult; stdcall;
1526
    function GoUp: HResult; stdcall;
1527
    function TimeSearch(bcdTime: ULONG): HResult; stdcall;
1528
    function ChapterSearch(Chapter: ULONG): HResult; stdcall;
1529
    function PrevPGSearch: HResult; stdcall;
1530
    function TopPGSearch: HResult; stdcall;
1531
    function NextPGSearch: HResult; stdcall;
1532
    function ForwardScan(dwSpeed: double): HResult; stdcall;
1533
    function BackwardScan(dwSpeed: double): HResult; stdcall;
1534
    function MenuCall(MenuID: TDVD_Menu_ID): HResult; stdcall;
1535
    function Resume: HResult; stdcall;
1536
    function UpperButtonSelect: HResult; stdcall;
1537
    function LowerButtonSelect: HResult; stdcall;
1538
    function LeftButtonSelect: HResult; stdcall;
1539
    function RightButtonSelect: HResult; stdcall;
1540
    function ButtonActivate: HResult; stdcall;
1541
    function ButtonSelectAndActivate(uiButton: ULONG): HResult; stdcall;
1542
    function StillOff: HResult; stdcall;
1543
    function PauseOn: HResult; stdcall;
1544
    function PauseOff: HResult; stdcall;
1545
    function MenuLanguageSelect(Language: LCID): HResult; stdcall;
1546
    function AudioStreamChange(nAudio: ULONG): HResult; stdcall;
1547
    function SubpictureStreamChange(nSubPicture: ULONG; bDisplay: BOOL): HResult; stdcall;
1548
    function AngleChange(ulAngle: ULONG): HResult; stdcall;
1549
    function ParentalLevelSelect(ulParentalLevel: ULONG): HResult; stdcall;
1550
    function ParentalCountrySelect(wCountry: Word): HResult; stdcall;
1551
    function KaraokeAudioPresentationModeChange(ulMode: ULONG): HResult; stdcall;
1552
    function VideoModePreferrence(ulPreferredDisplayMode: ULONG): HResult; stdcall;
1553
    function SetRoot(pszPath: LPCWSTR): HResult; stdcall;
1554
    function MouseActivate(const point: TPoint): HResult; stdcall;
1555
    function MouseSelect(const point: TPoint): HResult; stdcall;
1556
    function ChapterPlayAutoStop(ulTitle, ulChapter, ulChaptersToPlay: ULONG): HResult; stdcall;
1557
  end;
1558
 
1559
  IDvdInfo = interface(IUnknown)
1560
    ['{A70EFE60-E2A3-11D0-A9BE-00AA0061BE93}']
1561
    function GetCurrentDomain(var pDomain: TDVD_Domain): HResult; stdcall;
1562
    function GetCurrentLocation(var pLocation: TDVD_Playback_Location): HResult; stdcall;
1563
    function GetTotalTitleTime(var pTotalTime: ULONG): HResult; stdcall;
1564
    function GetCurrentButton(var pnButtonsAvailable, pnCurrentButton: ULONG): HResult; stdcall;
1565
    function GetCurrentAngle(var pnAnglesAvailable, pnCurrentAngle: ULONG): HResult; stdcall;
1566
    function GetCurrentAudio(var pnStreamsAvailable, pnCurrentStream: ULONG): HResult; stdcall;
1567
    function GetCurrentSubpicture(var pnStreamsAvailable, pnCurrentStream: ULONG;
1568
        pIsDisabled: BOOL): HResult; stdcall;
1569
    function GetCurrentUOPS(var pUOP: TVALID_UOP_SOMTHING_OR_OTHER): HResult; stdcall;
1570
    function GetAllSPRMs(var pRegisterArray: TSPRMArray): HResult; stdcall;
1571
    function GetAllGPRMs(var pRegisterArray: TGPRMArray): HResult; stdcall;
1572
    function GetAudioLanguage(nStream: ULONG; var pLanguage: LCID): HResult; stdcall;
1573
    function GetSubpictureLanguage(nStream: ULONG; var pLanguage: LCID): HResult; stdcall;
1574
    function GetTitleAttributes(nTitle: ULONG; var pATR: TDVD_ATR): HResult; stdcall;
1575
    function GetVMGAttributes(var pATR: TDVD_ATR): HResult; stdcall;
1576
    function GetCurrentVideoAttributes(var pATR: TDVD_VideoATR): HResult; stdcall;
1577
    function GetCurrentAudioAttributes(var pATR: TDVD_AudioATR): HResult; stdcall;
1578
    function GetCurrentSubpictureAttributes(var pATR: TDVD_SubpictureATR): HResult; stdcall;
1579
    function GetCurrentVolumeInfo(var pNumOfVol, pThisVolNum: ULONG;
1580
        var pSide: TDVD_Disc_Side; var pNumOfTitles: ULONG): HResult; stdcall;
1581
    function GetDVDTextInfo(var pTextManager; cbBufSize: ULONG;
1582
        var pcbActualSize: ULONG): HResult; stdcall;
1583
    function GetPlayerParentalLevel(var pParentalLevel, pCountryCode: ULONG): HResult; stdcall;
1584
    function GetNumberOfChapters(ulTitle: ULONG; var pNumberOfChapters: ULONG): HResult; stdcall;
1585
    function GetTitleParentalLevels(ulTitle: ULONG; var pParentalLevels: ULONG): HResult; stdcall;
1586
    function GetRoot(pRoot: PWCHAR; cbBufSize: ULONG; var pcbActualSize: ULONG): HResult; stdcall;
1587
  end;
1588
 
1589
const
1590
  M_DVD_HWDEC_PREFER     = $1;
1591
  M_DVD_HWDEC_ONLY       = $2;
1592
  M_DVD_SWDEC_PREFER     = $4;
1593
  M_DVD_SWDEC_ONLY       = $8;
1594
  M_DVD_NOVPE            = $100;
1595
 
1596
  AM_DVD_STREAM_VIDEO    = $1;
1597
  AM_DVD_STREAM_AUDIO    = $2;
1598
  AM_DVD_STREAM_SUBPIC   = $4;
1599
 
1600
type
1601
  TAM_DVD_RenderStatus = record
1602
    hrVPEStatus: HResult;
1603
    bDvdVolInvalid: BOOL;
1604
    bDvdVolUnknown: BOOL;
1605
    bNoLine21In: BOOL;
1606
    bNoLine21Out: BOOL;
1607
    iNumStreams: Integer;
1608
    iNumStreamsFailed: Integer;
1609
    dwFailedStreamsFlag: DWORD;
1610
  end;
1611
 
1612
  IDvdGraphBuilder = interface(IUnknown)
1613
    ['{FCC152B6-F372-11d0-8E00-00C04FD7C08B}']
1614
    function GetFiltergraph(out ppGB: IGraphBuilder): HResult; stdcall;
1615
    function GetDvdInterface(const riid: TGUID; out ppvIF): HResult; stdcall;
1616
    function RenderDvdVideoVolume(lpcwszPathName: LPCWSTR; dwFlags: DWORD;
1617
        var pStatus: TAM_DVD_RenderStatus): HResult; stdcall;
1618
  end;
1619
 
1620
(*==========================================================================;
1621
 *
1622
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1623
 *
1624
 *  File:       mmstream.h
1625
 *
1626
 ***************************************************************************)
1627
 
1628
const
1629
  IID_IMultiMediaStream: TGUID = '{B502D1BC-9A57-11d0-8FDE-00C04FD9189D}';
1630
  IID_IMediaStream: TGUID = '{B502D1BD-9A57-11d0-8FDE-00C04FD9189D}';
1631
  IID_IStreamSample: TGUID = '{B502D1BE-9A57-11d0-8FDE-00C04FD9189D}';
1632
 
1633
const
1634
  MS_S_PENDING                = $80040401;
1635
  MS_S_NOUPDATE               = $80040402;
1636
  MS_S_ENDOFSTREAM            = $80040403;
1637
  MS_E_SAMPLEALLOC            = $00040001;
1638
  MS_E_PURPOSEID              = $00040002;
1639
  MS_E_NOSTREAM               = $00040003;
1640
  MS_E_NOSEEKING              = $00040004;
1641
  MS_E_INCOMPATIBLE           = $00040005;
1642
  MS_E_BUSY                   = $00040006;
1643
  MS_E_NOTINIT                = $00040007;
1644
  MS_E_SOURCEALREADYDEFINED   = $00040008;
1645
  MS_E_INVALIDSTREAMTYPE      = $00040009;
1646
  MS_E_NOTRUNNING             = $0004000A;
1647
 
1648
  MSPID_PrimaryVideo: TGUID = (D1:$A35FF56A;D2:$9FDA;D3:$11D0;D4:($8F,$DF,$00,$C0,$4F,$D9,$18,$9D));
1649
  MSPID_PrimaryAudio: TGUID = (D1:$A35FF56B;D2:$9FDA;D3:$11D0;D4:($8F,$DF,$00,$C0,$4F,$D9,$18,$9D));
1650
 
1651
type
1652
  PAPCFUNC = procedure(dwParam: DWORD); stdcall;
1653
 
1654
  TStream_Time = LONGLONG;
1655
 
1656
  MSPID = TGUID;
1657
 
1658
  TStream_Type = (
1659
    STREAMTYPE_READ,
1660
    STREAMTYPE_WRITE,
1661
    STREAMTYPE_TRANSFORM
1662
  );
1663
 
1664
  TStream_State = (
1665
    STREAMSTATE_STOP,
1666
    STREAMSTATE_RUN
1667
  );
1668
 
1669
  TCompletion_Status_Flags = (
1670
    COMPSTAT_INVALID_0,
1671
    COMPSTAT_NOUPDATEOK,
1672
    COMPSTAT_WAIT,
1673
    COMPSTAT_INVALID_3,
1674
    COMPSTAT_ABORT
1675
  );
1676
 
1677
const
1678
  MMSSF_HASCLOCK        = $1;
1679
  MMSSF_SUPPORTSEEK     = $2;
1680
  MMSSF_ASYNCHRONOUS    = $4;
1681
 
1682
  SSUPDATE_ASYNC = $1;
1683
  SSUPDATE_CONTINUOUS = $2;
1684
 
1685
type
1686
  IMediaStream = interface;
1687
  IStreamSample = interface;
1688
 
1689
  IMultiMediaStream = interface(IUnknown)
1690
    ['{B502D1BC-9A57-11d0-8FDE-00C04FD9189D}']
1691
    function GetInformation(var pdwFlags: DWORD; var pStreamType: TStream_Type): HResult; stdcall;
1692
    function GetMediaStream(const idPurpose: MSPID;
1693
        out ppMediaStream: IMediaStream): HResult; stdcall;
1694
    function EnumMediaStreams(Index: Longint; out ppMediaStream: IMediaStream): HResult; stdcall;
1695
    function GetState(var pCurrentState: TStream_State): HResult; stdcall;
1696
    function SetState(NewState: TStream_State): HResult; stdcall;
1697
    function GetTime(var pCurrentTime: TStream_Time): HResult; stdcall;
1698
    function GetDuration(var pDuration: TStream_Time): HResult; stdcall;
1699
    function Seek(SeekTime: TStream_Time): HResult; stdcall;
1700
    function GetEndOfStreamEventHandle(var phEOS: THandle): HResult; stdcall;
1701
  end;
1702
 
1703
  IMediaStream = interface(IUnknown)
1704
    ['{B502D1BD-9A57-11d0-8FDE-00C04FD9189D}']
1705
    function GetMultiMediaStream(out ppMultiMediaStream: IMultiMediaStream): HResult; stdcall;
1706
    function GetInformation(var pPurposeId: MSPID; var pType: TStream_Type): HResult; stdcall;
1707
    function SetSameFormat(pStreamThatHasDesiredFormat: IMediaStream;
1708
        dwFlags: DWORD): HResult; stdcall;
1709
    function AllocateSample(dwFlags: DWORD; out ppSample: IStreamSample): HResult; stdcall;
1710
    function CreateSharedSample(pExistingSample: IStreamSample; dwFlags: DWORD;
1711
        out ppNewSample: IStreamSample): HResult; stdcall;
1712
    function SendEndOfStream(dwFlags: DWORD): HResult; stdcall;
1713
  end;
1714
 
1715
  IStreamSample = interface(IUnknown)
1716
    ['{B502D1BE-9A57-11d0-8FDE-00C04FD9189D}']
1717
    function GetMediaStream(out ppMediaStream: IMediaStream): HResult; stdcall;
1718
    function GetSampleTimes(var pStartTime, pEndTime,
1719
        pCurrentTime: TStream_Time): HResult; stdcall;
1720
    function SetSampleTimes(var pStartTime, pEndTime: TStream_Time): HResult; stdcall;
1721
    function Update(dwFlags: DWORD; hEvent: THandle; pfnAPC: PAPCFUNC;
1722
        dwAPCData: DWORD): HResult; stdcall;
1723
    function CompletionStatus(dwFlags: DWORD; dwMilliseconds: DWORD): HResult; stdcall;
1724
  end;
1725
 
1726
(*==========================================================================;
1727
 *
1728
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1729
 *
1730
 *  File:       amstream.h
1731
 *
1732
 ***************************************************************************)
1733
 
1734
const
1735
  IID_IDirectShowStream: TGUID = '{7DB01C96-C0C3-11D0-8FF1-00C04FD9189D}';
1736
  IID_IAMMultiMediaStream: TGUID = '{BEBE595C-9A6F-11D0-8FDE-00C04FD9189D}';
1737
  IID_IAMMediaStream: TGUID = '{BEBE595D-9A6F-11D0-8FDE-00C04FD9189D}';
1738
  IID_IMediaStreamFilter: TGUID = '{BEBE595E-9A6F-11D0-8FDE-00C04FD9189D}';
1739
  IID_IDirectDrawMediaSampleAllocator: TGUID = '{AB6B4AFC-F6E4-11D0-900D-00C04FD9189D}';
1740
  IID_IDirectDrawMediaSample: TGUID = '{AB6B4AFE-F6E4-11D0-900D-00C04FD9189D}';
1741
  IID_IAMMediaTypeStream: TGUID = '{AB6B4AFA-F6E4-11D0-900D-00C04FD9189D}';
1742
  IID_IAMMediaTypeSample: TGUID = '{AB6B4AFB-F6E4-11D0-900D-00C04FD9189D}';
1743
 
1744
const
1745
  AMMSF_NOGRAPHTHREAD = $1;
1746
 
1747
  AMMSF_ADDDEFAULTRENDERER = $1;
1748
  AMMSF_CREATEPEER = $2;
1749
 
1750
  AMMSF_RENDERTYPEMASK  = $3;
1751
  AMMSF_RENDERTOEXISTING        = 0;
1752
  AMMSF_RENDERALLSTREAMS        = $1;
1753
  AMMSF_NORENDER        = $2;
1754
  AMMSF_NOCLOCK = $4;
1755
  AMMSF_RUN     = $8;
1756
 
1757
type
1758
  TOutput_State = (
1759
    Disabled,
1760
    ReadData,
1761
    RenderData
1762
  );
1763
 
1764
  IDirectShowStream = interface(IDispatch)
1765
    ['{7DB01C96-C0C3-11D0-8FF1-00C04FD9189D}']
1766
    function get_FileName(var pVal: TBSTR): HResult; stdcall;
1767
    function put_FileName(newVal: TBSTR): HResult; stdcall;
1768
    function get_Video(var pVal: TOutput_State): HResult; stdcall;
1769
    function put_Video(newVal: TOutput_State): HResult; stdcall;
1770
    function get_Audio(var pVal: TOutput_State): HResult; stdcall;
1771
    function put_Audio(newVal: TOutput_State): HResult; stdcall;
1772
  end;
1773
 
1774
  IMediaStreamFilter = interface;
1775
 
1776
  IAMMultiMediaStream = interface(IMultiMediaStream)
1777
    ['{BEBE595C-9A6F-11D0-8FDE-00C04FD9189D}']
1778
    function Initialize(StreamType: TStream_Type; dwFlags: DWORD;
1779
        pFilterGraph: IGraphBuilder): HResult; stdcall;
1780
    function GetFilterGraph(out ppGraphBuilder: IGraphBuilder): HResult; stdcall;
1781
    function GetFilter(out ppFilter: IMediaStreamFilter): HResult; stdcall;
1782
    function AddMediaStream(pStreamObject: IUnknown; const PurposeId: MSPID;
1783
        dwFlags: DWORD; out ppNewStream: IMediaStream): HResult; stdcall;
1784
    function OpenFile(pszFileName: LPCWSTR; dwFlags: DWORD): HResult; stdcall;
1785
    function OpenMoniker(pCtx: IBindCtx; pMoniker: IMoniker; dwFlags: DWORD): HResult; stdcall;
1786
    function Render(dwFlags: DWORD): HResult; stdcall;
1787
  end;
1788
 
1789
  IAMMediaStream = interface(IMediaStream)
1790
    ['{BEBE595D-9A6F-11D0-8FDE-00C04FD9189D}']
1791
    function Initialize(pSourceObject: IUnknown; dwFlags: DWORD;
1792
        const PurposeId: MSPID; StreamType: TStream_Type): HResult; stdcall;
1793
    function SetState(State: TFilter_State): HResult; stdcall;
1794
    function JoinAMMultiMediaStream(pAMMultiMediaStream: IAMMultiMediaStream): HResult; stdcall;
1795
    function JoinFilter(pMediaStreamFilter: IMediaStreamFilter): HResult; stdcall;
1796
    function JoinFilterGraph(pFilterGraph: IFilterGraph): HResult; stdcall;
1797
  end;
1798
 
1799
  IMediaStreamFilter = interface(IBaseFilter)
1800
    ['{BEBE595E-9A6F-11D0-8FDE-00C04FD9189D}']
1801
    function AddMediaStream(pAMMediaStream: IAMMediaStream): HResult; stdcall;
1802
    function GetMediaStream(const idPurpose: MSPID;
1803
        out ppMediaStream: IMediaStream): HResult; stdcall;
1804
    function EnumMediaStreams(Index: Longint; out ppMediaStream: IMediaStream): HResult; stdcall;
1805
    function SupportSeeking(bRenderer: BOOL): HResult; stdcall;
1806
    function ReferenceTimeToStreamTime(var pTime: TReference_Time): HResult; stdcall;
1807
    function GetCurrentStreamTime(var pCurrentStreamTime: TReference_Time): HResult; stdcall;
1808
    function WaitUntil(WaitStreamTime: TReference_Time): HResult; stdcall;
1809
    function Flush(bCancelEOS: BOOL): HResult; stdcall;
1810
    function EndOfStream: HResult; stdcall;
1811
  end;
1812
 
1813
  IDirectDrawMediaSampleAllocator = interface(IUnknown)
1814
    ['{AB6B4AFC-F6E4-11D0-900D-00C04FD9189D}']
1815
    function GetDirectDraw(out ppDirectDraw: IDirectDraw): HResult; stdcall;
1816
  end;
1817
 
1818
  IDirectDrawMediaSample = interface(IUnknown)
1819
    ['{AB6B4AFE-F6E4-11D0-900D-00C04FD9189D}']
1820
    function GetSurfaceAndReleaseLock(out ppDirectDrawSurface: IDirectDrawSurface;
1821
        var pRect: TRect): HResult; stdcall;
1822
    function LockMediaSamplePointer: HResult; stdcall;
1823
  end;
1824
 
1825
  IAMMediaTypeSample = interface;
1826
 
1827
  IAMMediaTypeStream = interface(IMediaStream)
1828
    ['{AB6B4AFA-F6E4-11D0-900D-00C04FD9189D}']
1829
    function GetFormat(out pMediaType: TAM_Media_Type; dwFlags: DWORD): HResult; stdcall;
1830
    function SetFormat(const pMediaType: TAM_Media_Type; dwFlags: DWORD): HResult; stdcall;
1831
    function CreateSample(lSampleSize: Longint; pbBuffer: Pointer;
1832
        dwFlags: DWORD; pUnkOuter: IUnknown; out ppAMMediaTypeSample: IAMMediaTypeSample): HResult; stdcall;
1833
    function GetStreamAllocatorRequirements(var pProps: TAllocator_Properties): HResult; stdcall;
1834
    function SetStreamAllocatorRequirements(const pProps: TAllocator_Properties): HResult; stdcall;
1835
  end;
1836
 
1837
  IAMMediaTypeSample = interface(IStreamSample)
1838
    ['{AB6B4AFB-F6E4-11D0-900D-00C04FD9189D}']
1839
    function SetPointer(pBuffer: Pointer; lSize: Longint): HResult; stdcall;
1840
    function GetPointer(var ppBuffer: Pointer): HResult; stdcall;
1841
    function GetSize: Longint; stdcall;
1842
    function GetTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
1843
    function SetTime(var pTimeStart, pTimeEnd: TReference_Time): HResult; stdcall;
1844
    function IsSyncPoint: HResult; stdcall;
1845
    function SetSyncPoint(bIsSyncPoint: BOOL): HResult; stdcall;
1846
    function IsPreroll: HResult; stdcall;
1847
    function SetPreroll(bIsPreroll: BOOL): HResult; stdcall;
1848
    function GetActualDataLength: Longint; stdcall;
1849
    function SetActualDataLength(l: Longint): HResult; stdcall;
1850
    function GetMediaType(var ppMediaType: PAM_Media_Type): HResult; stdcall;
1851
    function SetMediaType(const pMediaType: TAM_Media_Type): HResult; stdcall;
1852
    function IsDiscontinuity: HResult; stdcall;
1853
    function SetDiscontinuity(bDiscontinuity: BOOL): HResult; stdcall;
1854
    function GetMediaTime(var pTimeStart, pTimeEnd: LONGLONG): HResult; stdcall;
1855
    function SetMediaTime(var pTimeStart, pTimeEnd: LONGLONG): HResult; stdcall;
1856
  end;
1857
 
1858
const
1859
{
1860
EXTERN_C const IID LIBID_DirectShowStreamLib;
1861
 
1862
EXTERN_C const CLSID CLSID_AMMultiMediaStream;
1863
}
1864
  CLSID_AMMultiMediaStream: TGUID = '{49C47CE5-9BA4-11D0-8212-00C04FC32C45}';
1865
 
1866
  CLSID_AMDirectDrawStream: TGUID = (D1:$49C47CE4;D2:$9BA4;D3:$11D0;D4:($82,$12,$00,$C0,$4F,$C3,$2C,$45));
1867
  CLSID_AMAudioStream: TGUID = (D1:$8496E040;D2:$AF4C;D3:$11D0;D4:($82,$12,$00,$C0,$4F,$C3,$2C,$45));
1868
  CLSID_AMAudioData: TGUID = (D1:$F2468580;D2:$AF8A;D3:$11D0;D4:($82,$12,$00,$C0,$4F,$C3,$2C,$45));
1869
  CLSID_AMMediaTypeStream: TGUID = (D1:$CF0F2F7C;D2:$F7BF;D3:$11D0;D4:($90,$0D,$00,$C0,$4F,$D9,$18,$9D));
1870
 
1871
(*==========================================================================;
1872
 *
1873
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1874
 *
1875
 *  File:       ddstream.h
1876
 *
1877
 ***************************************************************************)
1878
 
1879
const
1880
  DDSFF_PROGRESSIVERENDER = $1;
1881
 
1882
  IID_IDirectDrawMediaStream: TGUID = '{F4104FCE-9A70-11d0-8FDE-00C04FD9189D}';
1883
  IID_IDirectDrawStreamSample: TGUID = '{F4104FCF-9A70-11d0-8FDE-00C04FD9189D}';
1884
 
1885
type
1886
  IDirectDrawStreamSample = interface;
1887
 
1888
  IDirectDrawMediaStream = interface(IMediaStream)
1889
    ['{F4104FCE-9A70-11d0-8FDE-00C04FD9189D}']
1890
    function GetFormat(var pDDSDCurrent: DDSURFACEDESC;
1891
        out ppDirectDrawPalette: IDirectDrawPalette;
1892
        var pDDSDDesired: DDSURFACEDESC; var pdwFlags: DWORD): HResult; stdcall;
1893
    function SetFormat(const pDDSurfaceDesc: DDSURFACEDESC;
1894
        pDirectDrawPalette: IDirectDrawPalette): HResult; stdcall;
1895
    function GetDirectDraw(out ppDirectDraw: IDirectDraw): HResult; stdcall;
1896
    function SetDirectDraw(pDirectDraw: IDirectDraw): HResult; stdcall;
1897
    function CreateSample(pSurface: IDirectDrawSurface; const pRect: TRect;
1898
        dwFlags: DWORD; out ppSample: IDirectDrawStreamSample): HResult; stdcall;
1899
    function GetTimePerFrame(var pFrameTime: TStream_Time): HResult; stdcall;
1900
  end;
1901
 
1902
  IDirectDrawStreamSample = interface(IStreamSample)
1903
    ['{F4104FCF-9A70-11d0-8FDE-00C04FD9189D}']
1904
    function GetSurface(out ppDirectDrawSurface: IDirectDrawSurface;
1905
        var pRect: TRect): HResult; stdcall;
1906
    function SetRect(const pRect: TRect): HResult; stdcall;
1907
  end;
1908
 
1909
(*==========================================================================;
1910
 *
1911
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1912
 *
1913
 *  File:       austream.h
1914
 *
1915
 ***************************************************************************)
1916
 
1917
const
1918
  IID_IAudioMediaStream: TGUID = '{F7537560-A3BE-11D0-8212-00C04FC32C45}';
1919
  IID_IAudioStreamSample: TGUID = '{345FEE00-ABA5-11D0-8212-00C04FC32C45}';
1920
  IID_IMemoryData: TGUID = '{327FC560-AF60-11D0-8212-00C04FC32C45}';
1921
  IID_IAudioData: TGUID = '{54C719C0-AF60-11D0-8212-00C04FC32C45}';
1922
 
1923
type
1924
  IAudioStreamSample = interface;
1925
  IAudioData = interface;
1926
 
1927
  IAudioMediaStream = interface(IMediaStream)
1928
    ['{F7537560-A3BE-11D0-8212-00C04FC32C45}']
1929
    function GetFormat(var pWaveFormatCurrent: TWaveFormatEx): HResult; stdcall;
1930
    function SetFormat(const lpWaveFormat: TWaveFormatEx): HResult; stdcall;
1931
    function CreateSample(pAudioData: IAudioData; dwFlags: DWORD;
1932
        out ppSample: IAudioStreamSample): HResult; stdcall;
1933
  end;
1934
 
1935
  IAudioStreamSample = interface(IStreamSample)
1936
    ['{345FEE00-ABA5-11D0-8212-00C04FC32C45}']
1937
    function GetAudioData(out ppAudio: IAudioData): HResult; stdcall;
1938
  end;
1939
 
1940
  IMemoryData = interface(IUnknown)
1941
    ['{327FC560-AF60-11D0-8212-00C04FC32C45}']
1942
    function SetBuffer(cbSize: DWORD; pbData: Pointer; dwFlags: DWORD): HResult; stdcall;
1943
    function GetInfo(var pdwLength: DWORD; var ppbData: Pointer;
1944
        var pcbActualData: DWORD): HResult; stdcall;
1945
    function SetActual(cbDataValid: DWORD): HResult; stdcall;
1946
  end;
1947
 
1948
  IAudioData = interface(IMemoryData)
1949
    ['{54C719C0-AF60-11D0-8212-00C04FC32C45}']
1950
    function GetFormat(var pWaveFormatCurrent: TWaveFormatEx): HResult; stdcall;
1951
    function SetFormat(const lpWaveFormat: TWaveFormatEx): HResult; stdcall;
1952
  end;
1953
 
1954
(*==========================================================================;
1955
 *
1956
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1957
 *
1958
 *  File:       mpconfig.h
1959
 *
1960
 ***************************************************************************)
1961
 
1962
const
1963
  IID_IMixerPinConfig: TGUID = (D1:$593CDDE1;D2:$0759;D3:$11D1;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
1964
 
1965
type
1966
  TAM_Aspect_Ratio_Mode = (
1967
    AM_ARMODE_STRETCHED,        // don't do any aspect ratio correction
1968
    AM_ARMODE_LETTER_BOX,       // letter box the video, paint background color in the excess region
1969
    AM_ARMODE_CROP,             // crop the video to the right aspect ratio
1970
    AM_ARMODE_STRETCHED_AS_PRIMARY
1971
  );
1972
 
1973
  IMixerPinConfig = interface(IUnknown)
1974
    ['{593CDDE1-0759-11D1-9E69-00C04FD7C15B}']
1975
    function SetRelativePosition(dwLeft, dwTop, dwRight, dwBottom: DWORD): HResult; stdcall;
1976
    function GetRelativePosition(var dwLeft, dwTop, dwRight, dwBottom: DWORD): HResult; stdcall;
1977
    function SetZOrder(dwZOrder: DWORD): HResult; stdcall;
1978
    function GetZOrder(var dwZOrder: DWORD): HResult; stdcall;
1979
    function SetColorKey(const pColorKey: TColorKey): HResult; stdcall;
1980
    function GetColorKey(var pColorKey: TColorKey; var pColor: DWORD): HResult; stdcall;
1981
    function SetBlendingParameter(dwBlendingParameter: DWORD): HResult; stdcall;
1982
    function GetBlendingParameter(var dwBlendingParameter: DWORD): HResult; stdcall;
1983
    function SetAspectRatioMode(amAspectRatioMode: TAM_Aspect_Ratio_Mode): HResult; stdcall;
1984
    function GetAspectRatioMode(var amAspectRatioMode: TAM_Aspect_Ratio_Mode): HResult; stdcall;
1985
    function SetStreamTransparent(bStreamTransparent: BOOL): HResult; stdcall;
1986
    function GetStreamTransparent(var bStreamTransparent: BOOL): HResult; stdcall;
1987
  end;
1988
 
1989
(*==========================================================================;
1990
 *
1991
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
1992
 *
1993
 *  File:       control.h
1994
 *
1995
 ***************************************************************************)
1996
 
1997
const
1998
  LIBID_QuartzTypeLib: TGUID = (D1:$56A868B0;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
1999
 
2000
  IID_IAMCollection: TGUID = (D1:$56A868B9;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2001
  IID_IMediaControl: TGUID = (D1:$56A868B1;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2002
  IID_IMediaEvent: TGUID = (D1:$56A868B6;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2003
  IID_IMediaEventEx: TGUID = (D1:$56A868C0;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2004
  IID_IMediaPosition: TGUID = (D1:$56A868B2;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2005
  IID_IBasicAudio: TGUID = (D1:$56A868B3;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2006
  IID_IVideoWindow: TGUID = (D1:$56A868B4;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2007
  IID_IBasicVideo: TGUID = (D1:$56A868B5;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2008
  IID_IDeferredCommand: TGUID = (D1:$56A868B8;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2009
  IID_IQueueCommand: TGUID = (D1:$56A868B7;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2010
 
2011
  CLSID_FilgraphManager: TGUID = (D1:$E436EBB3;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
2012
 
2013
  IID_IFilterInfo: TGUID = (D1:$56A868BA;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2014
  IID_IRegFilterInfo: TGUID = (D1:$56A868BB;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2015
  IID_IMediaTypeInfo: TGUID = (D1:$56A868BC;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2016
  IID_IPinInfo: TGUID = (D1:$56A868BD;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2017
 
2018
type
2019
  OAEVENT = Longint;
2020
  OAHWND = Longint;
2021
  OAFilterState = Longint;
2022
 
2023
(* Definition of interface: IAMCollection *)
2024
  IAMCollection = interface(IDispatch)
2025
    ['{56A868B9-0AD4-11CE-B03A-0020AF0BA770}']
2026
    (* IAMCollection methods *)
2027
    function get_Count(var plCount: Longint): HResult; stdcall;
2028
    function Item(lItem: Longint; out ppUnk: IUnknown): HResult; stdcall;
2029
    function get__NewEnum(out ppUnk: IUnknown): HResult; stdcall;
2030
  end;
2031
 
2032
(* Definition of interface: IMediaControl *)
2033
  IMediaControl = interface(IDispatch)
2034
    ['{56A868B1-0AD4-11CE-B03A-0020AF0BA770}']
2035
    (* IMediaControl methods *)
2036
    function Run: HResult; stdcall;
2037
    function Pause: HResult; stdcall;
2038
    function Stop: HResult; stdcall;
2039
    function GetState(msTimeout: Longint; var pfs: OAFilterState): HResult; stdcall;
2040
    function RenderFile(strFilename: TBSTR): HResult; stdcall;
2041
    function AddSourceFilter(strFilename: TBSTR; ppUnk: IDispatch): HResult; stdcall;
2042
    function get_FilterCollection(out ppUnk: IDispatch): HResult; stdcall;
2043
    function get_RegFilterCollection(out ppUnk: IDispatch): HResult; stdcall;
2044
    function StopWhenReady: HResult; stdcall;
2045
  end;
2046
 
2047
(* Definition of interface: IMediaEvent *)
2048
  IMediaEvent = interface(IDispatch)
2049
    ['{56A868B6-0AD4-11CE-B03A-0020AF0BA770}']
2050
    (* IMediaEvent methods *)
2051
    function GetEventHandle(var hEvent: OAEVENT): HResult; stdcall;
2052
    function GetEvent(var lEventCode: Longint; var lParam1, lParam2: Longint;
2053
        msTimeout: Longint): HResult; stdcall;
2054
    function WaitForCompletion(msTimeout: Longint; var pEvCode: Longint): HResult; stdcall;
2055
    function CancelDefaultHandling(lEvCode: Longint): HResult; stdcall;
2056
    function RestoreDefaultHandling(lEvCode: Longint): HResult; stdcall;
2057
    function FreeEventParams(lEvCode: Longint; lParam1, lParam2: Longint): HResult; stdcall;
2058
  end;
2059
 
2060
(* Definition of interface: IMediaEventEx *)
2061
  IMediaEventEx = interface(IMediaEvent)
2062
    ['{56A868C0-0AD4-11CE-B03A-0020AF0BA770}']
2063
    (* IMediaEventEx methods *)
2064
    function SetNotifyWindow(hwnd: OAHWND; lMsg: Longint;
2065
        lInstanceData: Longint): HResult; stdcall;
2066
    function SetNotifyFlags(lNoNotifyFlags: Longint): HResult; stdcall;
2067
    function GetNotifyFlags(var lplNoNotifyFlags: Longint): HResult; stdcall;
2068
  end;
2069
 
2070
(* Definition of interface: IMediaPosition *)
2071
  IMediaPosition = interface(IDispatch)
2072
    ['{56A868B2-0AD4-11CE-B03A-0020AF0BA770}']
2073
    (* IMediaPosition methods *)
2074
    function get_Duration(var plength: TRefTime): HResult; stdcall;
2075
    function put_CurrentPosition(llTime: TRefTime): HResult; stdcall;
2076
    function get_CurrentPosition(var pllTime: TRefTime): HResult; stdcall;
2077
    function get_StopTime(var pllTime: TRefTime): HResult; stdcall;
2078
    function put_StopTime(llTime: TRefTime): HResult; stdcall;
2079
    function get_PrerollTime(var pllTime: TRefTime): HResult; stdcall;
2080
    function put_PrerollTime(llTime: TRefTime): HResult; stdcall;
2081
    function put_Rate(dRate: double): HResult; stdcall;
2082
    function get_Rate(var pdRate: double): HResult; stdcall;
2083
    function CanSeekForward(var pCanSeekForward: Longint): HResult; stdcall;
2084
    function CanSeekBackward(var pCanSeekBackward: Longint): HResult; stdcall;
2085
  end;
2086
 
2087
(* Definition of interface: IBasicAudio *)
2088
  IBasicAudio = interface(IDispatch)
2089
    ['{56A868B3-0AD4-11CE-B03A-0020AF0BA770}']
2090
    (* IBasicAudio methods *)
2091
    function put_Volume(lVolume: Longint): HResult; stdcall;
2092
    function get_Volume(var plVolume: Longint): HResult; stdcall;
2093
    function put_Balance(lBalance: Longint): HResult; stdcall;
2094
    function get_Balance(var plBalance: Longint): HResult; stdcall;
2095
  end;
2096
 
2097
(* Definition of interface: IVideoWindow *)
2098
  IVideoWindow = interface(IDispatch)
2099
    ['{56A868B4-0AD4-11CE-B03A-0020AF0BA770}']
2100
    (* IVideoWindow methods *)
2101
    function put_Caption(strCaption: TBSTR): HResult; stdcall;
2102
    function get_Caption(var strCaption: TBSTR): HResult; stdcall;
2103
    function put_WindowStyle(WindowStyle: Longint): HResult; stdcall;
2104
    function get_WindowStyle(var WindowStyle: Longint): HResult; stdcall;
2105
    function put_WindowStyleEx(WindowStyleEx: Longint): HResult; stdcall;
2106
    function get_WindowStyleEx(var WindowStyleEx: Longint): HResult; stdcall;
2107
    function put_AutoShow(AutoShow: LongBool): HResult; stdcall;
2108
    function get_AutoShow(var AutoShow: LongBool): HResult; stdcall;
2109
    function put_WindowState(WindowState: Longint): HResult; stdcall;
2110
    function get_WindowState(var WindowState: Longint): HResult; stdcall;
2111
    function put_BackgroundPalette(BackgroundPalette: Longint): HResult; stdcall;
2112
    function get_BackgroundPalette(var pBackgroundPalette: Longint): HResult; stdcall;
2113
    function put_Visible(Visible: LongBool): HResult; stdcall;
2114
    function get_Visible(var pVisible: LongBool): HResult; stdcall;
2115
    function put_Left(Left: Longint): HResult; stdcall;
2116
    function get_Left(var pLeft: Longint): HResult; stdcall;
2117
    function put_Width(Width: Longint): HResult; stdcall;
2118
    function get_Width(var pWidth: Longint): HResult; stdcall;
2119
    function put_Top(Top: Longint): HResult; stdcall;
2120
    function get_Top(var pTop: Longint): HResult; stdcall;
2121
    function put_Height(Height: Longint): HResult; stdcall;
2122
    function get_Height(var pHeight: Longint): HResult; stdcall;
2123
    function put_Owner(Owner: OAHWND): HResult; stdcall;
2124
    function get_Owner(var Owner: OAHWND): HResult; stdcall;
2125
    function put_MessageDrain(Drain: OAHWND): HResult; stdcall;
2126
    function get_MessageDrain(var Drain: OAHWND): HResult; stdcall;
2127
    function get_BorderColor(var Color: Longint): HResult; stdcall;
2128
    function put_BorderColor(Color: Longint): HResult; stdcall;
2129
    function get_FullScreenMode(var FullScreenMode: LongBool): HResult; stdcall;
2130
    function put_FullScreenMode(FullScreenMode: LongBool): HResult; stdcall;
2131
    function SetWindowForeground(Focus: Longint): HResult; stdcall;
2132
    function NotifyOwnerMessage(hwnd: Longint; uMsg, wParam, lParam: Longint): HResult; stdcall;
2133
    function SetWindowPosition(Left, Top, Width, Height: Longint): HResult; stdcall;
2134
    function GetWindowPosition(var pLeft, pTop, pWidth, pHeight: Longint): HResult; stdcall;
2135
    function GetMinIdealImageSize(var pWidth, pHeight: Longint): HResult; stdcall;
2136
    function GetMaxIdealImageSize(var pWidth, pHeight: Longint): HResult; stdcall;
2137
    function GetRestorePosition(var pLeft, pTop, pWidth, pHeight: Longint): HResult; stdcall;
2138
    function HideCursor(HideCursor: LongBool): HResult; stdcall;
2139
    function IsCursorHidden(var CursorHidden: LongBool): HResult; stdcall;
2140
  end;
2141
 
2142
(* Definition of interface: IBasicVideo *)
2143
  IBasicVideo = interface(IDispatch)
2144
    ['{56A868B5-0AD4-11CE-B03A-0020AF0BA770}']
2145
    (* IBasicVideo methods *)
2146
    function get_AvgTimePerFrame(var pAvgTimePerFrame: TRefTime): HResult; stdcall;
2147
    function get_BitRate(var pBitRate: Longint): HResult; stdcall;
2148
    function get_BitErrorRate(var pBitErrorRate: Longint): HResult; stdcall;
2149
    function get_VideoWidth(var pVideoWidth: Longint): HResult; stdcall;
2150
    function get_VideoHeight(var pVideoHeight: Longint): HResult; stdcall;
2151
    function put_SourceLeft(SourceLeft: Longint): HResult; stdcall;
2152
    function get_SourceLeft(var pSourceLeft: Longint): HResult; stdcall;
2153
    function put_SourceWidth(SourceWidth: Longint): HResult; stdcall;
2154
    function get_SourceWidth(var pSourceWidth: Longint): HResult; stdcall;
2155
    function put_SourceTop(SourceTop: Longint): HResult; stdcall;
2156
    function get_SourceTop(var pSourceTop: Longint): HResult; stdcall;
2157
    function put_SourceHeight(SourceHeight: Longint): HResult; stdcall;
2158
    function get_SourceHeight(var pSourceHeight: Longint): HResult; stdcall;
2159
    function put_DestinationLeft(DestinationLeft: Longint): HResult; stdcall;
2160
    function get_DestinationLeft(var pDestinationLeft: Longint): HResult; stdcall;
2161
    function put_DestinationWidth(DestinationWidth: Longint): HResult; stdcall;
2162
    function get_DestinationWidth(var pDestinationWidth: Longint): HResult; stdcall;
2163
    function put_DestinationTop(DestinationTop: Longint): HResult; stdcall;
2164
    function get_DestinationTop(var pDestinationTop: Longint): HResult; stdcall;
2165
    function put_DestinationHeight(DestinationHeight: Longint): HResult; stdcall;
2166
    function get_DestinationHeight(var pDestinationHeight: Longint): HResult; stdcall;
2167
    function SetSourcePosition(Left, Top, Width, Height: Longint): HResult; stdcall;
2168
    function GetSourcePosition(var pLeft, pTop, pWidth, pHeight: Longint): HResult; stdcall;
2169
    function SetDefaultSourcePosition: HResult; stdcall;
2170
    function SetDestinationPosition(Left, Top, Width, Height: Longint): HResult; stdcall;
2171
    function GetDestinationPosition(var pLeft, pTop, pWidth, pHeight: Longint): HResult; stdcall;
2172
    function SetDefaultDestinationPosition: HResult; stdcall;
2173
    function GetVideoSize(var pWidth, Height: Longint): HResult; stdcall;
2174
    function GetVideoPaletteEntries(StartIndex, Entries: Longint;
2175
        var pRetrieved: Longint; var pPalette): HResult; stdcall;
2176
    function GetCurrentImage(var BufferSize: Longint; var pDIBImage): HResult; stdcall;
2177
    function IsUsingDefaultSource: HResult; stdcall;
2178
    function IsUsingDefaultDestination: HResult; stdcall;
2179
  end;
2180
 
2181
(* Definition of interface: IDeferredCommand *)
2182
  IDeferredCommand = interface(IDispatch)
2183
    ['{56A868B8-0AD4-11CE-B03A-0020AF0BA770}']
2184
    (* IDeferredCommand methods *)
2185
    function Cancel: HResult; stdcall;
2186
    function Confidence(var pConfidence: Longint): HResult; stdcall;
2187
    function Postpone(newtime: TRefTime): HResult; stdcall;
2188
    function GetHResult(var phrResult: HResult): HResult; stdcall;
2189
  end;
2190
 
2191
(* Definition of interface: IQueueCommand *)
2192
  IQueueCommand = interface(IUnknown)
2193
    ['{56A868B7-0AD4-11CE-B03A-0020AF0BA770}']
2194
    (* IQueueCommand methods *)
2195
    function InvokeAtStreamTime(out pCmd: IDeferredCommand; time: TRefTime;
2196
        const iid: TGUID; dispidMethod: Longint; wFlags: SmallInt;
2197
        cArgs: Longint; const pDispParams: Variant; var pvarResult: Variant;
2198
        var puArgErr: SmallInt):  HResult; stdcall;
2199
    function InvokeAtPresentationTime(out pCmd: IDeferredCommand;
2200
        time: TRefTime; const iid: TGUID; dispidMethod: Longint;
2201
        wFlags: SmallInt; cArgs: Longint; const pDispParams: Variant;
2202
        var pvarResult: Variant; var puArgErr: SmallInt): HResult; stdcall;
2203
  end;
2204
 
2205
(* Definition of interface: IFilterInfo *)
2206
  IFilterInfo = interface(IDispatch)
2207
    ['{56A868BA-0AD4-11CE-B03A-0020AF0BA770}']
2208
    (* IFilterInfo methods *)
2209
    function FindPin(strPinID: TBSTR; out ppUnk: IDispatch): HResult; stdcall;
2210
    function get_Name(var strName: TBSTR): HResult; stdcall;
2211
    function get_VendorInfo(var strVendorInfo: TBSTR): HResult; stdcall;
2212
    function get_Filter(out ppUnk: IUnknown): HResult; stdcall;
2213
    function get_Pins(out ppUnk: IDispatch): HResult; stdcall;
2214
    function get_IsFileSource(var pbIsSource: LongBool): HResult; stdcall;
2215
    function get_Filename(var pstrFilename: TBSTR): HResult; stdcall;
2216
    function put_Filename(strFilename: TBSTR): HResult; stdcall;
2217
  end;
2218
 
2219
(* Definition of interface: IRegFilterInfo *)
2220
  IRegFilterInfo = interface(IDispatch)
2221
    ['{56A868BB-0AD4-11CE-B03A-0020AF0BA770}']
2222
    (* IRegFilterInfo methods *)
2223
    function get_Name(var strName: TBSTR): HResult; stdcall;
2224
    function Filter(out ppUnk: IDispatch): HResult; stdcall;
2225
  end;
2226
 
2227
(* Definition of interface: IMediaTypeInfo *)
2228
  IMediaTypeInfo = interface(IDispatch)
2229
    ['{56A868BC-0AD4-11CE-B03A-0020AF0BA770}']
2230
    (* IMediaTypeInfo methods *)
2231
    function get_Type(var strType: TBSTR): HResult; stdcall;
2232
    function get_Subtype(var strType: TBSTR): HResult; stdcall;
2233
  end;
2234
 
2235
(* Definition of interface: IPinInfo *)
2236
  IPinInfo = interface(IDispatch)
2237
    ['{56A868BD-0AD4-11CE-B03A-0020AF0BA770}']
2238
    (* IPinInfo methods *)
2239
    function get_Pin(out ppUnk: IUnknown): HResult; stdcall;
2240
    function get_ConnectedTo(out ppUnk: IDispatch): HResult; stdcall;
2241
    function get_ConnectionMediaType(out ppUnk: IDispatch): HResult; stdcall;
2242
    function get_FilterInfo(out ppUnk: IDispatch): HResult; stdcall;
2243
    function get_Name(var ppUnk: TBSTR): HResult; stdcall;
2244
    function get_Direction(var ppDirection: Longint): HResult; stdcall;
2245
    function get_PinID(var strPinID: TBSTR): HResult; stdcall;
2246
    function get_MediaTypes(out ppUnk: IDispatch): HResult; stdcall;
2247
    function Connect(pPin: IUnknown): HResult; stdcall;
2248
    function ConnectDirect(pPin: IUnknown): HResult; stdcall;
2249
    function ConnectWithType(pPin: IUnknown; pMediaType: IDispatch): HResult; stdcall;
2250
    function Disconnect: HResult; stdcall;
2251
    function Render: HResult; stdcall;
2252
  end;
2253
 
2254
(*==========================================================================;
2255
 *
2256
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2257
 *
2258
 *  File:       qnetwork.h
2259
 *
2260
 ***************************************************************************)
2261
 
2262
const
2263
  LIBID_QuartzNetTypeLib: TGUID = (D1:$56A868B1;D2:$0AD4;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
2264
 
2265
  IID_IAMNetShowConfig: TGUID = (D1:$FA2AA8F1;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2266
  IID_IAMChannelInfo: TGUID = (D1:$FA2AA8F2;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2267
  IID_IAMNetworkStatus: TGUID = (D1:$FA2AA8F3;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2268
  IID_IAMExtendedSeeking: TGUID = (D1:$FA2AA8F9;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2269
  IID_IAMNetShowExProps: TGUID = (D1:$FA2AA8F5;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2270
  IID_IAMExtendedErrorInfo: TGUID = (D1:$FA2AA8F6;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2271
  IID_IAMMediaContent: TGUID = (D1:$FA2AA8EF;D2:$8B62;D3:$11D0;D4:($A5,$20,$00,$00,$00,$00,$00,$00));
2272
 
2273
type
2274
  TAMExtendedSeekingCapabilities = (
2275
    AM_EXSEEK_INVALID_0,
2276
    AM_EXSEEK_CANSEEK,
2277
    AM_EXSEEK_CANSCAN,
2278
    AM_EXSEEK_INVALID_3,
2279
    AM_EXSEEK_MARKERSEEK,
2280
    AM_EXSEEK_INVALID_5,
2281
    AM_EXSEEK_INVALID_6,
2282
    AM_EXSEEK_INVALID_7,
2283
    AM_EXSEEK_SCANWITHOUTCLOCK,
2284
    AM_EXSEEK_INVALID_9,
2285
    AM_EXSEEK_INVALID_10,
2286
    AM_EXSEEK_INVALID_11,
2287
    AM_EXSEEK_INVALID_12,
2288
    AM_EXSEEK_INVALID_13,
2289
    AM_EXSEEK_INVALID_14,
2290
    AM_EXSEEK_INVALID_15,
2291
    AM_EXSEEK_NOSTANDARDREPAINT
2292
  );
2293
 
2294
  TDate = record
2295
    da_year: Integer;   // Year - 1980
2296
    da_day: Byte;       // Day of the month
2297
    da_mon: Byte;       // Month (1 = Jan)
2298
  end;
2299
 
2300
(* Definition of interface: IAMNetShowConfig *)
2301
  IAMNetShowConfig = interface(IDispatch)
2302
    ['{FA2AA8F1-8B62-11D0-A520-000000000000}']
2303
    (* IAMNetShowConfig methods *)
2304
    function get_BufferingTime(var pBufferingTime: double): HResult; stdcall;
2305
    function put_BufferingTime(BufferingTime: double): HResult; stdcall;
2306
    function get_UseFixedUDPPort(var pUseFixedUDPPort: WordBool): HResult; stdcall;
2307
    function put_UseFixedUDPPort(UseFixedUDPPort: WordBool): HResult; stdcall;
2308
    function get_FixedUDPPort(var pFixedUDPPort: Longint): HResult; stdcall;
2309
    function put_FixedUDPPort(FixedUDPPort: Longint): HResult; stdcall;
2310
    function get_UseHTTPProxy(var pUseHTTPProxy: WordBool): HResult; stdcall;
2311
    function put_UseHTTPProxy(UseHTTPProxy: WordBool): HResult; stdcall;
2312
    function get_EnableAutoProxy(var pEnableAutoProxy: WordBool): HResult; stdcall;
2313
    function put_EnableAutoProxy(EnableAutoProxy: WordBool): HResult; stdcall;
2314
    function get_HTTPProxyHost(var pbstrHTTPProxyHost: TBSTR): HResult; stdcall;
2315
    function put_HTTPProxyHost(bstrHTTPProxyHost: TBSTR): HResult; stdcall;
2316
    function get_HTTPProxyPort(var pHTTPProxyPort: Longint): HResult; stdcall;
2317
    function put_HTTPProxyPort(HTTPProxyPort: Longint): HResult; stdcall;
2318
    function get_EnableMulticast(var pEnableMulticast: WordBool): HResult; stdcall;
2319
    function put_EnableMulticast(EnableMulticast: WordBool): HResult; stdcall;
2320
    function get_EnableUDP(var pEnableUDP: WordBool): HResult; stdcall;
2321
    function put_EnableUDP(EnableUDP: WordBool): HResult; stdcall;
2322
    function get_EnableTCP(var pEnableTCP: WordBool): HResult; stdcall;
2323
    function put_EnableTCP(EnableTCP: WordBool): HResult; stdcall;
2324
    function get_EnableHTTP(var pEnableHTTP: WordBool): HResult; stdcall;
2325
    function put_EnableHTTP(EnableHTTP: WordBool): HResult; stdcall;
2326
  end;
2327
 
2328
(* Definition of interface: IAMChannelInfo *)
2329
  IAMChannelInfo = interface(IDispatch)
2330
    ['{FA2AA8F2-8B62-11D0-A520-000000000000}']
2331
    (* IAMChannelInfo methods *)
2332
    function get_ChannelName(var pbstrChannelName: TBSTR): HResult; stdcall;
2333
    function get_ChannelDescription(var pbstrChannelDescription: TBSTR): HResult; stdcall;
2334
    function get_ChannelURL(var pbstrChannelURL: TBSTR): HResult; stdcall;
2335
    function get_ContactAddress(var pbstrContactAddress: TBSTR): HResult; stdcall;
2336
    function get_ContactPhone(var pbstrContactPhone: TBSTR): HResult; stdcall;
2337
    function get_ContactEmail(var pbstrContactEmail: TBSTR): HResult; stdcall;
2338
  end;
2339
 
2340
(* Definition of interface: IAMNetworkStatus *)
2341
  IAMNetworkStatus = interface(IDispatch)
2342
    ['{FA2AA8F3-8B62-11D0-A520-000000000000}']
2343
    (* IAMNetworkStatus methods *)
2344
    function get_ReceivedPackets(var pReceivedPackets: Longint): HResult; stdcall;
2345
    function get_RecoveredPackets(var pRecoveredPackets: Longint): HResult; stdcall;
2346
    function get_LostPackets(var pLostPackets: Longint): HResult; stdcall;
2347
    function get_ReceptionQuality(var pReceptionQuality: Longint): HResult; stdcall;
2348
    function get_BufferingCount(var pBufferingCount: Longint): HResult; stdcall;
2349
    function get_IsBroadcast(var pIsBroadcast: WordBool): HResult; stdcall;
2350
    function get_BufferingProgress(var pBufferingProgress: Longint): HResult; stdcall;
2351
  end;
2352
 
2353
(* Definition of interface: IAMExtendedSeeking *)
2354
  IAMExtendedSeeking = interface(IDispatch)
2355
    ['{FA2AA8F9-8B62-11D0-A520-000000000000}']
2356
    (* IAMExtendedSeeking methods *)
2357
    function get_ExSeekCapabilities(var pExCapabilities: Longint): HResult; stdcall;
2358
    function get_MarkerCount(var pMarkerCount: Longint): HResult; stdcall;
2359
    function get_CurrentMarker(var pCurrentMarker: Longint): HResult; stdcall;
2360
    function GetMarkerTime(MarkerNum: Longint; var pMarkerTime: double): HResult; stdcall;
2361
    function GetMarkerName(MarkerNum: Longint; var pbstrMarkerName: TBSTR): HResult; stdcall;
2362
    function put_PlaybackSpeed(Speed: double): HResult; stdcall;
2363
    function get_PlaybackSpeed(var pSpeed: double): HResult; stdcall;
2364
  end;
2365
 
2366
(* Definition of interface: IAMNetShowExProps *)
2367
  IAMNetShowExProps = interface(IDispatch)
2368
    ['{FA2AA8F5-8B62-11D0-A520-000000000000}']
2369
    (* IAMNetShowExProps methods *)
2370
    function get_SourceProtocol(var pSourceProtocol: Longint): HResult; stdcall;
2371
    function get_Bandwidth(var pBandwidth: Longint): HResult; stdcall;
2372
    function get_ErrorCorrection(var pbstrErrorCorrection: TBSTR): HResult; stdcall;
2373
    function get_CodecCount(var pCodecCount: Longint): HResult; stdcall;
2374
    function GetCodecInstalled(CodecNum: Longint; var pCodecInstalled: WordBool): HResult; stdcall;
2375
    function GetCodecDescription(CodecNum: Longint; var pbstrCodecDescription: TBSTR): HResult; stdcall;
2376
    function GetCodecURL(CodecNum: Longint; var pbstrCodecURL: TBSTR): HResult; stdcall;
2377
    function get_CreationDate(var pCreationDate: TDate): HResult; stdcall;
2378
    function get_SourceLink(var pbstrSourceLink: TBSTR): HResult; stdcall;
2379
  end;
2380
 
2381
(* Definition of interface: IAMExtendedErrorInfo *)
2382
  IAMExtendedErrorInfo = interface(IDispatch)
2383
    ['{FA2AA8F6-8B62-11D0-A520-000000000000}']
2384
    (* IAMExtendedErrorInfo methods *)
2385
    function get_HasError(var pHasError: WordBool): HResult; stdcall;
2386
    function get_ErrorDescription(var pbstrErrorDescription: TBSTR): HResult; stdcall;
2387
    function get_ErrorCode(var pErrorCode: Longint): HResult; stdcall;
2388
  end;
2389
 
2390
(* Definition of interface: IAMMediaContent *)
2391
  IAMMediaContent = interface(IDispatch)
2392
    ['{FA2AA8EF-8B62-11D0-A520-000000000000}']
2393
    (* IAMMediaContent methods *)
2394
    function get_AuthorName(var pbstrAuthorName: TBSTR): HResult; stdcall;
2395
    function get_Title(var pbstrTitle: TBSTR): HResult; stdcall;
2396
    function get_Rating(var pbstrRating: TBSTR): HResult; stdcall;
2397
    function get_Description(var pbstrDescription: TBSTR): HResult; stdcall;
2398
    function get_Copyright(var pbstrCopyright: TBSTR): HResult; stdcall;
2399
    function get_BaseURL(var pbstrBaseURL: TBSTR): HResult; stdcall;
2400
    function get_LogoURL(var pbstrLogoURL: TBSTR): HResult; stdcall;
2401
    function get_LogoIconURL(var pbstrLogoURL: TBSTR): HResult; stdcall;
2402
    function get_WatermarkURL(var pbstrWatermarkURL: TBSTR): HResult; stdcall;
2403
    function get_MoreInfoURL(var pbstrMoreInfoURL: TBSTR): HResult; stdcall;
2404
  end;
2405
 
2406
(*==========================================================================;
2407
 *
2408
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2409
 *
2410
 *  File:       cutlist.h
2411
 *
2412
 ***************************************************************************)
2413
 
2414
const
2415
  CLSID_CutListSource: TGUID = (D1:$A5EA8D20;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
2416
  CLSID_CutListGraphBuilder: TGUID = (D1:$A5EA8D2F;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
2417
 
2418
  IID_IAMCutListElement: TGUID = (D1:$CDE29520;D2:$3418;D3:$11CF;D4:($A5,$B0,$00,$20,$AF,$05,$3D,$8F));
2419
  IID_IAMFileCutListElement: TGUID = (D1:$F0947070;D2:$276C;D3:$11D0;D4:($83,$16,$00,$20,$AF,$11,$C0,$10));
2420
  IID_IAMVideoCutListElement: TGUID = (D1:$CDE29522;D2:$3418;D3:$11CF;D4:($A5,$B0,$00,$20,$AF,$05,$3D,$8F));
2421
  IID_IAMAudioCutListElement: TGUID = (D1:$CDE29524;D2:$3418;D3:$11CF;D4:($A5,$B0,$00,$20,$AF,$05,$3D,$8F));
2422
  IID_IStandardCutList: TGUID = (D1:$A5EA8D29;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
2423
  IID_IFileClip: TGUID = (D1:$A5EA8D2A;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
2424
  IID_ICutListGraphBuilder: TGUID = (D1:$A5EA8D2C;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
2425
 
2426
 
2427
const
2428
  CL_DEFAULT_TIME = -1;
2429
 
2430
type
2431
  TCL_Elem_Status = (
2432
    CL_NOT_PLAYED,
2433
    CL_PLAYING,
2434
    CL_FINISHED,
2435
    CL_STATE_INVALID
2436
  );
2437
 
2438
const
2439
  CL_STATE_MASK = CL_STATE_INVALID;
2440
  CL_WAIT_FOR_STATE = TCL_Elem_Status($F0000000);
2441
 
2442
type
2443
  TCL_Elem_Flags  = (
2444
    CL_ELEM_NONE,
2445
    CL_ELEM_FIRST,
2446
    CL_ELEM_LAST,
2447
    CL_ELEM_NULL
2448
  );
2449
 
2450
const
2451
  CL_ELEM_ALL = TCL_Elem_Flags($FFFFFFFF);
2452
 
2453
type
2454
  IAMCutListElement = interface(IUnknown)
2455
    ['{CDE29520-3418-11CF-A5B0-0020AF053D8F}']
2456
    function GetElementStartPosition(var pmtStart: TReference_Time): HResult; stdcall;
2457
    function GetElementDuration(var pmtDuration: TReference_Time): HResult; stdcall;
2458
    function IsFirstElement: HResult; stdcall;
2459
    function IsLastElement: HResult; stdcall;
2460
    function IsNull: HResult; stdcall;
2461
    function ElementStatus(var pdwStatus: DWORD; dwTimeoutMs: DWORD): HResult; stdcall;
2462
  end;
2463
 
2464
  IAMFileCutListElement = interface(IUnknown)
2465
    ['{F0947070-276C-11D0-8316-0020AF11C010}']
2466
    function GetFileName(var ppwstrFileName: LPWSTR): HResult; stdcall;
2467
    function GetTrimInPosition(var pmtTrimIn: TReference_Time): HResult; stdcall;
2468
    function GetTrimOutPosition(var pmtTrimOut: TReference_Time): HResult; stdcall;
2469
    function GetOriginPosition(var pmtOrigin: TReference_Time): HResult; stdcall;
2470
    function GetTrimLength(var pmtLength: TReference_Time): HResult; stdcall;
2471
    function GetElementSplitOffset(var pmtOffset: TReference_Time): HResult; stdcall;
2472
  end;
2473
 
2474
  IAMVideoCutListElement = interface(IUnknown)
2475
    ['{CDE29522-3418-11CF-A5B0-0020AF053D8F}']
2476
    function IsSingleFrame: HResult; stdcall;
2477
    function GetStreamIndex(var piStream: DWORD): HResult; stdcall;
2478
  end;
2479
 
2480
  IAMAudioCutListElement = interface(IUnknown)
2481
    //['{CDE29524-3418-11CF-A5B0-0020AF053D8F}']
2482
    function GetStreamIndex(var piStream: DWORD): HResult; stdcall;
2483
    function HasFadeIn: HResult; stdcall;
2484
    function HasFadeOut: HResult; stdcall;
2485
  end;
2486
 
2487
  IStandardCutList = interface(IUnknown)
2488
    ['{A5EA8D29-253D-11D1-B3F1-00AA003761C5}']
2489
    function AddElement(pElement: IAMCutListElement;
2490
        mtStart, mtDuration: TReference_Time): HResult; stdcall;
2491
    function RemoveElement(pElement: IAMCutListElement): HResult; stdcall;
2492
    function GetFirstElement(pElement: IAMCutListElement): HResult; stdcall;
2493
    function GetLastElement(pElement: IAMCutListElement): HResult; stdcall;
2494
    function GetNextElement(pElement: IAMCutListElement): HResult; stdcall;
2495
 
2496
    function GetPreviousElement(pElement: IAMCutListElement): HResult; stdcall;
2497
    function GetMediaType(out pmt: TAM_Media_Type): HResult; stdcall;
2498
    function SetMediaType(const pmt: TAM_Media_Type): HResult; stdcall;
2499
  end;
2500
 
2501
  IFileClip = interface(IUnknown)
2502
    ['{A5EA8D2A-253D-11D1-B3F1-00AA003761C5}']
2503
    function SetFileAndStream(wstrFileName: LPWSTR; streamNum: DWORD): HResult; stdcall;
2504
    function CreateCut(out ppElement: IAMCutListElement; mtTrimIn, mtTrimOut,
2505
        mtOrigin, mtLength, mtOffset: TReference_Time): HResult; stdcall;
2506
    function GetMediaType(out pmt: TAM_Media_Type): HResult; stdcall;
2507
  end;
2508
 
2509
  ICutListGraphBuilder = interface(IUnknown)
2510
    ['{A5EA8D2C-253D-11D1-B3F1-00AA003761C5}']
2511
    function SetFilterGraph(pFilterGraph: IGraphBuilder): HResult; stdcall;
2512
    function GetFilterGraph(out pFilterGraph: IGraphBuilder): HResult; stdcall;
2513
    function AddCutList(pCutList: IStandardCutList; out ppPin: IPin): HResult; stdcall;
2514
    function RemoveCutList(pCutList: IStandardCutList): HResult; stdcall;
2515
    function SetOutputFileName(const pType: TGUID; lpwstrFile: POLESTR;
2516
        const ppf: IBaseFilter; const pSink: IFileSinkFilter): HResult; stdcall;
2517
    function Render: HResult; stdcall;
2518
    function GetElementFlags(pElement: IAMCutListElement; var lpdwFlags: DWORD): HResult; stdcall;
2519
  end;
2520
 
2521
(*==========================================================================;
2522
 *
2523
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2524
 *
2525
 *  File:       playlist.h
2526
 *
2527
 ***************************************************************************)
2528
 
2529
const
2530
  IID_IAMPlayListItem: TGUID = (D1:$56A868FF;D2:$0AD4;D3:$11CE;D4:($B0,$A3,$00,$20,$AF,$0B,$A7,$70));
2531
  IID_IAMPlayList: TGUID = (D1:$56A868FE;D2:$0AD4;D3:$11CE;D4:($B0,$A3,$00,$20,$AF,$0B,$A7,$70));
2532
 
2533
type
2534
  TAMPlayListItemFlags = (
2535
    AMPLAYLISTITEMFLAGS_INVALID_0,
2536
    AMPLAYLISTITEM_CANSKIP,
2537
    AMPLAYLISTITEM_CANBIND
2538
  );
2539
 
2540
  TAMPlayLisyFlags = (
2541
    AMPLAYLISTFLAGS_INVALID_0,
2542
    AMPLAYLISTITEM_STARTINSCANMODE
2543
  );
2544
 
2545
  IAMPlayListItem = interface(IUnknown)
2546
    ['{56A868FF-0AD4-11CE-B0A3-0020AF0BA770}']
2547
    function GetFlags(var pdwFlags: DWORD): HResult; stdcall;
2548
    function GetSourceCount(var pdwSources: DWORD): HResult; stdcall;
2549
    function GetSourceURL(dwSourceIndex: DWORD; var pbstrURL: TBSTR): HResult; stdcall;
2550
    function GetSourceStart(dwSourceIndex: DWORD; var prtStart: TReference_Time): HResult; stdcall;
2551
    function GetSourceDuration(dwSourceIndex: DWORD;
2552
        var prtDuration: TReference_Time): HResult; stdcall;
2553
    function GetSourceStartMarker(dwSourceIndex: DWORD;
2554
        var pdwMarker: DWORD): HResult; stdcall;
2555
    function GetSourceEndMarker(dwSourceIndex: DWORD;
2556
        var pdwMarker: DWORD): HResult; stdcall;
2557
    function GetSourceStartMarkerName(dwSourceIndex: DWORD;
2558
        var pbstrStartMarker: TBSTR): HResult; stdcall;
2559
    function GetSourceEndMarkerName(dwSourceIndex: DWORD;
2560
        var pbstrEndMarker: TBSTR): HResult; stdcall;
2561
  end;
2562
 
2563
  IAMPlayList = interface(IUnknown)
2564
    ['{56A868FE-0AD4-11CE-B0A3-0020AF0BA770}']
2565
    function GetFlags(var pdwFlags: DWORD): HResult; stdcall;
2566
    function GetItemCount(var pdwItems: DWORD): HResult; stdcall;
2567
    function GetItem(dwItemIndex: DWORD; out ppItem: IAMPlayListItem): HResult; stdcall;
2568
    function GetRepeatInfo(var pdwRepeatCount, pdwRepeatStart,
2569
        pdwRepeatEnd: DWORD): HResult; stdcall;
2570
    function GetScanDuration(var prtScanDuration: TReference_Time): HResult; stdcall;
2571
  end;
2572
 
2573
(*==========================================================================;
2574
 *
2575
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2576
 *
2577
 *  File:       amvideo.h
2578
 *
2579
 ***************************************************************************)
2580
 
2581
// This is an interface on the video renderer that provides information about
2582
// DirectDraw with respect to its use by the renderer. For example it allows
2583
// an application to get details of the surface and any hardware capabilities
2584
// that are available. It also allows someone to adjust the surfaces that the
2585
// renderer should use and furthermore even set the DirectDraw instance. We
2586
// allow someone to set the DirectDraw instance because DirectDraw can only
2587
// be opened once per process so it helps resolve conflicts. There is some
2588
// duplication in this interface as the hardware/emulated/FOURCCs available
2589
// can all be found through the IDirectDraw interface, this interface allows
2590
// simple access to that information without calling the DirectDraw provider
2591
// itself. The AMDDS prefix is ActiveMovie DirectDraw Switches abbreviated.
2592
 
2593
const
2594
  IID_IDirectDrawVideo: TGUID = (D1:$36D39EB0;D2:$DD75;D3:$11CE;D4:($BF,$0E,$00,$AA,$00,$55,$59,$5A));
2595
  IID_IQualProp: TGUID = (D1:$1BD0ECB0;D2:$F8E2;D3:$11CE;D4:($AA,$C6,$00,$20,$AF,$0B,$99,$A3));
2596
  IID_IFullScreenVideo: TGUID = (D1:$DD1D7110;D2:$7836;D3:$11CF;D4:($BF,$47,$00,$AA,$00,$55,$59,$5A));
2597
  IID_IFullScreenVideoEx: TGUID = (D1:$53479470;D2:$F1DD;D3:$11CF;D4:($BC,$42,$00,$AA,$00,$AC,$74,$F6));
2598
  IID_IBaseVideoMixer: TGUID = (D1:$61DED640;D2:$E912;D3:$11CE;D4:($A0,$99,$00,$AA,$00,$47,$9A,$58));
2599
 
2600
const
2601
  AMDDS_NONE    = $00;        // No use for DCI/DirectDraw
2602
  AMDDS_DCIPS   = $01;        // Use DCI primary surface
2603
  AMDDS_PS      = $02;        // Use DirectDraw primary
2604
  AMDDS_RGBOVR  = $04;        // RGB overlay surfaces
2605
  AMDDS_YUVOVR  = $08;        // YUV overlay surfaces
2606
  AMDDS_RGBOFF  = $10;        // RGB offscreen surfaces
2607
  AMDDS_YUVOFF  = $20;        // YUV offscreen surfaces
2608
  AMDDS_RGBFLP  = $40;        // RGB flipping surfaces
2609
  AMDDS_YUVFLP  = $80;        // YUV flipping surfaces
2610
  AMDDS_ALL     = $FF;        // ALL the previous flags
2611
  AMDDS_DEFAULT = AMDDS_ALL;   // Use all available surfaces
2612
 
2613
  AMDDS_YUV = AMDDS_YUVOFF or AMDDS_YUVOVR or AMDDS_YUVFLP;
2614
  AMDDS_RGB = AMDDS_RGBOFF or AMDDS_RGBOVR or AMDDS_RGBFLP;
2615
  AMDDS_PRIMARY = AMDDS_DCIPS or AMDDS_PS;
2616
 
2617
type
2618
  IDirectDrawVideo = interface(IUnknown)
2619
    ['{36D39EB0-DD75-11CE-BF0E-00AA0055595A}']
2620
    // IDirectDrawVideo methods
2621
    function GetSwitches(var pSwitches: DWORD): HResult; stdcall;
2622
    function SetSwitches(pSwitches: DWORD): HResult; stdcall;
2623
    function GetCaps(var pCaps: DDCAPS): HResult; stdcall;
2624
    function GetEmulatedCaps(var pCaps: DDCAPS): HResult; stdcall;
2625
    function GetSurfaceDesc(var pSurfaceDesc: DDSURFACEDESC): HResult; stdcall;
2626
    function GetFourCCCodes(var pCount, pCodes: DWORD): HResult; stdcall;
2627
    function SetDirectDraw(pDirectDraw: IDirectDraw): HResult; stdcall;
2628
    function GetDirectDraw(out ppDirectDraw: IDirectDraw): HResult; stdcall;
2629
    function GetSurfaceType(var pSurfaceType: DWORD): HResult; stdcall;
2630
    function SetDefault: HResult; stdcall;
2631
    function UseScanLine(UseScanLine: LongBool): HResult; stdcall;
2632
    function CanUseScanLine(var UseScanLine: LongBool): HResult; stdcall;
2633
    function UseOverlayStretch(UseOverlayStretch: LongBool): HResult; stdcall;
2634
    function CanUseOverlayStretch(var UseOverlayStretch: LongBool): HResult; stdcall;
2635
    function UseWhenFullScreen(UseWhenFullScreen: LongBool): HResult; stdcall;
2636
    function WillUseFullScreen(var UseWhenFullScreen: LongBool): HResult; stdcall;
2637
  end;
2638
 
2639
  IQualProp = interface(IUnknown)
2640
    ['{1BD0ECB0-F8E2-11CE-AAC6-0020AF0B99A3}']
2641
    // Compare these with the functions in class CGargle in gargle.h
2642
    function get_FramesDroppedInRenderer(var pcFrames: Integer): HResult; stdcall;
2643
    function get_FramesDrawn(var pcFrames: Integer): HResult; stdcall;
2644
    function get_AvgFrameRate(var piAvgFrameRate: Integer): HResult; stdcall;
2645
    function get_Jitter(var iJitter: Integer): HResult; stdcall;
2646
    function get_AvgSyncOffset(var piAvg: Integer): HResult; stdcall;
2647
    function get_DevSyncOffset(var piDev: Integer): HResult; stdcall;
2648
  end;
2649
 
2650
// This interface allows an application or plug in distributor to control a
2651
// full screen renderer. The Modex renderer supports this interface. When
2652
// connected a renderer should load the display modes it has available
2653
// The number of modes available can be obtained through CountModes. Then
2654
// information on each individual mode is available by calling GetModeInfo
2655
// and IsModeAvailable. An application may enable and disable any modes
2656
// by calling the SetEnabled flag with OATRUE or OAFALSE (not C/C++ TRUE
2657
// and FALSE values) - the current value may be queried by IsModeEnabled
2658
 
2659
// A more generic way of setting the modes enabled that is easier to use
2660
// when writing applications is the clip loss factor. This defines the
2661
// amount of video that can be lost when deciding which display mode to
2662
// use. Assuming the decoder cannot compress the video then playing an
2663
// MPEG file (say 352x288) into a 320x200 display will lose about 25% of
2664
// the image. The clip loss factor specifies the upper range permissible.
2665
// To allow typical MPEG video to be played in 320x200 it defaults to 25%
2666
 
2667
  IFullScreenVideo = interface(IUnknown)
2668
    ['{DD1D7110-7836-11CF-BF47-00AA0055595A}']
2669
    // IFullScreenVideo methods
2670
    function CountModes(var pModes: Longint): HResult; stdcall;
2671
    function GetModeInfo(Mode: Longint; var pWidth, pHeight, pDepth: Longint): HResult; stdcall;
2672
    function GetCurrentMode(var pMode: Longint): HResult; stdcall;
2673
    function IsModeAvailable(Mode: Longint): HResult; stdcall;
2674
    function IsModeEnabled(Mode: Longint): HResult; stdcall;
2675
    function SetEnabled(Mode: Longint; bEnabled: Longint): HResult; stdcall;
2676
    function GetClipFactor(var pClipFactor: Longint): HResult; stdcall;
2677
    function SetClipFactor(ClipFactor: Longint): HResult; stdcall;
2678
    function SetMessageDrain(hwnd: HWND): HResult; stdcall;
2679
    function GetMessageDrain(var hwnd: HWND): HResult; stdcall;
2680
    function SetMonitor(Monitor: Longint): HResult; stdcall;
2681
    function GetMonitor(var Monitor: Longint): HResult; stdcall;
2682
    function HideOnDeactivate(Hide: LongBool): HResult; stdcall;
2683
    function IsHideOnDeactivate: HResult; stdcall;
2684
    function SetCaption(strCaption: TBStr): HResult; stdcall;
2685
    function GetCaption(var pstrCaption: TBStr): HResult; stdcall;
2686
    function SetDefault: HResult; stdcall;
2687
  end;
2688
 
2689
// This adds the accelerator table capabilities in fullscreen. This is being
2690
// added between the original runtime release and the full SDK release. We
2691
// cannot just add the method to IFullScreenVideo as we don't want to force
2692
// applications to have to ship the ActiveMovie support DLLs - this is very
2693
// important to applications that plan on being downloaded over the Internet
2694
 
2695
  IFullScreenVideoEx = interface(IFullScreenVideo)
2696
    ['{53479470-F1DD-11CF-BC42-00AA00AC74F6}']
2697
    // IFullScreenVideoEx
2698
    function SetAcceleratorTable(hwnd: HWND; hAccel: HACCEL): HResult; stdcall;
2699
    function GetAcceleratorTable(var hwnd: HWND; var hAccel: HACCEL): HResult; stdcall;
2700
    function KeepPixelAspectRatio(KeepAspect: LongBool): HResult; stdcall;
2701
    function IsKeepPixelAspectRatio(var pKeepAspect: LongBool): HResult; stdcall;
2702
  end;
2703
 
2704
// The SDK base classes contain a base video mixer class. Video mixing in a
2705
// software environment is tricky because we typically have multiple streams
2706
// each sending data at unpredictable times. To work with this we defined a
2707
// pin that is the lead pin, when data arrives on this pin we do a mix. As
2708
// an alternative we may not want to have a lead pin but output samples at
2709
// predefined spaces, like one every 1/15 of a second, this interfaces also
2710
// supports that mode of operations (there is a working video mixer sample)
2711
 
2712
  IBaseVideoMixer = interface(IUnknown)
2713
    ['{61DED640-E912-11CE-A099-00AA00479A58}']
2714
    function SetLeadPin(iPin: Integer): HResult; stdcall;
2715
    function GetLeadPin(var iPin: Integer): HResult; stdcall;
2716
    function GetInputPinCount(var piPinCount: Integer): HResult; stdcall;
2717
    function IsUsingClock(var pbValue: Integer): HResult; stdcall;
2718
    function SetUsingClock(bValue: Integer): HResult; stdcall;
2719
    function GetClockPeriod(var pbValue: Integer): HResult; stdcall;
2720
    function SetClockPeriod(bValue: Integer): HResult; stdcall;
2721
  end;
2722
 
2723
const
2724
  iPALETTE_COLORS = 256;     // Maximum colours in palette
2725
  iEGA_COLORS     = 16;      // Number colours in EGA palette
2726
  iMASK_COLORS    = 3;       // Maximum three components
2727
  iTRUECOLOR      = 16;      // Minimum true colour device
2728
  iRED            = 0;       // Index position for RED mask
2729
  iGREEN          = 1;       // Index position for GREEN mask
2730
  iBLUE           = 2;       // Index position for BLUE mask
2731
  iPALETTE        = 8;       // Maximum colour depth using a palette
2732
  iMAXBITS        = 8;       // Maximum bits per colour component
2733
 
2734
// Used for true colour images that also have a palette
2735
type
2736
  TTrueColorInfo = record
2737
    dwBitMasks: array[0..iMASK_COLORS-1] of DWORD;
2738
    bmiColors: array[0..iPALETTE_COLORS-1] of TRGBQuad;
2739
  end;
2740
 
2741
// The BITMAPINFOHEADER contains all the details about the video stream such
2742
// as the actual image dimensions and their pixel depth. A source filter may
2743
// also request that the sink take only a section of the video by providing a
2744
// clipping rectangle in rcSource. In the worst case where the sink filter
2745
// forgets to check this on connection it will simply render the whole thing
2746
// which isn't a disaster. Ideally a sink filter will check the rcSource and
2747
// if it doesn't support image extraction and the rectangle is not empty then
2748
// it will reject the connection. A filter should use SetRectEmpty to reset a
2749
// rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
2750
// The rcTarget specifies the destination rectangle for the video, for most
2751
// source filters they will set this to all zeroes, a downstream filter may
2752
// request that the video be placed in a particular area of the buffers it
2753
// supplies in which case it will call QueryAccept with a non empty target
2754
 
2755
  TVideoInfoHeader = record
2756
    rcSource: TRect;                   // The bit we really want to use
2757
    rcTarget: TRect;                   // Where the video should go
2758
    dwBitRate: DWORD;                  // Approximate bit data rate
2759
    dwBitErrorRate: DWORD;             // Bit error rate for this stream
2760
    AvgTimePerFrame: TReference_Time;  // Average time per frame (100ns units)
2761
 
2762
    bmiHeader: TBitmapInfoHeader;
2763
  end;
2764
 
2765
// make sure the pbmi is initialized before using these macros
2766
{function TRUECOLOR(pbmi: PBitmapInfo): Pointer;
2767
function COLORS(pbmi: PBitmapInfo): Pointer;
2768
function BITMASKS(pbmi: PBitmapInfo): Pointer;
2769
{
2770
#define TRUECOLOR(pbmi)  ((TRUECOLORINFO *)(((LPBYTE)&((pbmi)->bmiHeader)) \
2771
                                        + (pbmi)->bmiHeader.biSize))
2772
#define COLORS(pbmi)    ((RGBQUAD *)(((LPBYTE)&((pbmi)->bmiHeader))     \
2773
                                        + (pbmi)->bmiHeader.biSize))
2774
#define BITMASKS(pbmi)  ((DWORD *)(((LPBYTE)&((pbmi)->bmiHeader))       \
2775
                                        + (pbmi)->bmiHeader.biSize))
2776
 }
2777
// All the image based filters use this to communicate their media types. It's
2778
// centred principally around the BITMAPINFO. This structure always contains a
2779
// BITMAPINFOHEADER followed by a number of other fields depending on what the
2780
// BITMAPINFOHEADER contains. If it contains details of a palettised format it
2781
// will be followed by one or more RGBQUADs defining the palette. If it holds
2782
// details of a true colour format then it may be followed by a set of three
2783
// DWORD bit masks that specify where the RGB data can be found in the image
2784
// (For more information regarding BITMAPINFOs see the Win32 documentation)
2785
 
2786
// The rcSource and rcTarget fields are not for use by filters supplying the
2787
// data. The destination (target) rectangle should be set to all zeroes. The
2788
// source may also be zero filled or set with the dimensions of the video. So
2789
// if the video is 352x288 pixels then set it to (0,0,352,288). These fields
2790
// are mainly used by downstream filters that want to ask the source filter
2791
// to place the image in a different position in an output buffer. So when
2792
// using for example the primary surface the video renderer may ask a filter
2793
// to place the video images in a destination position of (100,100,452,388)
2794
// on the display since that's where the window is positioned on the display
2795
 
2796
// !!! WARNING !!!
2797
// DO NOT use this structure unless you are sure that the BITMAPINFOHEADER
2798
// has a normal biSize == sizeof(BITMAPINFOHEADER) !
2799
// !!! WARNING !!!
2800
 
2801
type
2802
  TVideoInfo = record
2803
    rcSource: TRect;                   // The bit we really want to use
2804
    rcTarget: TRect;                   // Where the video should go
2805
    dwBitRate: DWORD;                  // Approximate bit data rate
2806
    dwBitErrorRate: DWORD;             // Bit error rate for this stream
2807
    AvgTimePerFrame: TReference_Time;  // Average time per frame (100ns units)
2808
 
2809
    bmiHeader: TBitmapInfoHeader;
2810
 
2811
    case Integer of
2812
    0: (
2813
      bmiColors: array[0..iPALETTE_COLORS-1] of TRGBQuad // Colour palette
2814
      );
2815
    1: (
2816
      dwBitMasks: array[0..iMASK_COLORS-1] of DWORD      // True colour masks
2817
      );
2818
    2: (
2819
      TrueColorInfo: TTrueColorInfo                      // Both of the above
2820
      );
2821
  end;
2822
 
2823
// These macros define some standard bitmap format sizes
2824
 
2825
const
2826
  SIZE_EGA_PALETTE = iEGA_COLORS * SizeOf(TRGBQuad);
2827
  SIZE_PALETTE = iPALETTE_COLORS * SizeOf(TRGBQuad);
2828
  SIZE_MASKS = iMASK_COLORS * SizeOf(DWORD);
2829
 
2830
  SIZE_PREHEADER = 48; // offset TVideoInfoHeader.bmiHeader
2831
  SIZE_VIDEOHEADER = SizeOf(TVideoInfoHeader);
2832
 
2833
// !!! for abnormal biSizes
2834
// #define SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + SIZE_PREHEADER)
2835
 
2836
// DIBSIZE calculates the number of bytes required by an image
2837
{
2838
function WIDTHBYTES(bits: Integer): DWORD;
2839
function DIBWIDTHBYTES(const bhi: TBitmapInfoHeader): DWORD;
2840
function _DIBSIZE(const bmi: TBitmapInfoHeader): DWORD;
2841
function DIBSIZE(const bmi: TBitmapInfoHeader): DWORD;
2842
{
2843
#define WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
2844
#define DIBWIDTHBYTES(bi) (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
2845
#define _DIBSIZE(bi) (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
2846
#define DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
2847
}
2848
// This compares the bit masks between two VIDEOINFOHEADERs
2849
{
2850
function BIT_MASKS_MATCH(const bmi1, bmi2: TBitmapInfo): Boolean;
2851
{
2852
#define BIT_MASKS_MATCH(pbmi1,pbmi2)                                \
2853
    (((pbmi1)->dwBitMasks[iRED] == (pbmi2)->dwBitMasks[iRED]) &&        \
2854
     ((pbmi1)->dwBitMasks[iGREEN] == (pbmi2)->dwBitMasks[iGREEN]) &&    \
2855
     ((pbmi1)->dwBitMasks[iBLUE] == (pbmi2)->dwBitMasks[iBLUE]))
2856
}
2857
// These zero fill different parts of the VIDEOINFOHEADER structure
2858
 
2859
// Only use these macros for pbmi's with a normal BITMAPINFOHEADER biSize
2860
{procedure RESET_MASKS(var bmi: TBitmapInfo);
2861
procedure RESET_HEADER(var bmi: TBitmapInfo);
2862
procedure RESET_PALETTE(var bmi: TBitmapInfo);
2863
{
2864
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,SIZE_MASKS))
2865
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi),SIZE_VIDEOHEADER))
2866
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,SIZE_PALETTE));
2867
}
2868
{
2869
// !!! This is the right way to do it, but may break existing code
2870
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
2871
                        (pbmi)->bmiHeader.biSize,SIZE_MASKS)))
2872
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi), SIZE_PREHEADER +      \
2873
                        sizeof(BITMAPINFOHEADER)))
2874
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
2875
                        (pbmi)->bmiHeader.biSize,SIZE_PALETTE))
2876
}
2877
 
2878
// Other (hopefully) useful bits and bobs
2879
{
2880
#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= iPALETTE)
2881
#define PALETTE_ENTRIES(pbmi) ((DWORD) 1 << (pbmi)->bmiHeader.biBitCount)
2882
 
2883
// Returns the address of the BITMAPINFOHEADER from the VIDEOINFOHEADER
2884
#define HEADER(pVideoInfo) (&(((VIDEOINFOHEADER *) (pVideoInfo))->bmiHeader))
2885
 }
2886
 
2887
// MPEG variant - includes a DWORD length followed by the
2888
// video sequence header after the video header.
2889
//
2890
// The sequence header includes the sequence header start code and the
2891
// quantization matrices associated with the first sequence header in the
2892
// stream so is a maximum of 140 bytes long.
2893
type
2894
  TMPEG1VideInfo = record
2895
    hdr: TVideoInfoHeader;                  // Compatible with VIDEOINFO
2896
    dwStartTimeCode: DWORD;                 // 25-bit Group of pictures time code
2897
                                            // at start of data
2898
    cbSequenceHeader: DWORD;                // Length in bytes of bSequenceHeader
2899
    bSequenceHeader: array[0..0] of Byte;   // Sequence header including
2900
                                            // quantization matrices if any
2901
  end;
2902
 
2903
const
2904
  MAX_SIZE_MPEG1_SEQUENCE_INFO = 140;
2905
{
2906
#define SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
2907
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
2908
}
2909
 
2910
// Analog video variant - Use this when the format is FORMAT_AnalogVideo
2911
//
2912
// rcSource defines the portion of the active video signal to use
2913
// rcTarget defines the destination rectangle
2914
//    both of the above are relative to the dwActiveWidth and dwActiveHeight fields
2915
// dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
2916
// dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM  (but could change for HDTV)
2917
type
2918
  TAnalogVideoInfo = record
2919
    rcSource: TRect;                   // Width max is 720, height varies w/ TransmissionS
2920
    rcTarget: TRect;                   // Where the video should go
2921
    dwBitRate: DWORD;                  // Always 720 (CCIR-601 active samples per line)
2922
    dwBitErrorRate: DWORD;             // 483 for NTSC, 575 for PAL/SECAM
2923
    AvgTimePerFrame: TReference_Time;  // Normal ActiveMovie units (100 nS)
2924
  end;
2925
 
2926
(*==========================================================================;
2927
 *
2928
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2929
 *
2930
 *  File:       amaudio.h
2931
 *
2932
 ***************************************************************************)
2933
 
2934
const
2935
  IID_IAMDirectSound: TGUID = (D1:$546F4260;D2:$D53E;D3:$11CF;D4:($B3,$F0,$00,$AA,$00,$37,$61,$C5));
2936
 
2937
// This is the interface the audio renderer supports to give the application
2938
// access to the direct sound object and buffers it is using, to allow the
2939
// application to use things like the 3D features of Direct Sound for the
2940
// soundtrack of a movie being played with Active Movie
2941
 
2942
// be nice to our friends in C
2943
type
2944
  IAMDirectSound = interface(IUnknown)
2945
    ['{546F4260-D53E-11CF-B3F0-00AA003761C5}']
2946
    (* IAMDirectSound methods *)
2947
    function GetDirectSoundInterface(out lplpds: IDirectSound): HResult; stdcall;
2948
    function GetPrimaryBufferInterface(out lplpdsb: IDirectSoundBuffer): HResult; stdcall;
2949
    function GetSecondaryBufferInterface(out lplpdsb: IDirectSoundBuffer): HResult; stdcall;
2950
    function ReleaseDirectSoundInterface(lpds: IDirectSound): HResult; stdcall;
2951
    function ReleasePrimaryBufferInterface(lpdsb: IDirectSoundBuffer): HResult; stdcall;
2952
    function ReleaseSecondaryBufferInterface(lpdsb: IDirectSoundBuffer): HResult; stdcall;
2953
    function SetFocusWindow(hwnd: HWND; b: BOOL): HResult; stdcall;
2954
    function GetFocusWindow(var hwnd: HWND; var b: BOOL): HResult; stdcall;
2955
  end;
2956
 
2957
(*==========================================================================;
2958
 *
2959
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2960
 *
2961
 *  File:       amvpe.h
2962
 *
2963
 ***************************************************************************)
2964
 
2965
type
2966
 
2967
(*
2968
 * VIDOESIGNALINFO
2969
 *)
2970
  TAMVideoSignalInfo = record
2971
    dwSize: DWORD;              // Size of the structure
2972
    dwVREFHeight: DWORD;        // Specifies the number of lines of data in the vref
2973
    bDoubleClock: BOOL;         // videoport should enable double clocking
2974
    bVACT: BOOL;                // videoport should use an external VACT signal
2975
    bInterlaced: BOOL;          // Indicates that the signal is interlaced
2976
    bHalfline: BOOL;            // Device will write half lines into the frame buffer
2977
    bInvertedPolarity: BOOL;    // Devoce inverts the polarity by default
2978
  end;
2979
 
2980
(*
2981
 * DDVIDEOPORTCONNECT
2982
 *)
2983
   DDVIDEOPORTCONNECT = record
2984
     dwSize: DWORD;             // size of the DDVIDEOPORTCONNECT structure
2985
     guidTypeID: TGUID;         // Description of video port connection
2986
     dwPortWidth: DWORD;        // Width of the video port
2987
     dwFlags: DWORD;            // Connection flags
2988
   end;
2989
 
2990
  IVPEConfig = interface(IUnknown)
2991
    ['{BC29A660-30E3-11d0-9E69-00C04FD7C15B}']
2992
    // gets the various connection information structures (guid, portwidth)
2993
    // in an array of structures. If the pointer to the array is NULL, first
2994
    // parameter returns the total number of formats supported.
2995
    function GetConnectInfo(var lpNumConnectInfo: DWORD;
2996
        var lpddvpConnectInfo: DDVIDEOPORTCONNECT): HResult; stdcall;
2997
 
2998
    function SetConnectInfo(const ddvpConnectInfo: DDVIDEOPORTCONNECT): HResult; stdcall;
2999
 
3000
    // gets the various formats supported by the decoder in an array
3001
    // of structures. If the pointer to the array is NULL, first parameter
3002
    // returns the total number of formats supported.
3003
    function GetVideoFormats(var lpNumFormats: DWORD;
3004
        const lpddpfFormats: DDPIXELFORMAT): HResult; stdcall;
3005
 
3006
    // retrives maximum pixels per second rate expected for a given
3007
    // format and a given scaling factor. If decoder does not support
3008
    // those scaling factors, then it gives the rate and the nearest
3009
    // scaling factors.
3010
    function GetMaxPixelRate(const ddpfFormat: DDPIXELFORMAT;
3011
        lpdwZoomHeight, lpdwZoomWidth: DWORD;
3012
        var lpdwMaxPixelsPerSecond: DWORD): HResult; stdcall;
3013
 
3014
    // retrives various properties of the decoder for a given format
3015
    function GetVideoSignalInfo(const ddpfFormat: DDPIXELFORMAT;
3016
        var lpAMVideoSignalInfo: TAMVideoSignalInfo): HResult; stdcall;
3017
 
3018
    // asks the decoder to ouput in this format. Return value should give
3019
    // appropriate error code
3020
    function SetVideoFormat(const ddpfFormat: DDPIXELFORMAT): HResult; stdcall;
3021
 
3022
    // asks the decoder to treat even fields like odd fields and visa versa
3023
    function SetInvertPolarity: HResult; stdcall;
3024
 
3025
    // sets the scaling factors. If decoder does not support these,
3026
    // then it sets the values to the nearest factors it can support
3027
    function SetScalingFactors(var lpdwZoomHeight, lpdwZoomWidth: DWORD): HResult; stdcall;
3028
  end;
3029
 
3030
  IVPE = interface(IUnknown)
3031
    ['{BC29A661-30E3-11d0-9E69-00C04FD7C15B}']
3032
    function SetOverlaySurface(lpOverlaySurface: IUnknown;
3033
       iNumBackBuffers: Integer): HResult; stdcall;
3034
  end;
3035
 
3036
(*==========================================================================;
3037
 *
3038
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3039
 *
3040
 *  File:       dv.h
3041
 *
3042
 ***************************************************************************)
3043
 
3044
const
3045
  DV_SMCHN       = $0000e000;
3046
  DV_AUDIOMODE   = $00000f00;
3047
  DV_AUDIO5060   = $00200000;
3048
  DV_AUDIOSMP    = $38000000;
3049
  DV_AUDIOQU     = $07000000;
3050
  DV_NTSC525_60  = 0;
3051
  DV_PAL625_50   = 1;
3052
 
3053
  DV_SD          = $00;
3054
  DV_HD          = $01;
3055
  DV_SL          = $02;
3056
 
3057
  SIZE_DVINFO    = $20;
3058
 
3059
type
3060
  TDVInfo = record
3061
    //for 1st 5/6 DIF seq.
3062
    dwDVAAuxSrc: DWORD;
3063
    dwDVAAuxCtl: DWORD;
3064
    //for 2nd  5/6 DIF seq.
3065
    dwDVAAuxSrc1: DWORD;
3066
    dwDVAAuxCtl1: DWORD;
3067
    //for video information
3068
    dwDVVAuxSrc: DWORD;
3069
    dwDVVAuxCtl: DWORD;
3070
    dwDVReserved: array[0..1] of DWORD;
3071
  end;
3072
 
3073
  TDVAudInfo = record
3074
    bAudStyle: array[0..1] of Byte;
3075
    //LSB 6 bits for starting DIF sequence number
3076
    //MSB 2 bits: 0 for mon. 1: stereo in one 5/6 DIF sequences, 2: stereo audio in both 5/6 DIF sequences
3077
    //example: 0x00: mon, audio in first 5/6 DIF sequence
3078
    //                 0x05: mon, audio in 2nd 5 DIF sequence
3079
    //                 0x15: stereo, audio only in 2nd 5 DIF sequence
3080
    //                 0x10: stereo, audio only in 1st 5/6 DIF sequence
3081
    //                 0x20: stereo, left ch in 1st 5/6 DIF sequence, right ch in 2nd 5/6 DIF sequence
3082
    //                 0x26: stereo, rightch in 1st 6 DIF sequence, left ch in 2nd 6 DIF sequence
3083
    bAudQu: array[0..1] of Byte;            //qbits, only support 12, 16,
3084
 
3085
    bNumAudPin: Byte;                              //how many pin(language)
3086
    wAvgSamplesPerPinPerFrm: array[0..1] of WORD;  //samples size for one audio pin in one frame(which has 10 or 12 DIF sequence)
3087
    wBlkMode: WORD;                                //45 for NTSC, 54 for PAL
3088
    wDIFMode: WORD;                                //5  for NTSC, 6 for PAL
3089
    wBlkDiv: WORD;                                 //15  for NTSC, 18 for PAL
3090
  end;
3091
 
3092
(*==========================================================================;
3093
 *
3094
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3095
 *
3096
 *  File:       vptype.h
3097
 *
3098
 ***************************************************************************)
3099
 
3100
type
3101
  // enum to specify the criterion, which the vpmixer is supposed to use
3102
  // in order to select the video format
3103
  TAMVP_Select_Format_By = (
3104
    AMVP_DO_NOT_CARE,
3105
    AMVP_BEST_BANDWIDTH,
3106
    AMVP_INPUT_SAME_AS_OUTPUT
3107
  );
3108
 
3109
  // enum to specify the various mode
3110
  TAMVP_Mode = (
3111
    AMVP_MODE_WEAVE,
3112
    AMVP_MODE_BOBINTERLEAVED,
3113
    AMVP_MODE_BOBNONINTERLEAVED,
3114
    AMVP_MODE_SKIPEVEN,
3115
    AMVP_MODE_SKIPODD
3116
  );
3117
 
3118
  // struct to specify the width and height. The context could be anything
3119
  // such as scaling cropping etc.
3120
  TAMVPSize = record
3121
    dwWidth: DWORD;                    // the width
3122
    dwHeight: DWORD;                   // the height
3123
  end;
3124
 
3125
  // struct to specify the dimensional characteristics of the input stream
3126
  TAMVPIMInfo = record
3127
    dwFieldWidth: DWORD;               // Field height of the data
3128
    dwFieldHeight: DWORD;              // Field width of the data
3129
    dwVBIWidth: DWORD;                 // Width of the VBI data
3130
    dwVBIHeight: DWORD;                // Height of the VBI data
3131
    rcValidRegion: TRect;              // The vaild rectangle, used for cropping
3132
  end;
3133
 
3134
 
3135
  // struct to specify the various data specific characteristics of the input stream
3136
  TAMVPDataInfo = record
3137
     dwSize: DWORD;                    // Size of the struct
3138
     dwMicrosecondsPerField: DWORD;    // Time taken by each field
3139
     amvpDimInfo: TAMVPIMInfo;         // Dimensional Information
3140
     dwPictAspectRatioX: DWORD;        // X dimension of Picture Aspect Ratio
3141
     dwPictAspectRatioY: DWORD;        // Y dimension of Picture Aspect Ratio
3142
     bEnableDoubleClock: BOOL;         // Videoport should enable double clocking
3143
     bEnableVACT: BOOL;                // Videoport should use an external VACT signal
3144
     bDataIsInterlaced: BOOL;          // Indicates that the signal is interlaced
3145
     lHalfLinesOdd: Longint;           // number of halflines in the odd field
3146
     bFieldPolarityInverted: BOOL;     // Device inverts the polarity by default
3147
     dwNumLinesInVREF: DWORD;          // Number of lines of data in VREF
3148
     lHalfLinesEven: Longint;          // number of halflines in the even field
3149
     dwReserved1: DWORD;               // Reserved for future use
3150
  end;
3151
 
3152
(*==========================================================================;
3153
 *
3154
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3155
 *
3156
 *  File:       vpconfig.h
3157
 *
3158
 ***************************************************************************)
3159
 
3160
const
3161
  IID_IVPConfig: TGUID = (D1:$BC29A660;D2:$30E3;D3:$11D0;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
3162
  IID_IVPVBIConfig: TGUID = (D1:$EC529B00;D2:$1A1F;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
3163
 
3164
type
3165
// IVPBaseConfig
3166
  IVPBaseConfig = interface(IUnknown)
3167
    // gets the various connection information structures (guid, portwidth)
3168
    // in an array of structures. If the pointer to the array is NULL, first
3169
    // parameter returns the total number of formats supported.
3170
    function GetConnectInfo(var pdwNumConnectInfo: DWORD;
3171
      var pddVPConnectInfo: DDVIDEOPORTCONNECT): HResult; stdcall;
3172
 
3173
    // sets the connection entry chosen (0, 1, .. ,(dwNumProposedEntries-1))
3174
    function SetConnectInfo(dwChosenEntry: DWORD): HResult; stdcall;
3175
 
3176
    // gets various data parameters, includes dimensionnal info
3177
    function GetVPDataInfo(var pamvpDataInfo: TAMVPDataInfo): HResult; stdcall;
3178
 
3179
    // retrives maximum pixels per second rate expected for a given
3180
    // format and a given scaling factor. If decoder does not support
3181
    // those scaling factors, then it gives the rate and the nearest
3182
    // scaling factors.
3183
    function GetMaxPixelRate(var pamvpSize: TAMVPSize;
3184
      var pdwMaxPixelsPerSecond: DWORD): HResult; stdcall;
3185
 
3186
    // informs the callee of the videoformats supported by the videoport
3187
    function InformVPInputFormats(dwNumFormats: DWORD;
3188
      const  pDDPixelFormats: DDPIXELFORMAT): HResult; stdcall;
3189
 
3190
    // gets the various formats supported by the decoder in an array
3191
    // of structures. If the pointer to the array is NULL, first parameter
3192
    // returns the total number of formats supported.
3193
    function GetVideoFormats(var pdwNumFormats: DWORD;
3194
      var pddPixelFormats: DDPIXELFORMAT): HResult; stdcall;
3195
 
3196
    // sets the format entry chosen (0, 1, .. ,(dwNumProposedEntries-1))
3197
    function SetVideoFormat(dwChosenEntry: DWORD): HResult; stdcall;
3198
 
3199
    // asks the decoder to treat even fields like odd fields and visa versa
3200
    function SetInvertPolarity: HResult; stdcall;
3201
 
3202
    // the mixer uses this function to determine if the callee wants
3203
    // the vpmixer to use its overlay surface and if so to get a pointer to it
3204
    function GetOverlaySurface(out ppddOverlaySurface: IDirectDrawSurface): HResult; stdcall;
3205
 
3206
    // sets the direct draw kernel handle
3207
    function SetDirectDrawKernelHandle(dwDDKernelHandle: DWORD): HResult; stdcall;
3208
 
3209
    // sets the video port id
3210
    function SetVideoPortID(dwVideoPortID: DWORD): HResult; stdcall;
3211
 
3212
    // sets the direct draw surface kernel handle
3213
    function SetDDSurfaceKernelHandles(cHandles: DWORD;
3214
        rgDDKernelHandles: DWORD): HResult; stdcall;
3215
 
3216
    // Tells driver about surface created on its behalf by ovmixer/vbisurf and
3217
    // returned from videoport/ddraw. Should always return NOERROR or E_NOIMPL.
3218
    // dwPitch is the pitch of the surface (distance in pixels between the start
3219
    // pixels of two consecutive lines of the surface). (dwXOrigin, dwYOrigin)
3220
    // are the (X, Y) coordinates of the pixel at which valid data starts.
3221
    function SetSurfaceParameters(dwPitch: DWORD; dwXOrigin, dwYOrigin: DWORD): HResult; stdcall;
3222
  end;
3223
 
3224
// IVPConfig
3225
  IVPConfig = interface(IVPBaseConfig)
3226
    ['{BC29A660-30E3-11D0-9E69-00C04FD7C15B}']
3227
    // the mixer uses this function to determine if the callee wants
3228
    // the mixer to decimate VIDEO data at its own descrition
3229
    function IsVPDecimationAllowed(var pbIsDecimationAllowed: BOOL): HResult; stdcall;
3230
 
3231
    // sets the scaling factors. If decoder does not support these,
3232
    // then it sets the values to the nearest factors it can support
3233
    function SetScalingFactors(const pamvpSize: TAMVPSize): HResult; stdcall;
3234
  end;
3235
 
3236
// IVPVBIConfig
3237
  IVPVBIConfig = interface(IVPBaseConfig)
3238
    ['{EC529B00-1A1F-11D1-BAD9-00609744111A}']
3239
  end;
3240
 
3241
(*==========================================================================;
3242
 *
3243
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3244
 *
3245
 *  File:       vpnotify.h
3246
 *
3247
 ***************************************************************************)
3248
 
3249
const
3250
  IID_IVPNotify: TGUID = (D1:$C76794A1;D2:$D6C5;D3:$11D0;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
3251
  IID_IVPVBINotify: TGUID = (D1:$EC529B01;D2:$1A1F;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
3252
 
3253
type
3254
// interface IVPBaseNotify
3255
  IVPBaseNotify = interface(IUnknown)
3256
    // this function initializes the reconnection to the decoder.
3257
    function RenegotiateVPParameters: HResult; stdcall;
3258
  end;
3259
 
3260
// interface IVPNotify
3261
  IVPNotify = interface(IVPBaseNotify)
3262
    ['{C76794A1-D6C5-11D0-9E69-00C04FD7C15B}']
3263
    // function to set the mode (bob, weave etc)
3264
    function SetDeinterlaceMode(mode: TAMVP_Mode): HResult; stdcall;
3265
    // function to get the mode (bob, weave etc)
3266
    function GetDeinterlaceMode(var pMode: TAMVP_Mode): HResult; stdcall;
3267
    // this function sets the overlay surface that the mixer is supposed to use.
3268
    function SetOverlaySurface(pOverlaySurface: IDirectDrawSurface): HResult; stdcall;
3269
    // this function gets the overlay surface that the mixer is using
3270
    function GetOverlaySurface(out ppOverlaySurface: IDirectDrawSurface): HResult; stdcall;
3271
    // this functions sets the color-controls, if the chip supports it.
3272
    function SetColorControls(const pColorControl: DDCOLORCONTROL): HResult; stdcall;
3273
    // this functions also returns the capability of the hardware in the dwFlags
3274
    // value of the struct.
3275
    function GetColorControls(var pColorControl: DDCOLORCONTROL): HResult; stdcall;
3276
  end;
3277
 
3278
// interface IVPVBINotify
3279
  IVPVBINotify = interface(IVPBaseNotify)
3280
    ['{EC529B01-1A1F-11D1-BAD9-00609744111A}']
3281
  end;
3282
 
3283
(*==========================================================================;
3284
 *
3285
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3286
 *
3287
 *  File:       mpegtype.h
3288
 *
3289
 ***************************************************************************)
3290
 
3291
const
3292
  IID_IMpegAudioDecoder: TGUID = (D1:$B45DD570;D2:$3C77;D3:$11D1;D4:($AB,$E1,$00,$A0,$C9,$05,$F3,$75));
3293
 
3294
type
3295
//
3296
//  AM_MPEGSYSTEMTYPE defines the format block contents for
3297
//  data of type MEDIATYPE_MPEG1System when the format
3298
//  block GUID is FORMAT_MPEG1System
3299
//
3300
//  The format block consists of elements of type
3301
//  AM_MPEGSYSTEMTYPE up to the length of the format block
3302
//  Each format block is 8-byte aligned from the start of
3303
//  the format block
3304
//
3305
 
3306
  TAM_MPEGSreamType = record
3307
    dwStreamId: DWORD;               // Stream id of stream to process
3308
    dwReserved: DWORD;               // 8-byte alignment
3309
    mt: TAM_Media_Type;              // Type for substream - pbFormat is NULL
3310
    bFormat: array[0..0] of Byte;    // Format data
3311
  end;
3312
 
3313
  TAM_MPEGSystemType = record
3314
    dwBitRate: DWORD;                // Bits per second
3315
    cStreams: DWORD;                 // Number of streams
3316
    Streams: array[0..0] of TAM_MPEGSreamType;
3317
  end;
3318
{
3319
//
3320
//  Helper macros for AM_MPEGSTREAMTYPE
3321
//
3322
#define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType)  \
3323
    FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat])
3324
#define AM_MPEGSTREAMTYPE_NEXT(pStreamType)           \
3325
    ((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) +     \
3326
     ((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7)))
3327
 }
3328
//
3329
// IMpegAudioDecoder
3330
//
3331
 
3332
// Values for DualMode
3333
const
3334
  AM_MPEG_AUDIO_DUAL_MERGE = 0;
3335
  AM_MPEG_AUDIO_DUAL_LEFT  = 1;
3336
  AM_MPEG_AUDIO_DUAL_RIGHT = 2;
3337
 
3338
type
3339
//
3340
//
3341
// Microsoft MPEG audio WAV definition
3342
//
3343
(*  MPEG-1 audio wave format (audio layer only).   (0x0050)   *)
3344
 
3345
  TMPEG1WaveFormat = record
3346
    wfx: TWaveFormatEx;
3347
    fwHeadLayer: Word;
3348
    dwHeadBitrate: DWORD;
3349
    fwHeadMode: Word;
3350
    fwHeadModeExt: Word;
3351
    wHeadEmphasis: Word;
3352
    fwHeadFlags: Word;
3353
    dwPTSLow: DWORD;
3354
    dwPTSHigh: DWORD;
3355
  end;
3356
 
3357
const
3358
  ACM_MPEG_LAYER1         = $0001;
3359
  ACM_MPEG_LAYER2         = $0002;
3360
  ACM_MPEG_LAYER3         = $0004;
3361
  ACM_MPEG_STEREO         = $0001;
3362
  ACM_MPEG_JOINTSTEREO    = $0002;
3363
  ACM_MPEG_DUALCHANNEL    = $0004;
3364
  ACM_MPEG_SINGLECHANNEL  = $0008;
3365
  ACM_MPEG_PRIVATEBIT     = $0001;
3366
  ACM_MPEG_COPYRIGHT      = $0002;
3367
  ACM_MPEG_ORIGINALHOME   = $0004;
3368
  ACM_MPEG_PROTECTIONBIT  = $0008;
3369
  ACM_MPEG_ID_MPEG1       = $0010;
3370
 
3371
type
3372
  IMpegAudioDecoder = interface(IUnknown)
3373
    ['{B45DD570-3C77-11D1-ABE1-00A0C905F375}']
3374
    function get_FrequencyDivider(var pDivider: Longint): HResult; stdcall;
3375
    function put_FrequencyDivider(Divider: Longint): HResult; stdcall;
3376
    function get_DecoderAccuracy(var pAccuracy: Longint): HResult; stdcall;
3377
    function put_DecoderAccuracy(Accuracy: Longint): HResult; stdcall;
3378
    function get_Stereo(var pStereo: Longint): HResult; stdcall;
3379
    function put_Stereo(Stereo: Longint): HResult; stdcall;
3380
    function get_DecoderWordSize(var pWordSize: Longint): HResult; stdcall;
3381
    function put_DecoderWordSize(WordSize: Longint): HResult; stdcall;
3382
    function get_IntegerDecode(var pIntDecode: Longint): HResult; stdcall;
3383
    function put_IntegerDecode(IntDecode: Longint): HResult; stdcall;
3384
    function get_DualMode(var pIntDecode: Longint): HResult; stdcall;
3385
    function put_DualMode(IntDecode: Longint): HResult; stdcall;
3386
    function get_AudioFormat(var lpFmt: TMPEG1WaveFormat): HResult; stdcall;
3387
  end;
3388
 
3389
(*==========================================================================;
3390
 *
3391
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3392
 *
3393
 *  File:       il21dec.h
3394
 *
3395
 ***************************************************************************)
3396
// Line 21 Decoder related definitions and interfaces for ActiveMovie
3397
 
3398
const
3399
  IID_IAMLine21Decoder: TGUID = (D1:$6E8D4A21;D2:$310C;D3:$11D0;D4:($B7,$9A,$00,$AA,$00,$37,$67,$A7));
3400
 
3401
type
3402
//
3403
//  Some enum data types used as line 21 decoder params by the interface
3404
//
3405
  TAM_Line21_CCLevel = (       // should we use TC1, TC2 in stead?
3406
    AM_L21_CCLEVEL_TC2
3407
  );
3408
 
3409
  TAM_Line21_CCService = (
3410
    AM_L21_CCSERVICE_None,
3411
    AM_L21_CCSERVICE_Caption1,
3412
    AM_L21_CCSERVICE_Caption2,
3413
    AM_L21_CCSERVICE_Text1,
3414
    AM_L21_CCSERVICE_Text2,
3415
    AM_L21_CCSERVICE_XDS,
3416
    AM_L21_CCSERVICE_INVALID_6,
3417
    AM_L21_CCSERVICE_INVALID_7,
3418
    AM_L21_CCSERVICE_INVALID_8,
3419
    AM_L21_CCSERVICE_INVALID_9,
3420
    AM_L21_CCSERVICE_DefChannel,
3421
    AM_L21_CCSERVICE_Invalid
3422
  );
3423
 
3424
  TAM_Line21_CCState = (
3425
    AM_L21_CCSTATE_Off,
3426
    AM_L21_CCSTATE_On
3427
  );
3428
 
3429
  TAM_Line21_CCStyle = (
3430
    AM_L21_CCSTYLE_None,
3431
    AM_L21_CCSTYLE_PopOn,
3432
    AM_L21_CCSTYLE_PaintOn,
3433
    AM_L21_CCSTYLE_RollUp
3434
  );
3435
 
3436
  TAM_Line21_DrawBGMode = (
3437
    AM_L21_DRAWBGMODE_Opaque,
3438
    AM_L21_DRAWBGMODE_Transparent
3439
  );
3440
 
3441
//
3442
//  Line 21 Decoder standard COM interface
3443
//
3444
  IAMLine21Decoder = interface(IUnknown)
3445
    ['{6E8D4A21-310C-11D0-B79A-00AA003767A7}']
3446
    //
3447
    // Decoder options to be used by apps
3448
    //
3449
 
3450
    // What is the decoder's level
3451
    function GetDecoderLevel(var lpLevel: TAM_Line21_CCLevel): HResult; stdcall;
3452
    // supported level value is AM_L21Level_TC2 only
3453
    // skipping the SetDecoderLevel( )
3454
 
3455
    // Which of the services is being currently used
3456
    function GetCurrentService(var lpService: TAM_Line21_CCService): HResult; stdcall;
3457
    function SetCurrentService(Service: TAM_Line21_CCService): HResult; stdcall;
3458
    // supported service values are AM_L21Service_Caption1,
3459
    // AM_L21Service_Caption2, AM_L21Service_Text1, AM_L21Service_Text2,
3460
    // AM_L21Service_XDS, AM_L21Service_None)
3461
 
3462
    // Query/Set the service state (On/Off)
3463
    // supported state values are AM_L21State_On and AM_L21State_Off
3464
    function GetServiceState(var lpState: TAM_Line21_CCState): HResult; stdcall;
3465
    function SetServiceState(State: TAM_Line21_CCState): HResult; stdcall;
3466
 
3467
    //
3468
    // Output options to be used by downstream filters
3469
    //
3470
 
3471
    // What size, bitdepth etc should the output video be
3472
    function GetOutputFormat(var lpbmih: TBitmapInfoHeader): HResult; stdcall;
3473
    // GetOutputFormat() method, if successful, returns
3474
    // 1.  S_FALSE if no output format has so far been defined by downstream filters
3475
    // 2.  S_OK if an output format has already been defined by downstream filters
3476
    function SetOutputFormat(const lpbmih: TBitmapInfoHeader): HResult; stdcall;
3477
 
3478
    // Specify physical color to be used in colorkeying the background
3479
    // for overlay mixing
3480
    function GetBackgroundColor(var pdwPhysColor: DWORD): HResult; stdcall;
3481
    function SetBackgroundColor(dwPhysColor: DWORD): HResult; stdcall;
3482
 
3483
    // Specify if whole output bitmap should be redrawn for each sample
3484
    function GetRedrawAlways(var lpbOption: BOOL): HResult; stdcall;
3485
    function SetRedrawAlways(bOption: BOOL): HResult; stdcall;
3486
 
3487
    // Specify if the caption text background should be opaque/transparent
3488
    function GetDrawBackgroundMode(var lpMode: TAM_Line21_DrawBGMode): HResult; stdcall;
3489
    function SetDrawBackgroundMode(Mode: TAM_Line21_DrawBGMode): HResult; stdcall;
3490
    // supported mode values are AM_L21_DrawBGMode_Opaque and
3491
    // AM_L21_DrawBGMode_Transparent
3492
  end;
3493
 
3494
(*==========================================================================;
3495
 *
3496
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3497
 *
3498
 *  File:       dvdevcod.h
3499
 *
3500
 ***************************************************************************)
3501
// list of standard DVD-Video event codes and the expected params
3502
 
3503
const
3504
  EC_DVDBASE                                                    = $0100;
3505
 
3506
type
3507
  TDVD_Error = (
3508
    DVD_ERROR_INVALID_0,
3509
    DVD_ERROR_Unexpected,           // Something unexpected happened, perhaps content
3510
                                    //   is incorrectly authored.  Playback is stopped.
3511
    DVD_ERROR_CopyProtectFail,      // Key exchange for DVD copy protection failed.
3512
                                    //   Playback is stopped.
3513
    DVD_ERROR_InvalidDVD1_0Disc,    // DVD-Video disc is incorrectly authored for v1.0
3514
                                    //   of spec. Playback is stopped.
3515
    DVD_ERROR_InvalidDiscRegion,    // The Disc is not approved for playback by decoders
3516
                                    //   from this DVD region.
3517
    DVD_ERROR_LowParentalLevel      // Player parental level is lower than the lowest parental
3518
                                    //   level available in the DVD content. Playback is stopped.
3519
  );
3520
 
3521
  TDVD_Warning = (
3522
    DVD_WARNING_INVALID_0,
3523
    DVD_WARNING_InvalidDVD1_0Disc,   // DVD-Video disc is incorrectly authored. Playback
3524
                                     //   can continue, but unexpected behavior may occur.
3525
    DVD_WARNING_FormatNotSupported   // A decoder would not support the current format.  Playback
3526
                                     //   of a stream (audio, video of SP) may not function.
3527
  );
3528
 
3529
const
3530
 
3531
// DVD-Video event codes
3532
// ======================
3533
//
3534
// All DVD-Video event are always passed on to the application, and are
3535
// never processed by the filter graph
3536
 
3537
 
3538
  EC_DVD_DOMAIN_CHANGE                    = (EC_DVDBASE + $01);
3539
// Parameters: ( DWORD, void )
3540
// lParam1 is enum DVD_DOMAIN, and indicates the player's new domain
3541
//
3542
// Raised from following domains: all
3543
//
3544
// Signaled when ever the DVD player changes domains.
3545
 
3546
 
3547
  EC_DVD_TITLE_CHANGE                     = (EC_DVDBASE + $02);
3548
// Parameters: ( DWORD, void )
3549
// lParam1 is the new title number.
3550
//
3551
// Raised from following domains: DVD_DOMAIN_Title
3552
//
3553
// Indicates when the current title number changes.  Title numbers
3554
// range 1 to 99.  This indicates the TTN, which is the title number
3555
// with respect to the whole disc, not the VTS_TTN which is the title
3556
// number with respect to just a current VTS.
3557
 
3558
 
3559
  EC_DVD_CHAPTER_START                   = (EC_DVDBASE + $03);
3560
// Parameters: ( DWORD, void )
3561
// lParam1 is the new chapter number (which is the program number for
3562
// One_Sequential_PGC_Titles).
3563
//
3564
// Raised from following domains: DVD_DOMAIN_Title
3565
//
3566
// Signales that DVD player started playback of a new program in the Title
3567
// domain.  This is only signaled for One_Sequential_PGC_Titles.
3568
 
3569
 
3570
  EC_DVD_AUDIO_STREAM_CHANGE              = (EC_DVDBASE + $04);
3571
// Parameters: ( DWORD, void )
3572
// lParam1 is the new user audio stream number.
3573
//
3574
// Raised from following domains: all
3575
//
3576
// Signaled when ever the current user audio stream number changes for the main
3577
// title.  This can be changed automatically with a navigation command on disc
3578
// as well as through IDVDAnnexJ.
3579
// Audio stream numbers range from 0 to 7.  Stream $ffffffff
3580
// indicates that no stream is selected.
3581
 
3582
  EC_DVD_SUBPICTURE_STREAM_CHANGE         = (EC_DVDBASE + $05);
3583
// Parameters: ( DWORD, void )
3584
// lParam1 is the new user subpicture stream number.
3585
//
3586
// Raised from following domains: all
3587
//
3588
// Signaled when ever the current user subpicture stream number changes for the main
3589
// title.  This can be changed automatically with a navigation command on disc
3590
// as well as through IDVDAnnexJ.
3591
// Subpicture stream numbers range from 0 to 31.  Stream $ffffffff
3592
// indicates that no stream is selected.
3593
 
3594
  EC_DVD_ANGLE_CHANGE                     = (EC_DVDBASE + $06);
3595
// Parameters: ( DWORD, DWORD )
3596
// lParam1 is the number of available angles.
3597
// lParam2 is the current user angle number.
3598
//
3599
// Raised from following domains: all
3600
//
3601
// Signaled when ever either
3602
//   a) the number of available angles changes, or
3603
//   b) the current user angle number changes.
3604
// Current angle number can be changed automatically with navigation command
3605
// on disc as well as through IDVDAnnexJ.
3606
// When the number of available angles is 1, the current video is not multiangle.
3607
// Angle numbers range from 1 to 9.
3608
 
3609
 
3610
  EC_DVD_BUTTON_CHANGE                    = (EC_DVDBASE + $07);
3611
// Parameters: ( DWORD, DWORD )
3612
// lParam1 is the number of available buttons.
3613
// lParam2 is the current selected button number.
3614
//
3615
// Raised from following domains: all
3616
//
3617
// Signaled when ever either
3618
//   a) the number of available buttons changes, or
3619
//   b) the current selected button number changes.
3620
// The current selected button can be changed automatically with navigation
3621
// commands on disc as well as through IDVDAnnexJ.
3622
// Button numbers range from 1 to 36.  Selected button number 0 implies that
3623
// no button is selected.  Note that these button numbers enumerate all
3624
// available button numbers, and do not always correspond to button numbers
3625
// used for IDVDAnnexJ::ButtonSelectAndActivate since only a subset of buttons
3626
// may be activated with ButtonSelectAndActivate.
3627
 
3628
 
3629
  EC_DVD_VALID_UOPS_CHANGE                = (EC_DVDBASE + $08);
3630
// Parameters: ( DWORD, void )
3631
// lParam1 is a VALID_UOP_SOMTHING_OR_OTHER bit-field stuct which indicates
3632
//   which IDVDAnnexJ commands are explicitly disable by the DVD disc.
3633
//
3634
// Raised from following domains: all
3635
//
3636
// Signaled when ever the available set of IDVDAnnexJ methods changes.  This
3637
// only indicates which operations are explicited disabled by the content on
3638
// the DVD disc, and does not guarentee that it is valid to call methods
3639
// which are not disabled.  For example, if no buttons are currently present,
3640
// IDVDAnnexJ::ButtonActivate() won't work, even though the buttons are not
3641
// explicitly disabled.
3642
 
3643
 
3644
  EC_DVD_STILL_ON                         = (EC_DVDBASE + $09);
3645
// Parameters: ( BOOL, DWORD )
3646
// lParam1 == 0  -->  buttons are available, so StillOff won't work
3647
// lParam1 == 1  -->  no buttons available, so StillOff will work
3648
// lParam2 indicates the number of seconds the still will last, with $ffffffff
3649
//   indicating an infinite still (wait till button or StillOff selected).
3650
//
3651
// Raised from following domains: all
3652
//
3653
// Signaled at the beginning of any still: PGC still, Cell Still, or VOBU Still.
3654
// Note that all combinations of buttons and still are possible (buttons on with
3655
// still on, buttons on with still off, button off with still on, button off
3656
// with still off).
3657
 
3658
  EC_DVD_STILL_OFF                         = (EC_DVDBASE + $0a);
3659
// Parameters: ( void, void )
3660
//
3661
//   Indicating that any still that is currently active
3662
//   has been released.
3663
//
3664
// Raised from following domains: all
3665
//
3666
// Signaled at the end of any still: PGC still, Cell Still, or VOBU Still.
3667
//
3668
 
3669
  EC_DVD_CURRENT_TIME                     = (EC_DVDBASE + $0b);
3670
// Parameters: ( DWORD, BOOL )
3671
// lParam1 is a DVD_TIMECODE which indicates the current
3672
//   playback time code in a BCD HH:MM:SS:FF format.
3673
// lParam2 == 0  -->  time code is 25 frames/sec
3674
// lParam2 == 1  -->  time code is 30 frames/sec (non-drop).
3675
//
3676
// Raised from following domains: DVD_DOMAIN_Title
3677
//
3678
// Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec.
3679
// This is only signaled for One_Sequential_PGC_Titles.
3680
 
3681
 
3682
  EC_DVD_ERROR                            = (EC_DVDBASE + $0c);
3683
// Parameters: ( DWORD, void)
3684
// lParam1 is an enum DVD_ERROR which notifies the app of some error condition.
3685
//
3686
// Raised from following domains: all
3687
//
3688
 
3689
  EC_DVD_WARNING                           = (EC_DVDBASE + $0d);
3690
// Parameters: ( DWORD, void)
3691
// lParam1 is an enum DVD_WARNING which notifies the app of some warning condition.
3692
//
3693
// Raised from following domains: all
3694
//
3695
 
3696
  EC_DVD_CHAPTER_AUTOSTOP                  = (EC_DVDBASE + $0e);
3697
// Parameters: (void, void)
3698
//
3699
//  Indicating that playback is stopped as a result of a call
3700
//  to IDVDControl::ChapterPlayAutoStop()
3701
//
3702
// Raised from following domains : DVD_DOMAIN_TITLE
3703
//
3704
 
3705
  EC_DVD_NO_FP_PGC                         = (EC_DVDBASE + $0f);
3706
//  Parameters : (void, void)
3707
//
3708
//  Raised from the following domains : FP_DOM
3709
//
3710
//  Indicates that the DVD disc does not have a FP_PGC (First Play Program Chain)
3711
//  and the DVD Navigator will not automatically load any PGC and start playback.
3712
//
3713
 
3714
(*==========================================================================;
3715
 *
3716
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
3717
 *
3718
 *  File:       dvdmedia.h
3719
 *
3720
 ***************************************************************************)
3721
 
3722
type
3723
// -----------------------------------------------------------------------
3724
// AC-3 definition for the AM_KSPROPSETID_AC3 property set
3725
// -----------------------------------------------------------------------
3726
  TAM_Property_AC3 = (
3727
    AM_PROPERTY_AC3_INVALID_0,
3728
    AM_PROPERTY_AC3_ERROR_CONCEALMENT,
3729
    AM_PROPERTY_AC3_ALTERNATE_AUDIO,
3730
    AM_PROPERTY_AC3_DOWNMIX,
3731
    AM_PROPERTY_AC3_BIT_STREAM_MODE,
3732
    AM_PROPERTY_AC3_DIALOGUE_LEVEL,
3733
    AM_PROPERTY_AC3_LANGUAGE_CODE,
3734
    AM_PROPERTY_AC3_ROOM_TYPE
3735
  );
3736
 
3737
  TAM_AC3_Error_Concelment = record
3738
    fRepeatPreviousBlock: BOOL;
3739
    fErrorInCurrentBlock: BOOL;
3740
  end;
3741
 
3742
  TAM_AC3_Alteranate_Audio = record
3743
    fStereo: BOOL;
3744
    DualMode: Longint;
3745
  end;
3746
 
3747
const
3748
  AM_AC3_ALTERNATE_AUDIO_1     = 1;
3749
  AM_AC3_ALTERNATE_AUDIO_2     = 2;
3750
  AM_AC3_ALTERNATE_AUDIO_BOTH   = 3;
3751
 
3752
type
3753
  TAM_AC3_DownMix = record
3754
    fDownMix: BOOL;
3755
    fDolbySurround: BOOL;
3756
  end;
3757
 
3758
  TAM_AC3_BitStream_Mode = record
3759
    BitStreamMode: Longint;
3760
  end;
3761
 
3762
const
3763
  AM_AC3_SERVICE_MAIN_AUDIO            = 0;
3764
  AM_AC3_SERVICE_NO_DIALOG             = 1;
3765
  AM_AC3_SERVICE_VISUALLY_IMPAIRED     = 2;
3766
  AM_AC3_SERVICE_HEARING_IMPAIRED      = 3;
3767
  AM_AC3_SERVICE_DIALOG_ONLY           = 4;
3768
  AM_AC3_SERVICE_COMMENTARY            = 5;
3769
  AM_AC3_SERVICE_EMERGENCY_FLASH       = 6;
3770
  AM_AC3_SERVICE_VOICE_OVER            = 7;
3771
 
3772
type
3773
  TAM_AC3_Dialogue_Level = record
3774
    DialogueLevel: Longint;
3775
  end;
3776
 
3777
  TAM_AC3_RoomType = record
3778
    fLargeRoom: BOOL;
3779
  end;
3780
 
3781
// -----------------------------------------------------------------------
3782
// subpicture definition for the AM_KSPROPSETID_DvdSubPic property set
3783
// -----------------------------------------------------------------------
3784
 
3785
  TAM_Property_DVDSubpic = (
3786
    AM_PROPERTY_DVDSUBPIC_PALETTE,
3787
    AM_PROPERTY_DVDSUBPIC_HLI,
3788
    AM_PROPERTY_DVDSUBPIC_COMPOSIT_ON   // TRUE for subpicture is displayed
3789
  );
3790
 
3791
  TAM_DVD_YUV = record
3792
    Reserved: Byte;
3793
    Y: byte;
3794
    U: Byte;
3795
    V: Byte;
3796
  end;
3797
 
3798
  TAM_Property_SPPAL = record
3799
    sppal: array[0..15] of TAM_DVD_YUV;
3800
  end;
3801
 
3802
  TAMColCon = record
3803
    emph1col: Byte;
3804
    emph2col: Byte;
3805
    backcol: Byte;
3806
    patcol: Byte;
3807
    emph1con: Byte;
3808
    emph2con: Byte;
3809
    backcon: Byte;
3810
    patcon: Byte;
3811
  end;
3812
 
3813
  TAM_Property_SPHLI = record
3814
    HLISS: Word;      //
3815
    Reserved: Word;
3816
    StartPTM: Longint;   // start presentation time in x/90000
3817
    EndPTM: Longint;     // end PTM in x/90000
3818
    StartX: Word;
3819
    StartY: Word;
3820
    StopX: Word;
3821
    StopY: Word;
3822
    ColCon: TAMColCon;     // color contrast description (4 bytes as given in HLI)
3823
  end;
3824
 
3825
  AM_PROPERTY_COMPOSIT_ON = BOOL;
3826
 
3827
// -----------------------------------------------------------------------
3828
// copy protection definitions
3829
// -----------------------------------------------------------------------
3830
 
3831
// AM_UseNewCSSKey for the dwTypeSpecificFlags in IMediaSample2 to indicate
3832
// the exact point in a stream after which to start applying a new CSS key.
3833
// This is typically sent on an empty media sample just before attempting
3834
// to renegotiate a CSS key.
3835
const
3836
  AM_UseNewCSSKey    = $1;
3837
 
3838
//
3839
// AM_KSPROPSETID_CopyProt property set definitions
3840
//
3841
type
3842
  TAM_Property_DVDCopyProt = (
3843
    AM_PROPERTY_DVDCOPY_INVALID_0,
3844
    AM_PROPERTY_DVDCOPY_CHLG_KEY,
3845
    AM_PROPERTY_DVDCOPY_DVD_KEY1,
3846
    AM_PROPERTY_DVDCOPY_DEC_KEY2,
3847
    AM_PROPERTY_DVDCOPY_TITLE_KEY,
3848
    AM_PROPERTY_COPY_MACROVISION,
3849
    AM_PROPERTY_DVDCOPY_REGION,
3850
    AM_PROPERTY_DVDCOPY_SET_COPY_STATE,
3851
    AM_PROPERTY_DVDCOPY_INVALID_8,
3852
    AM_PROPERTY_DVDCOPY_INVALID_9,
3853
    AM_PROPERTY_DVDCOPY_INVALID_10,
3854
    AM_PROPERTY_DVDCOPY_INVALID_11,
3855
    AM_PROPERTY_DVDCOPY_INVALID_12,
3856
    AM_PROPERTY_DVDCOPY_INVALID_13,
3857
    AM_PROPERTY_DVDCOPY_INVALID_14,
3858
    AM_PROPERTY_DVDCOPY_INVALID_15,
3859
    AM_PROPERTY_DVDCOPY_INVALID_16,
3860
    AM_PROPERTY_DVDCOPY_INVALID_17,
3861
    AM_PROPERTY_DVDCOPY_INVALID_18,
3862
    AM_PROPERTY_DVDCOPY_INVALID_19,
3863
    AM_PROPERTY_DVDCOPY_INVALID_20,
3864
    AM_PROPERTY_DVDCOPY_INVALID_21,
3865
    AM_PROPERTY_DVDCOPY_INVALID_22,
3866
    AM_PROPERTY_DVDCOPY_INVALID_23,
3867
    AM_PROPERTY_DVDCOPY_INVALID_24,
3868
    AM_PROPERTY_DVDCOPY_INVALID_25,
3869
    AM_PROPERTY_DVDCOPY_INVALID_26,
3870
    AM_PROPERTY_DVDCOPY_INVALID_27,
3871
    AM_PROPERTY_DVDCOPY_INVALID_28,
3872
    AM_PROPERTY_DVDCOPY_INVALID_29,
3873
    AM_PROPERTY_DVDCOPY_INVALID_30,
3874
    AM_PROPERTY_DVDCOPY_INVALID_31,
3875
    AM_PROPERTY_DVDCOPY_INVALID_32,
3876
    AM_PROPERTY_DVDCOPY_INVALID_33,
3877
    AM_PROPERTY_DVDCOPY_INVALID_34,
3878
    AM_PROPERTY_DVDCOPY_INVALID_35,
3879
    AM_PROPERTY_DVDCOPY_INVALID_36,
3880
    AM_PROPERTY_DVDCOPY_INVALID_37,
3881
    AM_PROPERTY_DVDCOPY_INVALID_38,
3882
    AM_PROPERTY_DVDCOPY_INVALID_39,
3883
    AM_PROPERTY_DVDCOPY_INVALID_40,
3884
    AM_PROPERTY_DVDCOPY_INVALID_41,
3885
    AM_PROPERTY_DVDCOPY_INVALID_42,
3886
    AM_PROPERTY_DVDCOPY_INVALID_43,
3887
    AM_PROPERTY_DVDCOPY_INVALID_44,
3888
    AM_PROPERTY_DVDCOPY_INVALID_45,
3889
    AM_PROPERTY_DVDCOPY_INVALID_46,
3890
    AM_PROPERTY_DVDCOPY_INVALID_47,
3891
    AM_PROPERTY_DVDCOPY_INVALID_48,
3892
    AM_PROPERTY_DVDCOPY_INVALID_49,
3893
    AM_PROPERTY_DVDCOPY_INVALID_50,
3894
    AM_PROPERTY_DVDCOPY_INVALID_51,
3895
    AM_PROPERTY_DVDCOPY_INVALID_52,
3896
    AM_PROPERTY_DVDCOPY_INVALID_53,
3897
    AM_PROPERTY_DVDCOPY_INVALID_54,
3898
    AM_PROPERTY_DVDCOPY_INVALID_55,
3899
    AM_PROPERTY_DVDCOPY_INVALID_56,
3900
    AM_PROPERTY_DVDCOPY_INVALID_57,
3901
    AM_PROPERTY_DVDCOPY_INVALID_58,
3902
    AM_PROPERTY_DVDCOPY_INVALID_59,
3903
    AM_PROPERTY_DVDCOPY_INVALID_60,
3904
    AM_PROPERTY_DVDCOPY_INVALID_61,
3905
    AM_PROPERTY_DVDCOPY_INVALID_62,
3906
    AM_PROPERTY_DVDCOPY_INVALID_63,
3907
    AM_PROPERTY_DVDCOPY_INVALID_64,
3908
    AM_PROPERTY_DVDCOPY_INVALID_65,
3909
    AM_PROPERTY_DVDCOPY_INVALID_66,
3910
    AM_PROPERTY_DVDCOPY_INVALID_67,
3911
    AM_PROPERTY_DVDCOPY_INVALID_68,
3912
    AM_PROPERTY_DVDCOPY_INVALID_69,
3913
    AM_PROPERTY_DVDCOPY_INVALID_70,
3914
    AM_PROPERTY_DVDCOPY_INVALID_71,
3915
    AM_PROPERTY_DVDCOPY_INVALID_72,
3916
    AM_PROPERTY_DVDCOPY_INVALID_73,
3917
    AM_PROPERTY_DVDCOPY_INVALID_74,
3918
    AM_PROPERTY_DVDCOPY_INVALID_75,
3919
    AM_PROPERTY_DVDCOPY_INVALID_76,
3920
    AM_PROPERTY_DVDCOPY_INVALID_77,
3921
    AM_PROPERTY_DVDCOPY_INVALID_78,
3922
    AM_PROPERTY_DVDCOPY_INVALID_79,
3923
    AM_PROPERTY_DVDCOPY_INVALID_80,
3924
    AM_PROPERTY_DVDCOPY_INVALID_81,
3925
    AM_PROPERTY_DVDCOPY_INVALID_82,
3926
    AM_PROPERTY_DVDCOPY_INVALID_83,
3927
    AM_PROPERTY_DVDCOPY_INVALID_84,
3928
    AM_PROPERTY_DVDCOPY_INVALID_85,
3929
    AM_PROPERTY_DVDCOPY_INVALID_86,
3930
    AM_PROPERTY_DVDCOPY_INVALID_87,
3931
    AM_PROPERTY_DVDCOPY_INVALID_88,
3932
    AM_PROPERTY_DVDCOPY_INVALID_89,
3933
    AM_PROPERTY_DVDCOPY_INVALID_90,
3934
    AM_PROPERTY_DVDCOPY_INVALID_91,
3935
    AM_PROPERTY_DVDCOPY_INVALID_92,
3936
    AM_PROPERTY_DVDCOPY_INVALID_93,
3937
    AM_PROPERTY_DVDCOPY_INVALID_94,
3938
    AM_PROPERTY_DVDCOPY_INVALID_95,
3939
    AM_PROPERTY_DVDCOPY_INVALID_96,
3940
    AM_PROPERTY_DVDCOPY_INVALID_97,
3941
    AM_PROPERTY_DVDCOPY_INVALID_98,
3942
    AM_PROPERTY_DVDCOPY_INVALID_99,
3943
    AM_PROPERTY_DVDCOPY_INVALID_100,
3944
    AM_PROPERTY_DVDCOPY_INVALID_101,
3945
    AM_PROPERTY_DVDCOPY_INVALID_102,
3946
    AM_PROPERTY_DVDCOPY_INVALID_103,
3947
    AM_PROPERTY_DVDCOPY_INVALID_104,
3948
    AM_PROPERTY_DVDCOPY_INVALID_105,
3949
    AM_PROPERTY_DVDCOPY_INVALID_106,
3950
    AM_PROPERTY_DVDCOPY_INVALID_107,
3951
    AM_PROPERTY_DVDCOPY_INVALID_108,
3952
    AM_PROPERTY_DVDCOPY_INVALID_109,
3953
    AM_PROPERTY_DVDCOPY_INVALID_110,
3954
    AM_PROPERTY_DVDCOPY_INVALID_111,
3955
    AM_PROPERTY_DVDCOPY_INVALID_112,
3956
    AM_PROPERTY_DVDCOPY_INVALID_113,
3957
    AM_PROPERTY_DVDCOPY_INVALID_114,
3958
    AM_PROPERTY_DVDCOPY_INVALID_115,
3959
    AM_PROPERTY_DVDCOPY_INVALID_116,
3960
    AM_PROPERTY_DVDCOPY_INVALID_117,
3961
    AM_PROPERTY_DVDCOPY_INVALID_118,
3962
    AM_PROPERTY_DVDCOPY_INVALID_119,
3963
    AM_PROPERTY_DVDCOPY_INVALID_120,
3964
    AM_PROPERTY_DVDCOPY_INVALID_121,
3965
    AM_PROPERTY_DVDCOPY_INVALID_122,
3966
    AM_PROPERTY_DVDCOPY_INVALID_123,
3967
    AM_PROPERTY_DVDCOPY_INVALID_124,
3968
    AM_PROPERTY_DVDCOPY_INVALID_125,
3969
    AM_PROPERTY_DVDCOPY_INVALID_126,
3970
    AM_PROPERTY_DVDCOPY_INVALID_127,
3971
    AM_PROPERTY_DVDCOPY_DISC_KEY);
3972
 
3973
  TAM_DVDCopy_ChlgKey = record
3974
    ChlgKey: array[0..9] of Byte;
3975
    Reserved: array[0..1] of Byte;
3976
  end;
3977
 
3978
  TAM_DVDCopy_BusKey = record
3979
    BusKey: array[0..4] of Byte;
3980
    Reserved: array[0..0] of Byte;
3981
  end;
3982
 
3983
  TAM_DVDCopy_DiscKey = record
3984
    DiscKey: array[0..2047] of Byte;
3985
  end;
3986
 
3987
  TAM_DVDCopy_TitleKey = record
3988
    KeyFlags: Longint;
3989
    Reserved1: array[0..1] of Longint;
3990
    TitleKey: array[0..5] of Byte;
3991
    Reserved2: array[0..1] of Byte;
3992
  end;
3993
 
3994
  TAM_Copy_MacroVision = record
3995
    MACROVISIONLevel: Longint;
3996
  end;
3997
 
3998
  TAM_DVDCopy_Set_Copy_State = record
3999
    DVDCopyState: Longint;
4000
  end;
4001
 
4002
  TAM_DVDCopyState = (
4003
    AM_DVDCOPYSTATE_INITIALIZE,
4004
    AM_DVDCOPYSTATE_INITIALIZE_TITLE,   // indicates we are starting a title
4005
                                                                            // key copy protection sequence
4006
    AM_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED,
4007
    AM_DVDCOPYSTATE_AUTHENTICATION_REQUIRED,
4008
    AM_DVDCOPYSTATE_DONE
4009
  );
4010
 
4011
  TAM_Copy_MacroVision_Level = (
4012
    AM_MACROVISION_DISABLED,
4013
    AM_MACROVISION_LEVEL1,
4014
    AM_MACROVISION_LEVEL2,
4015
    AM_MACROVISION_LEVEL3
4016
  );
4017
 
4018
// CSS region stucture
4019
  TDVD_Region = record
4020
    CopySystem: Byte;
4021
    RegionData: Byte;
4022
    SystemRegion: Byte;
4023
    Reserved: Byte;
4024
  end;
4025
 
4026
//
4027
// CGMS Copy Protection Flags
4028
//
4029
 
4030
const
4031
  AM_DVD_CGMS_RESERVED_MASK      = $00000078;
4032
 
4033
  AM_DVD_CGMS_COPY_PROTECT_MASK  = $00000018;
4034
  AM_DVD_CGMS_COPY_PERMITTED     = $00000000;
4035
  AM_DVD_CGMS_COPY_ONCE          = $00000010;
4036
  AM_DVD_CGMS_NO_COPY            = $00000018;
4037
 
4038
  AM_DVD_COPYRIGHT_MASK          = $00000040;
4039
  AM_DVD_NOT_COPYRIGHTED         = $00000000;
4040
  AM_DVD_COPYRIGHTED             = $00000040;
4041
 
4042
  AM_DVD_SECTOR_PROTECT_MASK     = $00000020;
4043
  AM_DVD_SECTOR_NOT_PROTECTED    = $00000000;
4044
  AM_DVD_SECTOR_PROTECTED        = $00000020;
4045
 
4046
 
4047
// -----------------------------------------------------------------------
4048
// video format blocks
4049
// -----------------------------------------------------------------------
4050
 
4051
type
4052
  TAM_MPEG2Level = (
4053
    AM_MPEG2Level_INVALID_0,
4054
    AM_MPEG2Level_Low,
4055
    AM_MPEG2Level_Main,
4056
    AM_MPEG2Level_High1440,
4057
    AM_MPEG2Level_High
4058
  );
4059
 
4060
  TAM_MPEG2Profile = (
4061
    AM_MPEG2Profile_0,
4062
    AM_MPEG2Profile_Simple,
4063
    AM_MPEG2Profile_Main,
4064
    AM_MPEG2Profile_SNRScalable,
4065
    AM_MPEG2Profile_SpatiallyScalable,
4066
    AM_MPEG2Profile_High
4067
  );
4068
 
4069
const
4070
  AMINTERLACE_IsInterlaced             = $00000001;  // if 0, other interlace bits are irrelevent
4071
  AMINTERLACE_1FieldPerSample          = $00000002;  // else 2 fields per media sample
4072
  AMINTERLACE_Field1First              = $00000004;  // else Field 2 is first;  top field in PAL is field 1, top field in NTSC is field 2?
4073
  AMINTERLACE_UNUSED                   = $00000008;  //
4074
  AMINTERLACE_FieldPatternMask         = $00000030;  // use this mask with AMINTERLACE_FieldPat*
4075
  AMINTERLACE_FieldPatField1Only       = $00000000;  // stream never contains a Field2
4076
  AMINTERLACE_FieldPatField2Only       = $00000010;  // stream never contains a Field1
4077
  AMINTERLACE_FieldPatBothRegular      = $00000020;  // There will be a Field2 for every Field1 (required for Weave?)
4078
  AMINTERLACE_FieldPatBothIrregular    = $00000030;  // Random pattern of Field1s and Field2s
4079
  AMINTERLACE_DisplayModeMask          = $000000c0;
4080
  AMINTERLACE_DisplayModeBobOnly       = $00000000;
4081
  AMINTERLACE_DisplayModeWeaveOnly     = $00000040;
4082
  AMINTERLACE_DisplayModeBobOrWeave    = $00000080;
4083
 
4084
  AMCOPYPROTECT_RestrictDuplication    = $00000001;  // duplication of this stream should be restricted
4085
 
4086
  AMMPEG2_DoPanScan            = $00000001;  //if set, the MPEG-2 video decoder should crop output image
4087
                                                //  based on pan-scan vectors in picture_display_extension
4088
                                                //  and change the picture aspect ratio accordingly.
4089
  AMMPEG2_DVDLine21Field1      = $00000002;  //if set, the MPEG-2 decoder must be able to produce an output
4090
                                                //  pin for DVD style closed caption data found in GOP layer of field 1
4091
  AMMPEG2_DVDLine21Field2      = $00000004;  //if set, the MPEG-2 decoder must be able to produce an output
4092
                                                //  pin for DVD style closed caption data found in GOP layer of field 2
4093
  AMMPEG2_SourceIsLetterboxed  = $00000008;  //if set, indicates that black bars have been encoded in the top
4094
                                                //  and bottom of the video.
4095
  AMMPEG2_FilmCameraMode       = $00000010;  //if set, indicates "film mode" used for 625/50 content.  If cleared,
4096
                                                //  indicates that "camera mode" was used.
4097
  AMMPEG2_LetterboxAnalogOut   = $00000020;  //if set and this stream is sent to an analog output, it should
4098
                        //  be letterboxed.  Streams sent to VGA should be letterboxed only by renderers.
4099
 
4100
type
4101
  TVideoInfoHeader2 = record
4102
    rcSource: TRect;
4103
    rcTarget: TRect;
4104
    dwBitRate: DWORD;
4105
    dwBitErrorRate: DWORD;
4106
    AvgTimePerFrame: TReference_Time;
4107
    dwInterlaceFlags: DWORD;         // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0
4108
    dwCopyProtectFlags: DWORD;       // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0
4109
    dwPictAspectRatioX: DWORD;       // X dimension of picture aspect ratio, e.g. 16 for 16x9 display
4110
    dwPictAspectRatioY: DWORD;       // Y dimension of picture aspect ratio, e.g.  9 for 16x9 display
4111
    dwReserved1: DWORD;              // must be 0; reject connection otherwise
4112
    dwReserved2: DWORD;              // must be 0; reject connection otherwise
4113
    bmiHeader: TBitmapInfoHeader;
4114
  end;
4115
 
4116
  TMPEG2VideoInfo = record
4117
     hdr: TVideoInfoHeader;
4118
     dwStartTimeCode: DWORD;                 //  ?? not used for DVD ??
4119
     cbSequenceHeader: DWORD;                // is 0 for DVD (no sequence header)
4120
     dwProfile: DWORD;                       // use enum MPEG2Profile
4121
     dwLevel: DWORD;                         // use enum MPEG2Level
4122
     dwFlags: DWORD;                         // use AMMPEG2_* defines.  Reject connection if undefined bits are not 0
4123
     dwSequenceHeader: array[0..0] of DWORD; // DWORD instead of Byte for alignment purposes
4124
                                               //   For MPEG-2, if a sequence_header is included, the sequence_extension
4125
                                               //   should also be included
4126
  end;
4127
{
4128
#define SIZE_MPEG2VIDEOINFO(pv) (FIELD_OFFSET(MPEG2VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
4129
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
4130
 }
4131
 
4132
//===================================================================================
4133
// flags for dwTypeSpecificFlags in AM_SAMPLE2_PROPERTIES which define type specific
4134
// data in IMediaSample2
4135
//===================================================================================
4136
 
4137
const
4138
  AM_VIDEO_FLAG_FIELD_MASK          = $0003;    // use this mask to check whether the sample is field1 or field2 or frame
4139
  AM_VIDEO_FLAG_INTERLEAVED_FRAME   = $0000;    // the sample is a frame (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
4140
  AM_VIDEO_FLAG_FIELD1              = $0001;    // the sample is field1 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
4141
  AM_VIDEO_FLAG_FIELD2              = $0002;    // the sample is the field2 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this)
4142
  AM_VIDEO_FLAG_FIELD1FIRST         = $0004;    // if set means display field1 first, else display field2 first.
4143
                                        // this bit is irrelavant for 1FieldPerSample mode
4144
  AM_VIDEO_FLAG_WEAVE               = $0008;    // if set use bob display mode else weave
4145
  AM_VIDEO_FLAG_IPB_MASK            = $0030;    // use this mask to check whether the sample is I, P or B
4146
  AM_VIDEO_FLAG_I_SAMPLE            = $0000;    // I Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
4147
  AM_VIDEO_FLAG_P_SAMPLE            = $0010;    // P Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
4148
  AM_VIDEO_FLAG_B_SAMPLE            = $0020;    // B Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this)
4149
  AM_VIDEO_FLAG_REPEAT_FIELD        = $0040;    // if set means display the field which has been displayed first again after displaying
4150
                                        // both fields first. This bit is irrelavant for 1FieldPerSample mode
4151
// -----------------------------------------------------------------------
4152
// AM_KSPROPSETID_TSRateChange property set definitions for time stamp
4153
// rate changes.
4154
// -----------------------------------------------------------------------
4155
type
4156
  TAM_Property_TS_Rate_Change = (
4157
    AM_RATE_INVALID_0,
4158
    AM_RATE_SimpleRateChange,   // rw, use AM_SimpleRateChange
4159
    AM_RATE_ExactRateChange,    // rw, use AM_ExactRateChange
4160
    AM_RATE_MaxFullDataRate,    // r, use AM_MaxFullDataRate
4161
    AM_RATE_Step                // w, use AM_Step
4162
  );
4163
 
4164
  TAM_SimpleRateChange = record
4165
    // this is the simplest mechinism to set a time stamp rate change on
4166
    // a filter (simplest for the person setting the rate change, harder
4167
    // for the filter doing the rate change).
4168
    StartTime: TReference_Time;    //stream time at which to start this rate
4169
    Rate: Longint;                //new rate * 10000 (decimal)
4170
  end;
4171
 
4172
  TAM_ExactRateChange = record
4173
    OutputZeroTime: TReference_Time;   //input TS that maps to zero output TS
4174
    Rate: Longint;                    //new rate * 10000 (decimal)
4175
  end;
4176
 
4177
  TAM_MaxFullDateRate = Longint;    //rate * 10000 (decimal)
4178
 
4179
  TAM_Step = DWORD;        // number of frame to step
4180
 
4181
(*==========================================================================;
4182
 *
4183
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4184
 *
4185
 *  File:       activecf.h
4186
 *
4187
 ***************************************************************************)
4188
 
4189
const
4190
  CFSTR_VFW_FILTERLIST = 'Video for Windows 4 Filters';
4191
 
4192
type
4193
  TVFW_FilterList = record
4194
    cFilters: UINT;                     // number of CLSIDs in aClsId
4195
    aClsId: array[0..0] of TGUID;       // ClsId of each filter
4196
  end;
4197
 
4198
(*==========================================================================;
4199
 *
4200
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4201
 *
4202
 *  File:       ddkernel.h
4203
 *
4204
 ***************************************************************************)
4205
 
4206
const
4207
  IID_IDirectDrawKernel: TGUID = (D1:$8D56C120;D2:$6A08;D3:$11D0;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
4208
  IID_IDirectDrawSurfaceKernel: TGUID = (D1:$60755DA0;D2:$6A40;D3:$11D0;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
4209
 
4210
type
4211
  DDKERNELCAPS = record
4212
    dwSize: DWORD;                // size of the DDKERNELCAPS structure
4213
    dwCaps: DWORD;                // indicates which fields contain data
4214
    dwIRQCaps: DWORD;             // max width of the video port field
4215
  end;
4216
 
4217
{ IDirectDrawKernel Interface }
4218
 
4219
  IDirectDrawKernel = interface(IUnknown)
4220
    ['{8D56C120-6A08-11D0-9B06-00A0C903A3B8}']
4221
    (*** IDirectDrawKernel methods ***)
4222
    function GetCaps(var lpDDKernelCaps: DDKERNELCAPS): HResult; stdcall;
4223
    function GetKernelHandle(var lpKernelHandle: DWORD): HResult; stdcall;
4224
    function ReleaseKernelHandle(KernelHandle: DWORD): HResult; stdcall;
4225
  end;
4226
 
4227
{ IDirectDrawSurfaceKernel Interface }
4228
 
4229
  IDirectDrawSurfaceKernel = interface(IUnknown)
4230
    ['{8D56C120-6A08-11D0-9B06-00A0C903A3B8}']
4231
    (*** IDirectDrawSurfaceKernel methods ***)
4232
    function GetKernelHandle(var lpKernelHandle: DWORD): HResult; stdcall;
4233
    function ReleaseKernelHandle(KernelHandle: DWORD): HResult; stdcall;
4234
  end;
4235
 
4236
const
4237
{ DDKERNELCAPS CAPS }
4238
 
4239
  DDKERNELCAPS_SKIPFIELDS       = $00000001;
4240
  DDKERNELCAPS_AUTOFLIP         = $00000002;
4241
  DDKERNELCAPS_SETSTATE         = $00000004;
4242
  DDKERNELCAPS_LOCK             = $00000008;
4243
  DDKERNELCAPS_FLIPVIDEOPORT    = $00000010;
4244
  DDKERNELCAPS_FLIPOVERLAY      = $00000020;
4245
  DDKERNELCAPS_TRANSFER_SYSMEM  = $00000040;
4246
  DDKERNELCAPS_TRANSFER_AGP     = $00000080;
4247
  DDKERNELCAPS_FIELDPOLARITY    = $00000100;
4248
 
4249
{ DDKERNELCAPS IRQ CAPS }
4250
 
4251
  DDIRQ_DISPLAY_VSYNC  = $00000001;
4252
  DDIRQ_RESERVED1      = $00000002;
4253
  DDIRQ_VPORT0_VSYNC   = $00000004;
4254
  DDIRQ_VPORT0_LINE    = $00000008;
4255
  DDIRQ_VPORT1_VSYNC   = $00000010;
4256
  DDIRQ_VPORT1_LINE    = $00000020;
4257
  DDIRQ_VPORT2_VSYNC   = $00000040;
4258
  DDIRQ_VPORT2_LINE    = $00000080;
4259
  DDIRQ_VPORT3_VSYNC   = $00000100;
4260
  DDIRQ_VPORT3_LINE    = $00000200;
4261
  DDIRQ_VPORT4_VSYNC   = $00000400;
4262
  DDIRQ_VPORT4_LINE    = $00000800;
4263
  DDIRQ_VPORT5_VSYNC   = $00001000;
4264
  DDIRQ_VPORT5_LINE    = $00002000;
4265
  DDIRQ_VPORT6_VSYNC   = $00004000;
4266
  DDIRQ_VPORT6_LINE    = $00008000;
4267
  DDIRQ_VPORT7_VSYNC   = $00010000;
4268
  DDIRQ_VPORT7_LINE    = $00020000;
4269
  DDIRQ_VPORT8_VSYNC   = $00040000;
4270
  DDIRQ_VPORT8_LINE    = $00080000;
4271
  DDIRQ_VPORT9_VSYNC   = $00010000;
4272
  DDIRQ_VPORT9_LINE    = $00020000;
4273
 
4274
(*==========================================================================;
4275
 *
4276
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4277
 *
4278
 *  File:       vfwmsgs.h
4279
 *
4280
 ***************************************************************************)
4281
 
4282
const
4283
//
4284
// Define the severity codes
4285
//
4286
 
4287
  VFW_E_INVALIDMEDIATYPE            = $80040200;
4288
  VFW_E_INVALIDSUBTYPE              = $80040201;
4289
  VFW_E_NEED_OWNER                  = $80040202;
4290
  VFW_E_ENUM_OUT_OF_SYNC            = $80040203;
4291
  VFW_E_ALREADY_CONNECTED           = $80040204;
4292
  VFW_E_FILTER_ACTIVE               = $80040205;
4293
  VFW_E_NO_TYPES                    = $80040206;
4294
  VFW_E_NO_ACCEPTABLE_TYPES         = $80040207;
4295
  VFW_E_INVALID_DIRECTION           = $80040208;
4296
  VFW_E_NOT_CONNECTED               = $80040209;
4297
  VFW_E_NO_ALLOCATOR                = $8004020A;
4298
  VFW_E_RUNTIME_ERROR               = $8004020B;
4299
  VFW_E_BUFFER_NOTSET               = $8004020C;
4300
  VFW_E_BUFFER_OVERFLOW             = $8004020D;
4301
  VFW_E_BADALIGN                    = $8004020E;
4302
  VFW_E_ALREADY_COMMITTED           = $8004020F;
4303
  VFW_E_BUFFERS_OUTSTANDING         = $80040210;
4304
  VFW_E_NOT_COMMITTED               = $80040211;
4305
  VFW_E_SIZENOTSET                  = $80040212;
4306
  VFW_E_NO_CLOCK                    = $80040213;
4307
  VFW_E_NO_SINK                     = $80040214;
4308
  VFW_E_NO_INTERFACE                = $80040215;
4309
  VFW_E_NOT_FOUND                   = $80040216;
4310
  VFW_E_CANNOT_CONNECT              = $80040217;
4311
  VFW_E_CANNOT_RENDER               = $80040218;
4312
  VFW_E_CHANGING_FORMAT             = $80040219;
4313
  VFW_E_NO_COLOR_KEY_SET            = $8004021A;
4314
  VFW_E_NOT_OVERLAY_CONNECTION      = $8004021B;
4315
  VFW_E_NOT_SAMPLE_CONNECTION       = $8004021C;
4316
  VFW_E_PALETTE_SET                 = $8004021D;
4317
  VFW_E_COLOR_KEY_SET               = $8004021E;
4318
  VFW_E_NO_COLOR_KEY_FOUND          = $8004021F;
4319
  VFW_E_NO_PALETTE_AVAILABLE        = $80040220;
4320
  VFW_E_NO_DISPLAY_PALETTE          = $80040221;
4321
  VFW_E_TOO_MANY_COLORS             = $80040222;
4322
  VFW_E_STATE_CHANGED               = $80040223;
4323
  VFW_E_NOT_STOPPED                 = $80040224;
4324
  VFW_E_NOT_PAUSED                  = $80040225;
4325
  VFW_E_NOT_RUNNING                 = $80040226;
4326
  VFW_E_WRONG_STATE                 = $80040227;
4327
  VFW_E_START_TIME_AFTER_END        = $80040228;
4328
  VFW_E_INVALID_RECT                = $80040229;
4329
  VFW_E_TYPE_NOT_ACCEPTED           = $8004022A;
4330
  VFW_E_SAMPLE_REJECTED             = $8004022B;
4331
  VFW_E_SAMPLE_REJECTED_EOS         = $8004022C;
4332
  VFW_E_DUPLICATE_NAME              = $8004022D;
4333
  VFW_S_DUPLICATE_NAME              = $0004022D;
4334
  VFW_E_TIMEOUT                     = $8004022E;
4335
  VFW_E_INVALID_FILE_FORMAT         = $8004022F;
4336
  VFW_E_ENUM_OUT_OF_RANGE           = $80040230;
4337
  VFW_E_CIRCULAR_GRAPH              = $80040231;
4338
  VFW_E_NOT_ALLOWED_TO_SAVE         = $80040232;
4339
  VFW_E_TIME_ALREADY_PASSED         = $80040233;
4340
  VFW_E_ALREADY_CANCELLED           = $80040234;
4341
  VFW_E_CORRUPT_GRAPH_FILE          = $80040235;
4342
  VFW_E_ADVISE_ALREADY_SET          = $80040236;
4343
  VFW_S_STATE_INTERMEDIATE          = $00040237;
4344
  VFW_E_NO_MODEX_AVAILABLE          = $80040238;
4345
  VFW_E_NO_ADVISE_SET               = $80040239;
4346
  VFW_E_NO_FULLSCREEN               = $8004023A;
4347
  VFW_E_IN_FULLSCREEN_MODE          = $8004023B;
4348
  VFW_E_UNKNOWN_FILE_TYPE           = $80040240;
4349
  VFW_E_CANNOT_LOAD_SOURCE_FILTER   = $80040241;
4350
  VFW_S_PARTIAL_RENDER              = $00040242;
4351
  VFW_E_FILE_TOO_SHORT              = $80040243;
4352
  VFW_E_INVALID_FILE_VERSION        = $80040244;
4353
  VFW_S_SOME_DATA_IGNORED           = $00040245;
4354
  VFW_S_CONNECTIONS_DEFERRED        = $00040246;
4355
  VFW_E_INVALID_CLSID               = $80040247;
4356
  VFW_E_INVALID_MEDIA_TYPE          = $80040248;
4357
  VFW_E_BAD_KEY                     = $800403F2;
4358
  VFW_S_NO_MORE_ITEMS               = $00040103;
4359
  VFW_E_SAMPLE_TIME_NOT_SET         = $80040249;
4360
  VFW_S_RESOURCE_NOT_NEEDED         = $00040250;
4361
  VFW_E_MEDIA_TIME_NOT_SET          = $80040251;
4362
  VFW_E_NO_TIME_FORMAT_SET          = $80040252;
4363
  VFW_E_MONO_AUDIO_HW               = $80040253;
4364
  VFW_S_MEDIA_TYPE_IGNORED          = $00040254;
4365
  VFW_E_NO_AUDIO_HARDWARE           = $80040256;
4366
  VFW_S_VIDEO_NOT_RENDERED          = $00040257;
4367
  VFW_S_AUDIO_NOT_RENDERED          = $00040258;
4368
  VFW_E_RPZA                        = $80040259;
4369
  VFW_S_RPZA                        = $0004025A;
4370
  VFW_E_PROCESSOR_NOT_SUITABLE      = $8004025B;
4371
  VFW_E_UNSUPPORTED_AUDIO           = $8004025C;
4372
  VFW_E_UNSUPPORTED_VIDEO           = $8004025D;
4373
  VFW_E_MPEG_NOT_CONSTRAINED        = $8004025E;
4374
  VFW_E_NOT_IN_GRAPH                = $8004025F;
4375
  VFW_S_ESTIMATED                   = $00040260;
4376
  VFW_E_NO_TIME_FORMAT              = $80040261;
4377
  VFW_E_READ_ONLY                   = $80040262;
4378
  VFW_S_RESERVED                    = $00040263;
4379
  VFW_E_BUFFER_UNDERFLOW            = $80040264;
4380
  VFW_E_UNSUPPORTED_STREAM          = $80040265;
4381
  VFW_E_NO_TRANSPORT                = $80040266;
4382
  VFW_S_STREAM_OFF                  = $00040267;
4383
  VFW_S_CANT_CUE                    = $00040268;
4384
  VFW_E_BAD_VIDEOCD                 = $80040269;
4385
  VFW_S_NO_STOP_TIME                = $00040270;
4386
  VFW_E_OUT_OF_VIDEO_MEMORY         = $80040271;
4387
  VFW_E_VP_NEGOTIATION_FAILED       = $80040272;
4388
  VFW_E_DDRAW_CAPS_NOT_SUITABLE     = $80040273;
4389
  VFW_E_NO_VP_HARDWARE              = $80040274;
4390
  VFW_E_NO_CAPTURE_HARDWARE         = $80040275;
4391
  VFW_E_DVD_OPERATION_INHIBITED     = $80040276;
4392
  VFW_E_DVD_INVALIDDOMAIN           = $80040277;
4393
  VFW_E_DVD_GRAPHNOTREADY           = $80040279;
4394
  VFW_E_DVD_RENDERFAIL              = $8004027A;
4395
  VFW_E_DVD_DECNOTENOUGH            = $8004027B;
4396
  VFW_E_DDRAW_VERSION_NOT_SUITABLE  = $8004027C;
4397
 
4398
  E_PROP_SET_UNSUPPORTED            = $80070492;
4399
  E_PROP_ID_UNSUPPORTED             = $80070490;
4400
 
4401
 
4402
(*==========================================================================;
4403
 *
4404
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4405
 *
4406
 *  File:       edevdefs.h
4407
 *
4408
 ***************************************************************************)
4409
 
4410
const
4411
  ED_BASE                                 = $1000;
4412
 
4413
// this is used to tell the device communications object which
4414
// physical communications port to use.
4415
  DEV_PORT_SIM                            = 1;
4416
  DEV_PORT_COM1                           = 2;
4417
  DEV_PORT_COM2                           = 3;
4418
  DEV_PORT_COM3                           = 4;
4419
  DEV_PORT_COM4                           = 5;
4420
  DEV_PORT_DIAQ                           = 6;
4421
  DEV_PORT_ARTI                           = 7;
4422
  DEV_PORT_1394                           = 8;
4423
  DEV_PORT_USB                            = 9;
4424
  DEV_PORT_MIN                            = DEV_PORT_SIM;
4425
  DEV_PORT_MAX                            = DEV_PORT_USB;
4426
 
4427
//      IAMExtDevice Capability Items:  unless otherwise specified, these items return
4428
//         OATRUE or OAFALSE.  All return values are in pdwValue unless otherwise specified:
4429
 
4430
  ED_DEVCAP_CAN_RECORD                    = ED_BASE+1;
4431
  ED_DEVCAP_CAN_RECORD_STROBE             = ED_BASE+2;
4432
  ED_DEVCAP_HAS_AUDIO                     = ED_BASE+3;
4433
  ED_DEVCAP_HAS_VIDEO                     = ED_BASE+4;
4434
  ED_DEVCAP_USES_FILES                    = ED_BASE+5;
4435
  ED_DEVCAP_CAN_SAVE                      = ED_BASE+6;
4436
  ED_DEVCAP_DEVICE_TYPE                   = ED_BASE+7;
4437
  ED_DEVTYPE_VCR                          = ED_BASE+8;
4438
  ED_DEVTYPE_LASERDISK                    = ED_BASE+9;
4439
  ED_DEVTYPE_ATR                          = ED_BASE+10;
4440
  ED_DEVTYPE_DDR                          = ED_BASE+11;
4441
  ED_DEVTYPE_ROUTER                       = ED_BASE+12;
4442
  ED_DEVTYPE_KEYER                        = ED_BASE+13;
4443
  ED_DEVTYPE_MIXER_VIDEO                  = ED_BASE+14;
4444
  ED_DEVTYPE_DVE                          = ED_BASE+15;
4445
  ED_DEVTYPE_WIPEGEN                      = ED_BASE+16;
4446
  ED_DEVTYPE_MIXER_AUDIO                  = ED_BASE+17;
4447
  ED_DEVTYPE_CG                           = ED_BASE+18;
4448
  ED_DEVTYPE_TBC                          = ED_BASE+19;
4449
  ED_DEVTYPE_TCG                          = ED_BASE+20;
4450
  ED_DEVTYPE_GPI                          = ED_BASE+21;
4451
  ED_DEVTYPE_JOYSTICK                     = ED_BASE+22;
4452
  ED_DEVTYPE_KEYBOARD                     = ED_BASE+23;
4453
 
4454
// returns mfr-specific ID from external device.
4455
  ED_DEVCAP_EXTERNAL_DEVICE_ID            = ED_BASE+24;
4456
 
4457
  ED_DEVCAP_TIMECODE_READ                 = ED_BASE+25;
4458
  ED_DEVCAP_TIMECODE_WRITE                = ED_BASE+26;
4459
//      used for seekable non-timecode enabled devices
4460
  ED_DEVCAP_CTLTRK_READ                   = ED_BASE+27;
4461
//      used for seekable non-timecode enabled devices
4462
  ED_DEVCAP_INDEX_READ                    = ED_BASE+28;
4463
 
4464
// returns device preroll time in current time format
4465
  ED_DEVCAP_PREROLL                       = ED_BASE+29;
4466
// returns device postroll time in current time format
4467
  ED_DEVCAP_POSTROLL                     = ED_BASE+30;
4468
 
4469
// returns indication of device’s synchronization accuracy.
4470
  ED_DEVCAP_SYNC_ACCURACY                = ED_BASE+31;
4471
  ED_SYNCACC_PRECISE                     = ED_BASE+32;
4472
  ED_SYNCACC_FRAME                       = ED_BASE+33;
4473
  ED_SYNCACC_ROUGH                       = ED_BASE+34;
4474
 
4475
// returns device’s normal framerate.
4476
  ED_DEVCAP_NORMAL_RATE                  = ED_BASE+35;
4477
  ED_RATE_24                             = ED_BASE+36;
4478
  ED_RATE_25                             = ED_BASE+37;
4479
  ED_RATE_2997                           = ED_BASE+38;
4480
  ED_RATE_30                             = ED_BASE+39;
4481
 
4482
  ED_DEVCAP_CAN_PREVIEW = ED_BASE+40;
4483
  ED_DEVCAP_CAN_MONITOR_SOURCES = ED_BASE+41;
4484
 
4485
// indicates implementation allows testing of methods/parameters by
4486
// setting the hi bit of a parm that makes sense - see individual methods
4487
// for details.
4488
  ED_DEVCAP_CAN_TEST                     = ED_BASE+42;
4489
 
4490
// indicates device accepts video as an input.
4491
  ED_DEVCAP_VIDEO_INPUTS                 = ED_BASE+43;
4492
 
4493
// indicates device accepts audio as an input.
4494
  ED_DEVCAP_AUDIO_INPUTS                 = ED_BASE+44;
4495
 
4496
  ED_DEVCAP_NEEDS_CALIBRATING            = ED_BASE+45;
4497
 
4498
  ED_DEVCAP_SEEK_TYPE                    = ED_BASE+46;
4499
  ED_SEEK_PERFECT                        = ED_BASE+47;
4500
  ED_SEEK_FAST                           = ED_BASE+48;
4501
  ED_SEEK_SLOW                           = ED_BASE+49;
4502
 
4503
  ED_POWER_ON                            = ED_BASE+50;
4504
  ED_POWER_OFF                           = ED_BASE+51;
4505
  ED_POWER_STANDBY                       = ED_BASE+52;
4506
 
4507
  ED_ACTIVE                              = ED_BASE+53;
4508
  ED_INACTIVE                            = ED_BASE+54;
4509
  ED_ALL                                 = ED_BASE+55;
4510
  ED_TEST                                = ED_BASE+56;
4511
 
4512
//      IAMExtTransport Capability Items:  unless otherwise specified, these items return
4513
//         OATRUE or OAFALSE.  All return values are in pdwValue unless otherwise specified:
4514
 
4515
  ED_TRANSCAP_CAN_EJECT                  = ED_BASE+100;
4516
  ED_TRANSCAP_CAN_BUMP_PLAY              = ED_BASE+101;
4517
  ED_TRANSCAP_CAN_PLAY_BACKWARDS         = ED_BASE+102;
4518
  ED_TRANSCAP_CAN_SET_EE                 = ED_BASE+103;
4519
  ED_TRANSCAP_CAN_SET_PB                 = ED_BASE+104;
4520
  ED_TRANSCAP_CAN_DELAY_VIDEO_IN         = ED_BASE+105;
4521
  ED_TRANSCAP_CAN_DELAY_VIDEO_OUT        = ED_BASE+106;
4522
  ED_TRANSCAP_CAN_DELAY_AUDIO_IN         = ED_BASE+107;
4523
  ED_TRANSCAP_CAN_DELAY_AUDIO_OUT        = ED_BASE+108;
4524
  ED_TRANSCAP_FWD_VARIABLE_MAX           = ED_BASE+109;
4525
  ED_TRANSCAP_REV_VARIABLE_MAX           = ED_BASE+110;
4526
  ED_TRANSCAP_NUM_AUDIO_TRACKS           = ED_BASE+111;
4527
  ED_TRANSCAP_LTC_TRACK                  = ED_BASE+112;
4528
  ED_TRANSCAP_NEEDS_TBC                  = ED_BASE+113;
4529
  ED_TRANSCAP_NEEDS_CUEING               = ED_BASE+114;
4530
  ED_TRANSCAP_CAN_INSERT                 = ED_BASE+115;
4531
  ED_TRANSCAP_CAN_ASSEMBLE               = ED_BASE+116;
4532
  ED_TRANSCAP_FIELD_STEP                 = ED_BASE+117;
4533
  ED_TRANSCAP_CLOCK_INC_RATE             = ED_BASE+118;
4534
  ED_TRANSCAP_CAN_DETECT_LENGTH          = ED_BASE+119;
4535
  ED_TRANSCAP_CAN_FREEZE                 = ED_BASE+120;
4536
  ED_TRANSCAP_HAS_TUNER                  = ED_BASE+121;
4537
  ED_TRANSCAP_HAS_TIMER                  = ED_BASE+122;
4538
  ED_TRANSCAP_HAS_CLOCK                  = ED_BASE+123;
4539
 
4540
//      IAMExtTransport Media States
4541
  ED_MEDIA_SPIN_UP                       = ED_BASE+130;
4542
  ED_MEDIA_SPIN_DOWN                     = ED_BASE+131;
4543
  ED_MEDIA_UNLOAD                        = ED_BASE+132;
4544
 
4545
//      IAMExtTransport Modes
4546
  ED_MODE_PLAY                           = ED_BASE+200;
4547
  ED_MODE_STOP                           = ED_BASE+201;
4548
  ED_MODE_FREEZE                         = ED_BASE+202;
4549
  ED_MODE_THAW                           = ED_BASE+203;
4550
  ED_MODE_FF                             = ED_BASE+204;
4551
  ED_MODE_REW                            = ED_BASE+205;
4552
  ED_MODE_RECORD                         = ED_BASE+206;
4553
  ED_MODE_RECORD_STROBE                  = ED_BASE+207;
4554
  ED_MODE_STEP                           = ED_BASE+208;
4555
  ED_MODE_SHUTTLE                        = ED_BASE+209;
4556
  ED_MODE_EDIT_CUE                       = ED_BASE+210;
4557
  ED_MODE_VAR_SPEED                      = ED_BASE+211;
4558
  ED_MODE_PERFORM                        = ED_BASE+212;
4559
  ED_MODE_LINK_ON                        = ED_BASE+280;
4560
  ED_MODE_LINK_OFF                       = ED_BASE+281;
4561
 
4562
//      IAMTimecodeReader/Generator/Display defines
4563
//
4564
// Timecode Generator Mode params and values:
4565
//
4566
  ED_TCG_TIMECODE_TYPE                   = ED_BASE+400;
4567
  ED_TCG_SMPTE_LTC                       = ED_BASE+401;
4568
  ED_TCG_SMPTE_VITC                      = ED_BASE+402;
4569
  ED_TCG_MIDI_QF                         = ED_BASE+403;
4570
  ED_TCG_MIDI_FULL                       = ED_BASE+404;
4571
 
4572
  ED_TCG_FRAMERATE                       = ED_BASE+405;
4573
  ED_FORMAT_SMPTE_30                     = ED_BASE+406;
4574
  ED_FORMAT_SMPTE_30DROP                 = ED_BASE+407;
4575
  ED_FORMAT_SMPTE_25                     = ED_BASE+408;
4576
  ED_FORMAT_SMPTE_24                     = ED_BASE+409;
4577
 
4578
  ED_TCG_SYNC_SOURCE                     = ED_BASE+410;
4579
  ED_TCG_VIDEO                           = ED_BASE+411;
4580
  ED_TCG_READER                          = ED_BASE+412;
4581
  ED_TCG_FREE                            = ED_BASE+413;
4582
 
4583
  ED_TCG_REFERENCE_SOURCE                = ED_BASE+414;
4584
 
4585
// TimeCodeReader Mode params and values:
4586
  ED_TCR_SOURCE                          = ED_BASE+416;
4587
// ED_TCG (already defined)
4588
  ED_TCR_LTC                             = ED_BASE+417;
4589
  ED_TCR_VITC                            = ED_BASE+418;
4590
  ED_TCR_CT                              = ED_BASE+419;
4591
 
4592
// TimeCode Display Mode params and values:
4593
//
4594
  ED_TCD_SOURCE                          = ED_BASE+422;
4595
  ED_TCR                                 = ED_BASE+423;
4596
  ED_TCG                                 = ED_BASE+424;
4597
 
4598
  ED_TCD_SIZE                            = ED_BASE+425;
4599
  ED_SMALL                               = ED_BASE+426;
4600
  ED_MED                                 = ED_BASE+427;
4601
  ED_LARGE                               = ED_BASE+428;
4602
 
4603
  ED_TCD_POSITION                        = ED_BASE+429;
4604
  ED_TOP                                 = $0001;
4605
  ED_MIDDLE                              = $0002;
4606
  ED_BOTTOM                              = $0004;
4607
  ED_LEFT                                = $0100;
4608
  ED_CENTER                              = $0200;
4609
  ED_RIGHT                               = $0400;
4610
 
4611
  ED_TCD_INTENSITY                       = ED_BASE+436;
4612
  ED_HIGH                                = ED_BASE+437;
4613
  ED_LOW                                 = ED_BASE+438;
4614
 
4615
  ED_TCD_TRANSPARENCY                    = ED_BASE+439;
4616
  ED_TCD_INVERT                          = ED_BASE+440;
4617
 
4618
//      IAMExtTransport defines
4619
//
4620
// Transport status, params and values
4621
//
4622
 
4623
// IAMExtTransport Status items and and values:
4624
  ED_MODE                                = ED_BASE+500;
4625
  ED_ERROR                               = ED_BASE+501;
4626
  ED_LOCAL                               = ED_BASE+502;
4627
  ED_RECORD_INHIBIT                      = ED_BASE+503;
4628
  ED_SERVO_LOCK                          = ED_BASE+504;
4629
  ED_MEDIA_PRESENT                       = ED_BASE+505;
4630
  ED_MEDIA_LENGTH                        = ED_BASE+506;
4631
  ED_MEDIA_SIZE                          = ED_BASE+507;
4632
  ED_MEDIA_TRACK_COUNT                   = ED_BASE+508;
4633
  ED_MEDIA_TRACK_LENGTH                  = ED_BASE+509;
4634
  ED_MEDIA_SIDE                          = ED_BASE+510;
4635
 
4636
  ED_MEDIA_TYPE                          = ED_BASE+511;
4637
  ED_MEDIA_VHS                           = ED_BASE+512;
4638
  ED_MEDIA_SVHS                          = ED_BASE+513;
4639
  ED_MEDIA_HI8                           = ED_BASE+514;
4640
  ED_MEDIA_UMATIC                        = ED_BASE+515;
4641
  ED_MEDIA_DVC                           = ED_BASE+516;
4642
  ED_MEDIA_1_INCH                        = ED_BASE+517;
4643
  ED_MEDIA_D1                            = ED_BASE+518;
4644
  ED_MEDIA_D2                            = ED_BASE+519;
4645
  ED_MEDIA_D3                            = ED_BASE+520;
4646
  ED_MEDIA_D5                            = ED_BASE+521;
4647
  ED_MEDIA_DBETA                         = ED_BASE+522;
4648
  ED_MEDIA_BETA                          = ED_BASE+523;
4649
  ED_MEDIA_8MM                           = ED_BASE+524;
4650
  ED_MEDIA_DDR                           = ED_BASE+525;
4651
  ED_MEDIA_OTHER                         = ED_BASE+526;
4652
  ED_MEDIA_CLV                           = ED_BASE+527;
4653
  ED_MEDIA_CAV                           = ED_BASE+528;
4654
  ED_MEDIA_POSITION                      = ED_BASE+529;
4655
 
4656
  ED_LINK_MODE                           = ED_BASE+530;
4657
 
4658
// IAMExtTransport Basic Parms
4659
  ED_TRANSBASIC_TIME_FORMAT              = ED_BASE+540;
4660
  ED_FORMAT_MILLISECONDS                 = ED_BASE+541;
4661
  ED_FORMAT_FRAMES                       = ED_BASE+542;
4662
  ED_FORMAT_REFERENCE_TIME               = ED_BASE+543;
4663
 
4664
  ED_FORMAT_HMSF                         = ED_BASE+547;
4665
  ED_FORMAT_TMSF                         = ED_BASE+548;
4666
 
4667
  ED_TRANSBASIC_TIME_REFERENCE           = ED_BASE+549;
4668
  ED_TIMEREF_TIMECODE                    = ED_BASE+550;
4669
  ED_TIMEREF_CONTROL_TRACK               = ED_BASE+551;
4670
  ED_TIMEREF_INDEX                       = ED_BASE+552;
4671
 
4672
  ED_TRANSBASIC_SUPERIMPOSE              = ED_BASE+553;
4673
  ED_TRANSBASIC_END_STOP_ACTION          = ED_BASE+554;
4674
 
4675
  ED_TRANSBASIC_RECORD_FORMAT            = ED_BASE+555;
4676
  ED_RECORD_FORMAT_SP                    = ED_BASE+556;
4677
  ED_RECORD_FORMAT_LP                    = ED_BASE+557;
4678
  ED_RECORD_FORMAT_EP                    = ED_BASE+558;
4679
 
4680
  ED_TRANSBASIC_STEP_COUNT               = ED_BASE+559;
4681
  ED_TRANSBASIC_STEP_UNIT                = ED_BASE+560;
4682
  ED_STEP_FIELD                          = ED_BASE+561;
4683
  ED_STEP_FRAME                          = ED_BASE+562;
4684
  ED_STEP_3_2                            = ED_BASE+563;
4685
 
4686
  ED_TRANSBASIC_PREROLL                  = ED_BASE+564;
4687
  ED_TRANSBASIC_RECPREROLL               = ED_BASE+565;
4688
  ED_TRANSBASIC_POSTROLL                 = ED_BASE+566;
4689
  ED_TRANSBASIC_EDIT_DELAY               = ED_BASE+567;
4690
  ED_TRANSBASIC_PLAYTC_DELAY             = ED_BASE+568;
4691
  ED_TRANSBASIC_RECTC_DELAY              = ED_BASE+569;
4692
  ED_TRANSBASIC_EDIT_FIELD               = ED_BASE+570;
4693
  ED_TRANSBASIC_FRAME_SERVO              = ED_BASE+571;
4694
  ED_TRANSBASIC_CF_SERVO                 = ED_BASE+572;
4695
  ED_TRANSBASIC_SERVO_REF                = ED_BASE+573;
4696
  ED_REF_EXTERNAL                        = ED_BASE+574;
4697
  ED_REF_INPUT                           = ED_BASE+575;
4698
  ED_REF_INTERNAL                        = ED_BASE+576;
4699
  ED_REF_AUTO                            = ED_BASE+577;
4700
 
4701
  ED_TRANSBASIC_WARN_GL                  = ED_BASE+578;
4702
  ED_TRANSBASIC_SET_TRACKING             = ED_BASE+579;
4703
  ED_TRACKING_PLUS                       = ED_BASE+580;
4704
  ED_TRACKING_MINUS                      = ED_BASE+581;
4705
  ED_TRACKING_RESET                      = ED_BASE+582;
4706
 
4707
  ED_TRANSBASIC_SET_FREEZE_TIMEOUT       = ED_BASE+583;
4708
  ED_TRANSBASIC_VOLUME_NAME              = ED_BASE+584;
4709
  ED_TRANSBASIC_BALLISTIC_1              = ED_BASE+585;
4710
  ED_TRANSBASIC_BALLISTIC_2              = ED_BASE+586;
4711
  ED_TRANSBASIC_BALLISTIC_3              = ED_BASE+587;
4712
  ED_TRANSBASIC_BALLISTIC_4              = ED_BASE+588;
4713
  ED_TRANSBASIC_BALLISTIC_5              = ED_BASE+589;
4714
  ED_TRANSBASIC_BALLISTIC_6              = ED_BASE+590;
4715
  ED_TRANSBASIC_BALLISTIC_7              = ED_BASE+591;
4716
  ED_TRANSBASIC_BALLISTIC_8              = ED_BASE+592;
4717
  ED_TRANSBASIC_BALLISTIC_9              = ED_BASE+593;
4718
  ED_TRANSBASIC_BALLISTIC_10             = ED_BASE+594;
4719
  ED_TRANSBASIC_BALLISTIC_11             = ED_BASE+595;
4720
  ED_TRANSBASIC_BALLISTIC_12             = ED_BASE+596;
4721
  ED_TRANSBASIC_BALLISTIC_13             = ED_BASE+597;
4722
  ED_TRANSBASIC_BALLISTIC_14             = ED_BASE+598;
4723
  ED_TRANSBASIC_BALLISTIC_15             = ED_BASE+599;
4724
  ED_TRANSBASIC_BALLISTIC_16             = ED_BASE+600;
4725
  ED_TRANSBASIC_BALLISTIC_17             = ED_BASE+601;
4726
  ED_TRANSBASIC_BALLISTIC_18             = ED_BASE+602;
4727
  ED_TRANSBASIC_BALLISTIC_19             = ED_BASE+603;
4728
  ED_TRANSBASIC_BALLISTIC_20             = ED_BASE+604;
4729
 
4730
// consumer VCR items
4731
  ED_TRANSBASIC_SETCLOCK                 = ED_BASE+605;
4732
  ED_TRANSBASIC_SET_COUNTER_FORMAT       = ED_BASE+606;
4733
  ED_TRANSBASIC_SET_COUNTER_VALUE        = ED_BASE+607;
4734
 
4735
  ED_TRANSBASIC_SETTUNER_CH_UP           = ED_BASE+608;
4736
  ED_TRANSBASIC_SETTUNER_CH_DN           = ED_BASE+609;
4737
  ED_TRANSBASIC_SETTUNER_SK_UP           = ED_BASE+610;
4738
  ED_TRANSBASIC_SETTUNER_SK_DN           = ED_BASE+611;
4739
  ED_TRANSBASIC_SETTUNER_CH              = ED_BASE+612;
4740
  ED_TRANSBASIC_SETTUNER_NUM             = ED_BASE+613;
4741
  ED_TRANSBASIC_SETTIMER_EVENT           = ED_BASE+614;
4742
  ED_TRANSBASIC_SETTIMER_STARTDAY        = ED_BASE+615;
4743
  ED_TRANSBASIC_SETTIMER_STARTTIME       = ED_BASE+616;
4744
  ED_TRANSBASIC_SETTIMER_STOPDAY         = ED_BASE+617;
4745
  ED_TRANSBASIC_SETTIMER_STOPTIME        = ED_BASE+618;
4746
 
4747
// IAMExtTransport video parameters
4748
  ED_TRANSVIDEO_SET_OUTPUT               = ED_BASE+630;
4749
  ED_E2E                                 = ED_BASE+631;
4750
  ED_PLAYBACK                            = ED_BASE+632;
4751
  ED_OFF                                 = ED_BASE+633;
4752
 
4753
  ED_TRANSVIDEO_SET_SOURCE               = ED_BASE+634;
4754
 
4755
// IAMExtTransport audio parameters
4756
  ED_TRANSAUDIO_ENABLE_OUTPUT            = ED_BASE+640;
4757
  ED_AUDIO_ALL                           = $10000000;
4758
  ED_AUDIO_1                             = $0000001;
4759
  ED_AUDIO_2                             = $0000002;
4760
  ED_AUDIO_3                             = $0000004;
4761
  ED_AUDIO_4                             = $0000008;
4762
  ED_AUDIO_5                             = $0000010;
4763
  ED_AUDIO_6                             = $0000020;
4764
  ED_AUDIO_7                             = $0000040;
4765
  ED_AUDIO_8                             = $0000080;
4766
  ED_AUDIO_9                             = $0000100;
4767
  ED_AUDIO_10                            = $0000200;
4768
  ED_AUDIO_11                            = $0000400;
4769
  ED_AUDIO_12                            = $0000800;
4770
  ED_AUDIO_13                            = $0001000;
4771
  ED_AUDIO_14                            = $0002000;
4772
  ED_AUDIO_15                            = $0004000;
4773
  ED_AUDIO_16                            = $0008000;
4774
  ED_AUDIO_17                            = $0010000;
4775
  ED_AUDIO_18                            = $0020000;
4776
  ED_AUDIO_19                            = $0040000;
4777
  ED_AUDIO_20                            = $0080000;
4778
  ED_AUDIO_21                            = $0100000;
4779
  ED_AUDIO_22                            = $0200000;
4780
  ED_AUDIO_23                            = $0400000;
4781
  ED_AUDIO_24                            = $0800000;
4782
  ED_VIDEO                               = $2000000;
4783
 
4784
  ED_TRANSAUDIO_ENABLE_RECORD            = ED_BASE+642;
4785
  ED_TRANSAUDIO_ENABLE_SELSYNC           = ED_BASE+643;
4786
  ED_TRANSAUDIO_SET_SOURCE               = ED_BASE+644;
4787
  ED_TRANSAUDIO_SET_MONITOR              = ED_BASE+645;
4788
 
4789
// Edit Property Set-related defs
4790
 
4791
// The following values reflect (and control) the state of an
4792
// edit property set
4793
  ED_INVALID                             = ED_BASE+652;
4794
  ED_EXECUTING                           = ED_BASE+653;
4795
  ED_REGISTER                            = ED_BASE+654;
4796
  ED_DELETE                              = ED_BASE+655;
4797
 
4798
// Edit property set parameters and values
4799
  ED_EDIT_HEVENT                         = ED_BASE+656;
4800
  ED_EDIT_TEST                           = ED_BASE+657;
4801
  ED_EDIT_IMMEDIATE                      = ED_BASE+658;
4802
 
4803
  ED_EDIT_MODE                           = ED_BASE+659;
4804
// can be one of the following values:
4805
  ED_EDIT_MODE_ASSEMBLE                  = ED_BASE+660;
4806
  ED_EDIT_MODE_INSERT                    = ED_BASE+661;
4807
  ED_EDIT_MODE_CRASH_RECORD              = ED_BASE+662;
4808
  ED_EDIT_MODE_BOOKMARK_TIME             = ED_BASE+663;
4809
  ED_EDIT_MODE_BOOKMARK_CHAPTER          = ED_BASE+664;
4810
 
4811
  ED_EDIT_MASTER                         = ED_BASE+666;
4812
 
4813
  ED_EDIT_TRACK                          = ED_BASE+667;
4814
// can be one of the following possible OR'd values:
4815
//      ED_VIDEO, ED_AUDIO_1 thru ED_AUDIO_24 (or ED_AUDIO_ALL)
4816
 
4817
  ED_EDIT_SRC_INPOINT                    = ED_BASE+668;
4818
  ED_EDIT_SRC_OUTPOINT                   = ED_BASE+669;
4819
  ED_EDIT_REC_INPOINT                    = ED_BASE+670;
4820
  ED_EDIT_REC_OUTPOINT                   = ED_BASE+671;
4821
 
4822
  ED_EDIT_REHEARSE_MODE                  = ED_BASE+672;
4823
// can be one of the following possible values:
4824
  ED_EDIT_BVB                            = ED_BASE+673;
4825
  ED_EDIT_VBV                            = ED_BASE+674;
4826
  ED_EDIT_VVV                            = ED_BASE+675;
4827
  ED_EDIT_PERFORM                        = ED_BASE+676;
4828
 
4829
 
4830
// Set this property to OATRUE to kill the edit if in progress
4831
  ED_EDIT_ABORT                          = ED_BASE+677;
4832
// how long to wait for edit to complete
4833
  ED_EDIT_TIMEOUT                        = ED_BASE+678;
4834
 
4835
// This property causes the device to seek to a point specified by
4836
// ED_EDIT_SEEK_MODE (see below).  NOTE: Only one event at a time can seek.
4837
  ED_EDIT_SEEK                           = ED_BASE+679;
4838
  ED_EDIT_SEEK_MODE                      = ED_BASE+680;
4839
 
4840
//possible values:
4841
  ED_EDIT_SEEK_EDIT_IN                   = ED_BASE+681;
4842
  ED_EDIT_SEEK_EDIT_OUT                  = ED_BASE+682;
4843
  ED_EDIT_SEEK_PREROLL                   = ED_BASE+683;
4844
  ED_EDIT_SEEK_PREROLL_CT                = ED_BASE+684;
4845
  ED_EDIT_SEEK_BOOKMARK                  = ED_BASE+685;
4846
 
4847
//
4848
// Some error codes:
4849
//
4850
// device could be in local mode
4851
  ED_ERR_DEVICE_NOT_READY                = ED_BASE+700;
4852
 
4853
(*==========================================================================;
4854
 *
4855
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4856
 *
4857
 *  File:       aviriff.h
4858
 *
4859
 ***************************************************************************)
4860
 
4861
type
4862
(*+
4863
 *
4864
 * Structures and defines for the RIFF AVI file format extended to
4865
 * handle very large/long files
4866
 *
4867
 *-=====================================================================*)
4868
 
4869
                 {
4870
#if !defined NUMELMS
4871
  #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
4872
#endif
4873
                  }
4874
// all structures in this file are packed on word boundaries
4875
//
4876
(*
4877
 * heres the general layout of an AVI riff file (new format)
4878
 *
4879
 * RIFF (3F??????) AVI       <- not more than 1 GB in size
4880
 *     LIST (size) hdrl
4881
 *         avih (0038)
4882
 *         LIST (size) strl
4883
 *             strh (0038)
4884
 *             strf (????)
4885
 *             indx (3ff8)   <- size may vary, should be sector sized
4886
 *         LIST (size) strl
4887
 *             strh (0038)
4888
 *             strf (????)
4889
 *             indx (3ff8)   <- size may vary, should be sector sized
4890
 *         LIST (size) odml
4891
 *             dmlh (????)
4892
 *         JUNK (size)       <- fill to align to sector - 12
4893
 *     LIST (7f??????) movi  <- aligned on sector - 12
4894
 *         00dc (size)       <- sector aligned
4895
 *         01wb (size)       <- sector aligned
4896
 *         ix00 (size)       <- sector aligned
4897
 *     idx1 (00??????)       <- sector aligned
4898
 * RIFF (7F??????) AVIX
4899
 *     JUNK (size)           <- fill to align to sector -12
4900
 *     LIST (size) movi
4901
 *         00dc (size)       <- sector aligned
4902
 * RIFF (7F??????) AVIX      <- not more than 2GB in size
4903
 *     JUNK (size)           <- fill to align to sector - 12
4904
 *     LIST (size) movi
4905
 *         00dc (size)       <- sector aligned
4906
 *
4907
 *-===================================================================*)
4908
 
4909
//
4910
// structures for manipulating RIFF headers
4911
//
4912
{
4913
#define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) |     \
4914
                  (((DWORD)(ch4) & 0xFF00) << 8) |    \
4915
                  (((DWORD)(ch4) & 0xFF0000) >> 8) |  \
4916
                  (((DWORD)(ch4) & 0xFF000000) >> 24))
4917
}
4918
  TRIFFChunk = packed record
4919
    fcc: FOURCC;
4920
    cb: DWORD;
4921
  end;
4922
 
4923
  TRIFFList = packed record
4924
    fcc: FOURCC;
4925
    cb: DWORD;
4926
    fccListType: FOURCC;
4927
  end;
4928
 
4929
{
4930
#define RIFFROUND(cb) ((cb) + ((cb)&1))
4931
#define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk) \
4932
                          + sizeof(RIFFCHUNK) \
4933
                          + RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
4934
 
4935
}
4936
//
4937
// ==================== avi header structures ===========================
4938
//
4939
 
4940
// main header for the avi file (compatibility header)
4941
//
4942
//#define ckidMAINAVIHEADER FCC('avih')
4943
 
4944
  TAVIMainHeader = packed record
4945
    fcc: FOURCC;                   // 'avih'
4946
    cb: DWORD;                     // size of this structure -8
4947
    dwMicroSecPerFrame: DWORD;     // frame display rate (or 0L)
4948
    dwMaxBytesPerSec: DWORD;       // max. transfer rate
4949
    dwPaddingGranularity: DWORD;   // pad to multiples of this size; normally 2K.
4950
    dwFlags: DWORD;                // the ever-present flags
4951
    dwTotalFrames: DWORD;          // # frames in first movi list
4952
    dwInitialFrames: DWORD;
4953
    dwStreams: DWORD;
4954
    dwSuggestedBufferSize: DWORD;
4955
    dwWidth: DWORD;
4956
    dwHeight: DWORD;
4957
    dwReserved: array[0..3] of DWORD;
4958
  end;
4959
 
4960
const
4961
  AVIF_HASINDEX       = $00000010; // Index at end of file?
4962
  AVIF_MUSTUSEINDEX   = $00000020;
4963
  AVIF_ISINTERLEAVED  = $00000100;
4964
  AVIF_TRUSTCKTYPE    = $00000800; // Use CKType to find key frames
4965
  AVIF_WASCAPTUREFILE = $00010000;
4966
  AVIF_COPYRIGHTED    = $00020000;
4967
 
4968
{
4969
#define ckidODML          FCC('odml')
4970
#define ckidAVIEXTHEADER  FCC('dmlh')
4971
}
4972
type
4973
  TAVIExtHeader = packed record
4974
    fcc: FOURCC;                       // 'dmlh'
4975
    cb: DWORD;                         // size of this structure -8
4976
    dwGrandFrames: DWORD;              // total number of frames in the file
4977
    dwFuture: array[0..60] of DWORD;   // to be defined later
4978
  end;
4979
 
4980
//
4981
// structure of an AVI stream header riff chunk
4982
//
4983
{ #define ckidSTREAMLIST   FCC('strl')
4984
 
4985
#define ckidSTREAMHEADER FCC('strh')
4986
}
4987
  TAVIStreamHeader = packed record
4988
     fcc: FOURCC;            // 'strh'
4989
     cb: DWORD;              // size of this structure - 8
4990
 
4991
     fccType: FOURCC;        // stream type codes
4992
 
4993
     fccHandler: FOURCC;
4994
     dwFlags: DWORD;
4995
 
4996
     wPriority: DWORD;
4997
     wLanguage: DWORD;
4998
     dwInitialFrames: DWORD;
4999
     dwScale: DWORD;
5000
     dwRate: DWORD;          // dwRate/dwScale is stream tick rate in ticks/sec
5001
     dwStart: DWORD;
5002
     dwLength: DWORD;
5003
     dwSuggestedBufferSize: DWORD;
5004
     dwQuality: DWORD;
5005
     dwSampleSize: DWORD;
5006
 
5007
     rcFrame: packed record
5008
       left: SmallInt;
5009
       top: SmallInt;
5010
       right: SmallInt;
5011
       bottom: SmallInt;
5012
     end;
5013
  end;
5014
 
5015
const
5016
{
5017
#define streamtypeVIDEO FCC('vids')
5018
#define streamtypeAUDIO FCC('auds')
5019
#define streamtypeMIDI  FCC('mids')
5020
#define streamtypeTEXT  FCC('txts')
5021
}
5022
  AVISF_DISABLED         = $00000001;
5023
  AVISF_VIDEO_PALCHANGES = $00010000;
5024
 
5025
//
5026
// structure of an AVI stream format chunk
5027
//
5028
{
5029
#define ckidSTREAMFORMAT FCC('strf')
5030
}
5031
//
5032
// avi stream formats are different for each stream type
5033
//
5034
// BITMAPINFOHEADER for video streams
5035
// WAVEFORMATEX or PCMWAVEFORMAT for audio streams
5036
// nothing for text streams
5037
// nothing for midi streams
5038
 
5039
 
5040
//
5041
// structure of old style AVI index
5042
//
5043
{ #define ckidAVIOLDINDEX FCC('idx1')
5044
}
5045
type
5046
  TAVIOldIndex = packed record
5047
    fcc: FOURCC;      // 'idx1'
5048
    cb: DWORD;        // size of this structure -8
5049
 
5050
    aIndex: array[0..0] of packed record
5051
      dwChunkId: DWORD;
5052
      dwFlags: DWORD;
5053
      dwOffset: DWORD;      // offset of riff chunk header for the data
5054
      dwSize: DWORD;        // size of the data (excluding riff header size)
5055
    end;                    // size of this array
5056
  end;
5057
 
5058
const
5059
  AVIIF_LIST       = $00000001;
5060
  AVIIF_KEYFRAME   = $00000010;
5061
 
5062
  AVIIF_NO_TIME    = $00000100;
5063
  AVIIF_COMPRESSOR = $0FFF0000;  // unused?
5064
 
5065
{
5066
#define AVIIF_LIST       0x00000001
5067
#define AVIIF_KEYFRAME   0x00000010
5068
 
5069
#define AVIIF_NO_TIME    0x00000100
5070
#define AVIIF_COMPRESSOR 0x0FFF0000  // unused?
5071
}
5072
 
5073
//#define TIMECODE_RATE_30DROP 0   // this MUST be zero
5074
 
5075
// struct for all the SMPTE timecode info
5076
//
5077
type
5078
  TTimeCodeData = packed record
5079
    time: TTimeCode;
5080
    dwSMPTEflags: DWORD;
5081
    dwUser: DWORD;
5082
  end;
5083
 
5084
// dwSMPTEflags masks/values
5085
//
5086
const
5087
  TIMECODE_SMPTE_BINARY_GROUP = $07;
5088
  TIMECODE_SMPTE_COLOR_FRAME  = $08;
5089
 
5090
//
5091
// ============ structures for new style AVI indexes =================
5092
//
5093
 
5094
// index type codes
5095
//
5096
  AVI_INDEX_OF_INDEXES      = $00;
5097
  AVI_INDEX_OF_CHUNKS       = $01;
5098
  AVI_INDEX_OF_TIMED_CHUNKS = $02;
5099
  AVI_INDEX_OF_SUB_2FIELD   = $03;
5100
  AVI_INDEX_IS_DATA         = $80;
5101
 
5102
// index subtype codes
5103
//
5104
  AVI_INDEX_SUB_DEFAULT     = $00;
5105
 
5106
// INDEX_OF_CHUNKS subtype codes
5107
//
5108
  AVI_INDEX_SUB_2FIELD      = $01;
5109
 
5110
// meta structure of all avi indexes
5111
//
5112
type
5113
  TAVIMetaIndex = packed record
5114
    fcc: FOURCC;
5115
    cb: UINT;
5116
    wLongsPerEntry: WORD;
5117
    bIndexSubType: BYTE;
5118
    bIndexType: BYTE;
5119
    nEntriesInUse: DWORD;
5120
    dwChunkId: DWORD;
5121
    dwReserved: array[0..2] of DWORD;
5122
    adwIndex: array[0..0] of DWORD;
5123
  end;
5124
 
5125
const
5126
  STDINDEXSIZE = $4000;
5127
{
5128
#define NUMINDEX(wLongsPerEntry) ((STDINDEXSIZE-32)/4/(wLongsPerEntry))
5129
#define NUMINDEXFILL(wLongsPerEntry) ((STDINDEXSIZE/4) - NUMINDEX(wLongsPerEntry))
5130
}
5131
// structure of a super index (INDEX_OF_INDEXES)
5132
//
5133
//#define ckidAVISUPERINDEX FCC('indx')
5134
 
5135
type
5136
 TAVISuperIndex = packed record
5137
   fcc: FOURCC;                      // 'indx'
5138
   cb: UINT;                         // size of this structure
5139
   wLongsPerEntry: WORD;             // ==4
5140
   bIndexSubType: BYTE;              // ==0 (frame index) or AVI_INDEX_SUB_2FIELD
5141
   bIndexType: BYTE;                 // ==AVI_INDEX_OF_INDEXES
5142
   nEntriesInUse: DWORD;             // offset of next unused entry in aIndex
5143
   dwChunkId: DWORD;                 // chunk ID of chunks being indexed, (i.e. RGB8)
5144
   dwReserved: array[0..2] of DWORD; // must be 0
5145
 
5146
   aIndex: array[0..3] of record
5147
     qwOffset: LONGLONG;             // 64 bit offset to sub index chunk
5148
     dwSize: DWORD;              // 32 bit size of sub index chunk
5149
     dwDuration: DWORD;          // time span of subindex chunk (in stream ticks)
5150
   end;
5151
 end;
5152
 
5153
//#define Valid_SUPERINDEX(pi) (*(DWORD *)(&((pi)->wLongsPerEntry)) == (4 | (AVI_INDEX_OF_INDEXES << 24)))
5154
 
5155
// struct of a standard index (AVI_INDEX_OF_CHUNKS)
5156
//
5157
 
5158
 TAVIStdIndex_Entry = packed record
5159
   dwOffset: DWORD;      // 32 bit offset to data (points to data, not riff header)
5160
   dwSize: DWORD;        // 31 bit size of data (does not include size of riff header), bit 31 is deltaframe bit
5161
 end;
5162
 
5163
const
5164
  AVISTDINDEX_DELTAFRAME = $80000000; // Delta frames have the high bit set;
5165
  AVISTDINDEX_SIZEMASK = not $80000000;
5166
 
5167
type
5168
  TAVIStdIndex = packed record
5169
    fcc: FOURCC;           // 'indx' or '##ix'
5170
    cb: UINT;              // size of this structure
5171
    wLongsPerEntry: WORD;  // ==2
5172
    bIndexSubType: BYTE;   // ==0
5173
    bIndexType: BYTE;      // ==AVI_INDEX_OF_CHUNKS
5174
    nEntriesInUse: DWORD;  // offset of next unused entry in aIndex
5175
    dwChunkId: DWORD;      // chunk ID of chunks being indexed, (i.e. RGB8)
5176
    qwBaseOffset: LONGLONG;    // base offset that all index intries are relative to
5177
    dwReserved_3: DWORD;
5178
    aIndex: array[0..2043] of TAVIStdIndex_Entry;
5179
  end;
5180
 
5181
// struct of a time variant standard index (AVI_INDEX_OF_TIMED_CHUNKS)
5182
//
5183
  TAVITimedIndex_Entry = packed record
5184
    dwOffset: DWORD;     // 32 bit offset to data (points to data, not riff header)
5185
    dwSize: DWORD;       // 31 bit size of data (does not include size of riff header) (high bit is deltaframe bit)
5186
    dwDuration: DWORD;   // how much time the chunk should be played (in stream ticks)
5187
  end;
5188
 
5189
  TAVITimedIndex = packed record
5190
    fcc: FOURCC;           // 'indx' or '##ix'
5191
    cb: UINT;              // size of this structure
5192
    wLongsPerEntry: WORD;  // ==3
5193
    bIndexSubType: BYTE;   // ==0
5194
    bIndexType: BYTE;      // ==AVI_INDEX_OF_TIMED_CHUNKS
5195
    nEntriesInUse: DWORD;  // offset of next unused entry in aIndex
5196
    dwChunkId: DWORD;      // chunk ID of chunks being indexed, (i.e. RGB8)
5197
    qwBaseOffset: LONGLONG;    // base offset that all index intries are relative to
5198
    dwReserved_3: DWORD;   // must be 0
5199
    aIndex: array[0..1361] of TAVITimedIndex_Entry;
5200
    adwTrailingFill: array[0..2733] of DWORD; // to align struct to correct size
5201
  end;
5202
 
5203
// structure of a timecode stream
5204
//
5205
  TAVITimeCodeIndex = packed record
5206
    fcc: FOURCC;                      // 'indx' or '##ix'
5207
    cb: UINT;                         // size of this structure
5208
    wLongsPerEntry: WORD;             // ==4
5209
    bIndexSubType: BYTE;              // ==0
5210
    bIndexType: BYTE;                 // ==AVI_INDEX_IS_DATA
5211
    nEntriesInUse: DWORD;             // offset of next unused entry in aIndex
5212
    dwChunkId: DWORD;                 // 'time'
5213
    dwReserved: array[0..2] of DWORD; // must be 0
5214
    aIndex: array[0..0] of TTimeCodeData;
5215
    //TIMECODEDATA aIndex[NUMINDEX(sizeof(TIMECODEDATA)/sizeof(LONG))];
5216
  end;
5217
 
5218
// structure of a timecode discontinuity list (when wLongsPerEntry == 7)
5219
//
5220
  TAVITcdlIndex_Entry = packed record
5221
    dwTick: DWORD;             // stream tick time that maps to this timecode value
5222
    time: TTimeCode;
5223
    dwSMPTEflags: DWORD;
5224
    dwUser: DWORD;
5225
    szReelId: array[0..11] of Char;
5226
  end;
5227
 
5228
  TAVITcdlIndex = packed record
5229
    fcc: FOURCC;                      // 'indx' or '##ix'
5230
    cb: UINT;                         // size of this structure
5231
    wLongsPerEntry: WORD;             // ==7 (must be 4 or more all 'tcdl' indexes
5232
    bIndexSubType: BYTE;              // ==0
5233
    bIndexType: BYTE;                 // ==AVI_INDEX_IS_DATA
5234
    nEntriesInUse: DWORD;             // offset of next unused entry in aIndex
5235
    dwChunkId: DWORD;                 // 'tcdl'
5236
    dwReserved: array[0..2] of DWORD; // must be 0
5237
    aIndex: array[0..583] of TAVITcdlIndex_Entry;
5238
    adwTrailingFill: array[0..3511] of DWORD;  // to align struct to correct size
5239
  end;
5240
 
5241
  TAVIFieldIndex_Chunk = packed record
5242
    fcc: FOURCC;            // 'ix##'
5243
    cb: DWORD;              // size of this structure
5244
    wLongsPerEntry: WORD;   // must be 3 (size of each entry in
5245
                            // aIndex array)
5246
    bIndexSubType: BYTE;    // AVI_INDEX_2FIELD
5247
    bIndexType: BYTE;       // AVI_INDEX_OF_CHUNKS
5248
    nEntriesInUse: DWORD;   //
5249
    dwChunkId: DWORD;       // '##dc' or '##db'
5250
    qwBaseOffset: LONGLONG; // offsets in aIndex array are relative to this
5251
    dwReserved3: DWORD;     // must be 0
5252
 
5253
    aIndex: array[0..0] of packed record
5254
      dwOffset: DWORD;
5255
      dwSize: DWORD;          // size of all fields
5256
      dwOffsetField2: DWORD;  // (bit 31 set for NON-keyframes)
5257
    end;                      // offset to second field
5258
  end;
5259
 
5260
(*==========================================================================;
5261
 *
5262
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
5263
 *
5264
 *  File:       evcode.h
5265
 *
5266
 ***************************************************************************)
5267
 
5268
const
5269
//
5270
// list of standard Quartz event codes and the expected params
5271
//
5272
 
5273
// Event codes are broken into two groups
5274
//   -- system event codes
5275
//   -- extension event codes
5276
// All system event codes are below EC_USER
5277
 
5278
  EC_SYSTEMBASE                        = $00;
5279
  EC_USER                              = $8000;
5280
 
5281
 
5282
// System-defined event codes
5283
// ==========================
5284
//
5285
// There are three types of system-defined event codes:
5286
//
5287
// 1.  Those which are always passed through to the application
5288
//     (To be collected by calls to GetEvent or within WaitForCompletion.)
5289
//     (e.g. EC_ERRORABORT, EC_USERABORT.)
5290
//
5291
// 2.  Those which are pure internal and will never be passed to
5292
//     the application.  (e.g. EC_SHUTDOWN)
5293
//
5294
// 3.  Those which have default handling.  Default handing implies that
5295
//     the event is not passed to the application.  However, default
5296
//     handling may be canceled by calling
5297
//     IMediaEvent::CancelDefaultHandling.  If the default handling is
5298
//     cancelled in this way, then the message will be delivered to the
5299
//     application and the application must action it appropriately.
5300
//     Default handling can be restored by calling RestoreDefaultHandling.
5301
//
5302
// We will refer to these events as application, internal and defaulted
5303
// events respectively.
5304
//
5305
// System-defined events may have interface pointers, BSTR's, etc passed
5306
// as parameters.  It is therefore essential that, for any message
5307
// retrieved using GetEvent, a matching call to FreeEventParams is made
5308
// to ensure that relevant interfaces are released and storage freed.
5309
// Failure to call FreeEventParams will result in memory leaks, if not
5310
// worse.
5311
//
5312
// Filters sending these messages to the filter graph should not AddRef()
5313
// any interfaces that they may pass as parameters.  The filter graph
5314
// manager will AddRef them if required.  E.g. if the event is to be queued
5315
// for the application or queued to a worker thread.
5316
 
5317
// Each event listed below is immediately followed by a parameter list
5318
// detailing the types of the parameters associated with the message,
5319
// and an indication of whether the message is an application, internal
5320
// or defaulted message.  This is then followed by a short description.
5321
// The use of "void" in the parameter list implies that the parameter is not
5322
// used.  Such parameters should be zero.
5323
 
5324
 
5325
 
5326
  EC_COMPLETE                          = $01;
5327
// ( HResult, void ) : defaulted (special)
5328
// Signals the completed playback of a stream within the graph.  This message
5329
// is sent by renderers when they receive end-of-stream.  The default handling
5330
// of this message results in a _SINGLE_ EC_COMPLETE being sent to the
5331
// application when ALL of the individual renderers have signaled EC_COMPLETE
5332
// to the filter graph.  If the default handing is canceled, the application
5333
// will see all of the individual EC_COMPLETEs.
5334
 
5335
 
5336
  EC_USERABORT                         = $02;
5337
// ( void, void ) : application
5338
// In some sense, the user has requested that playback be terminated.
5339
// This message is typically sent by renderers that render into a
5340
// window if the user closes the window into which it was rendering.
5341
// It is up to the application to decide if playback should actually
5342
// be stopped.
5343
 
5344
 
5345
  EC_ERRORABORT                        = $03;
5346
// ( HResult, void ) : application
5347
// Operation aborted because of error
5348
 
5349
 
5350
  EC_TIME                              = $04;
5351
// ( DWORD, DWORD ) : application
5352
// The requested reference time occurred.  (This event is currently not used).
5353
// lParam1 is low dword of ref time, lParam2 is high dword of TRefTime.
5354
 
5355
 
5356
  EC_REPAINT                           = $05;
5357
// ( IPin * (could be NULL), void ) : defaulted
5358
// A repaint is required - lParam1 contains the (IPin *) that needs the data
5359
// to be sent again. Default handling is: if the output pin which the IPin is
5360
// attached  to supports the IMediaEventSink interface then it will be called
5361
// with the EC_REPAINT first.  If that fails then normal repaint processing is
5362
// done by the filter graph.
5363
 
5364
 
5365
// Stream error notifications
5366
  EC_STREAM_ERROR_STOPPED              = $06;
5367
  EC_STREAM_ERROR_STILLPLAYING         = $07;
5368
// ( HResult, DWORD ) : application
5369
// lParam 1 is major code, lParam2 is minor code, either may be zero.
5370
 
5371
 
5372
  EC_ERROR_STILLPLAYING                = $08;
5373
// ( HResult, void ) : application
5374
// The filter graph manager may issue Run's to the graph asynchronously.
5375
// If such a Run fails, EC_ERROR_STILLPLAYING is issued to notify the
5376
// application of the failure.  The state of the underlying filters
5377
// at such a time will be indeterminate - they will all have been asked
5378
// to run, but some are almost certainly not.
5379
 
5380
 
5381
  EC_PALETTE_CHANGED                   = $09;
5382
// ( void, void ) : application
5383
// notify application that the video palette has changed
5384
 
5385
 
5386
  EC_VIDEO_SIZE_CHANGED                = $0A;
5387
// ( DWORD, void ) : application
5388
// Sent by video renderers.
5389
// Notifies the application that the native video size has changed.
5390
// LOWORD of the DWORD is the new width, HIWORD is the new height.
5391
 
5392
 
5393
  EC_QUALITY_CHANGE                    = $0B;
5394
// ( void, void ) : application
5395
// Notify application that playback degradation has occurred
5396
 
5397
 
5398
  EC_SHUTTING_DOWN                     = $0C;
5399
// ( void, void ) : internal
5400
// This message is sent by the filter graph manager to any plug-in
5401
// distributors which support IMediaEventSink to notify them that
5402
// the filter graph is starting to shutdown.
5403
 
5404
 
5405
  EC_CLOCK_CHANGED                     = $0D;
5406
// ( void, void ) : application
5407
// Notify application that the clock has changed.
5408
// (i.e. SetSyncSource has been called on the filter graph and has been
5409
// distributed successfully to the filters in the graph.)
5410
 
5411
 
5412
  EC_OPENING_FILE                            = $10;
5413
  EC_BUFFERING_DATA                    = $11;
5414
// ( BOOL, void ) : application
5415
// lParam1 == 1   --> starting to open file or buffer data
5416
// lParam1 == 0   --> not opening or buffering any more
5417
// (This event does not appear to be used by ActiveMovie.)
5418
 
5419
 
5420
  EC_FULLSCREEN_LOST                   = $12;
5421
// ( void, IBaseFilter * ) : application
5422
// Sent by full screen renderers when switched away from full screen.
5423
// IBaseFilter may be NULL.
5424
 
5425
 
5426
  EC_ACTIVATE                          = $13;
5427
// ( BOOL, IBaseFilter * ) : internal
5428
// Sent by video renderers when they lose or gain activation.
5429
// lParam1 is set to 1 if gained or 0 if lost
5430
// lParam2 is the IBaseFilter* for the filter that is sending the message
5431
// Used for sound follows focus and full-screen switching
5432
 
5433
 
5434
  EC_NEED_RESTART                      = $14;
5435
// ( void, void ) : defaulted
5436
// Sent by renderers when they regain a resource (e.g. audio renderer).
5437
// Causes a restart by Pause/put_Current/Run (if running).
5438
 
5439
 
5440
  EC_WINDOW_DESTROYED                  = $15;
5441
// ( IBaseFilter *, void ) : internal
5442
// Sent by video renderers when the window has been destroyed. Handled
5443
// by the filter graph / distributor telling the resource manager.
5444
// lParam1 is the IBaseFilter* of the filter whose window is being destroyed
5445
 
5446
 
5447
  EC_DISPLAY_CHANGED                   = $16;
5448
// ( IPin *, void ) : internal
5449
// Sent by renderers when they detect a display change. the filter graph
5450
// will arrange for the graph to be stopped and the pin send in lParam1
5451
// to be reconnected. by being reconnected it allows a renderer to reset
5452
// and connect with a more appropriate format for the new display mode
5453
// lParam1 contains an (IPin *) that should be reconnected by the graph
5454
 
5455
 
5456
  EC_STARVATION                        = $17;
5457
// ( void, void ) : defaulted
5458
// Sent by a filter when it detects starvation. Default handling (only when
5459
// running) is for the graph to be paused until all filters enter the
5460
// paused state and then run. Normally this would be sent by a parser or source
5461
// filter when too little data is arriving.
5462
 
5463
 
5464
  EC_OLE_EVENT                       = $18;
5465
// ( BSTR, BSTR ) : application
5466
// Sent by a filter to pass a text string to the application.
5467
// Conventionally, the first string is a type, and the second a parameter.
5468
 
5469
 
5470
  EC_NOTIFY_WINDOW                     = $19;
5471
// ( HWND, void ) : internal
5472
// Pass the window handle around during pin connection.
5473
 
5474
  EC_STREAM_CONTROL_STOPPED          = $1A;
5475
// ( IPin * pSender, DWORD dwCookie )
5476
// Notification that an earlier call to IAMStreamControl::StopAt
5477
// has now take effect.  Calls to the method can be marked
5478
// with a cookie which is passed back in the second parameter,
5479
// allowing applications to easily tie together request
5480
// and completion notifications.
5481
//
5482
// NB: IPin will point to the pin that actioned the Stop.  This
5483
// may not be the pin that the StopAt was sent to.
5484
 
5485
  EC_STREAM_CONTROL_STARTED          = $1B;
5486
// ( IPin * pSender, DWORD dwCookie )
5487
// Notification that an earlier call to IAMStreamControl::StartAt
5488
// has now take effect.  Calls to the method can be marked
5489
// with a cookie which is passed back in the second parameter,
5490
// allowing applications to easily tie together request
5491
// and completion notifications.
5492
//
5493
// NB: IPin will point to the pin that actioned the Start.  This
5494
// may not be the pin that the StartAt was sent to.
5495
 
5496
  EC_END_OF_SEGMENT                    = $1C;
5497
//
5498
// ( const REFERENCE_TIME *pStreamTimeAtEndOfSegment, DWORD dwSegmentNumber )
5499
//
5500
// pStreamTimeAtEndOfSegment
5501
//     pointer to the accumulated stream clock
5502
//     time since the start of the segment - this is directly computable
5503
//     as the sum of the previous and current segment durations (Stop - Start)
5504
//     and the rate applied to each segment
5505
//     The source add this time to the time within each segment to get
5506
//     a total elapsed time
5507
//
5508
// dwSegmentNumber
5509
//     Segment number - starts at 0
5510
//
5511
// Notifies that a segment end has been reached when the
5512
// AM_SEEKING_Segment flags was set for IMediaSeeking::SetPositions
5513
// Passes in an IMediaSeeking interface to allow the next segment
5514
// to be defined by the application
5515
 
5516
  EC_SEGMENT_STARTED                   = $1D;
5517
//
5518
// ( const REFERENCE_TIME *pStreamTimeAtStartOfSegment, DWORD dwSegmentNumber)
5519
//
5520
// pStreamTimeAtStartOfSegment
5521
//     pointer to the accumulated stream clock
5522
//     time since the start of the segment - this is directly computable
5523
//     as the sum of the previous segment durations (Stop - Start)
5524
//     and the rate applied to each segment
5525
//
5526
// dwSegmentNumber
5527
//     Segment number - starts at 0
5528
//
5529
// Notifies that a new segment has been started.
5530
// This is sent synchronously by any entity that will issue
5531
// EC_END_OF_SEGMENT when a new segment is started
5532
// (See IMediaSeeking::SetPositions - AM_SEEKING_Segment flag)
5533
// It is used to compute how many EC_END_OF_SEGMENT notifications
5534
// to expect at the end of a segment and as a consitency check
5535
 
5536
  EC_LENGTH_CHANGED                   = $1E;
5537
 
5538
(*==========================================================================;
5539
 *
5540
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
5541
 *
5542
 *  File:       uuids.h
5543
 *
5544
 ***************************************************************************)
5545
 
5546
const
5547
 
5548
// -- to allow consistent labeling of Media types and subtypes --
5549
  // ?? GUID_NULL ??
5550
  MEDIATYPE_NULL: TGUID = (D1:$00000000;D2:$0000;D3:$0000;D4:($00,$00,$00,$00,$00,$00,$00,$00));
5551
  MEDIASUBTYPE_NULL: TGUID = (D1:$00000000;D2:$0000;D3:$0000;D4:($00,$00,$00,$00,$00,$00,$00,$00));
5552
 
5553
// -- Use this subtype if you don't have a use for a subtype for your type
5554
  MEDIASUBTYPE_None: TGUID = (D1:$E436EB8E;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5555
 
5556
// -- major types ---
5557
  MEDIATYPE_Video: TGUID = (D1:$73646976;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5558
  MEDIATYPE_Audio: TGUID = (D1:$73647561;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5559
  MEDIATYPE_Text: TGUID = (D1:$73747874;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5560
  MEDIATYPE_Midi: TGUID = (D1:$7364696D;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5561
  MEDIATYPE_Stream: TGUID = (D1:$E436EB83;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5562
  MEDIATYPE_Interleaved: TGUID = (D1:$73766169;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5563
  MEDIATYPE_File: TGUID = (D1:$656C6966;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5564
  MEDIATYPE_ScriptCommand: TGUID = (D1:$73636D64;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5565
  MEDIATYPE_AUXLine21Data: TGUID = (D1:$670AEA80;D2:$3A82;D3:$11D0;D4:($B7,$9B,$00,$AA,$00,$37,$67,$A7));
5566
  MEDIATYPE_Timecode: TGUID = (D1:$0482DEE3;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5567
 
5568
// -- sub types ---
5569
  MEDIASUBTYPE_YVU9: TGUID = (D1:$39555659;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5570
  MEDIASUBTYPE_Y411: TGUID = (D1:$31313459;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5571
  MEDIASUBTYPE_Y41P: TGUID = (D1:$50313459;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5572
  MEDIASUBTYPE_YUY2: TGUID = (D1:$32595559;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5573
  MEDIASUBTYPE_YVYU: TGUID = (D1:$55595659;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5574
  MEDIASUBTYPE_UYVY: TGUID = (D1:$59565955;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5575
  MEDIASUBTYPE_Y211: TGUID = (D1:$31313259;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5576
  MEDIASUBTYPE_YV12: TGUID = (D1:$32315659;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5577
  MEDIASUBTYPE_CLJR: TGUID = (D1:$524A4C43;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5578
  MEDIASUBTYPE_IF09: TGUID = (D1:$39304649;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5579
  MEDIASUBTYPE_CPLA: TGUID = (D1:$414C5043;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5580
  MEDIASUBTYPE_MJPG: TGUID = (D1:$47504A4D;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5581
  MEDIASUBTYPE_TVMJ: TGUID = (D1:$4A4D5654;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5582
  MEDIASUBTYPE_WAKE: TGUID = (D1:$454B4157;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5583
  MEDIASUBTYPE_CFCC: TGUID = (D1:$43434643;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5584
  MEDIASUBTYPE_IJPG: TGUID = (D1:$47504A49;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5585
  MEDIASUBTYPE_Plum: TGUID = (D1:$6D756C50;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5586
  MEDIASUBTYPE_DVCS: TGUID = (D1:$53435644;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5587
  MEDIASUBTYPE_DVSD: TGUID = (D1:$44535644;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5588
  MEDIASUBTYPE_MDVF: TGUID = (D1:$4656444D;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5589
  MEDIASUBTYPE_RGB1: TGUID = (D1:$E436EB78;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5590
  MEDIASUBTYPE_RGB4: TGUID = (D1:$E436EB79;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5591
  MEDIASUBTYPE_RGB8: TGUID = (D1:$E436EB7A;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5592
  MEDIASUBTYPE_RGB565: TGUID = (D1:$E436EB7B;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5593
  MEDIASUBTYPE_RGB555: TGUID = (D1:$E436EB7C;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5594
  MEDIASUBTYPE_RGB24: TGUID = (D1:$E436EB7D;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5595
  MEDIASUBTYPE_RGB32: TGUID = (D1:$E436EB7E;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5596
  MEDIASUBTYPE_Overlay: TGUID = (D1:$E436EB7F;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5597
  MEDIASUBTYPE_MPEG1Packet: TGUID = (D1:$E436EB80;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5598
  MEDIASUBTYPE_MPEG1Payload: TGUID = (D1:$E436EB81;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5599
  MEDIASUBTYPE_MPEG1AudioPayload: TGUID = (D1:$00000050;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5600
  MEDIATYPE_MPEG1SystemStream: TGUID = (D1:$E436EB82;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5601
  MEDIASUBTYPE_MPEG1System: TGUID = (D1:$E436EB84;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5602
  MEDIASUBTYPE_MPEG1VideoCD: TGUID = (D1:$E436EB85;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5603
  MEDIASUBTYPE_MPEG1Video: TGUID = (D1:$E436EB86;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5604
  MEDIASUBTYPE_MPEG1Audio: TGUID = (D1:$E436EB87;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5605
  MEDIASUBTYPE_Avi: TGUID = (D1:$E436EB88;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5606
  MEDIASUBTYPE_QTMovie: TGUID = (D1:$E436EB89;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5607
  MEDIASUBTYPE_QTRpza: TGUID = (D1:$617A7072;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5608
  MEDIASUBTYPE_QTSmc: TGUID = (D1:$20636D73;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5609
  MEDIASUBTYPE_QTRle: TGUID = (D1:$20656C72;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5610
  MEDIASUBTYPE_QTJpeg: TGUID = (D1:$6765706A;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5611
  MEDIASUBTYPE_PCMAudio_Obsolete: TGUID = (D1:$E436EB8A;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5612
  MEDIASUBTYPE_PCM: TGUID = (D1:$00000001;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5613
  MEDIASUBTYPE_WAVE: TGUID = (D1:$E436EB8B;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5614
  MEDIASUBTYPE_AU: TGUID = (D1:$E436EB8C;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5615
  MEDIASUBTYPE_AIFF: TGUID = (D1:$E436EB8D;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5616
  MEDIASUBTYPE_dvsd_: TGUID = (D1:$64737664;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5617
  MEDIASUBTYPE_dvhd: TGUID = (D1:$64687664;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5618
  MEDIASUBTYPE_dvsl: TGUID = (D1:$6C737664;D2:$0000;D3:$0010;D4:($80,$00,$00,$AA,$00,$38,$9B,$71));
5619
  MEDIASUBTYPE_Line21_BytePair: TGUID = (D1:$6E8D4A22;D2:$310C;D3:$11D0;D4:($B7,$9A,$00,$AA,$00,$37,$67,$A7));
5620
  MEDIASUBTYPE_Line21_GOPPacket: TGUID = (D1:$6E8D4A23;D2:$310C;D3:$11D0;D4:($B7,$9A,$00,$AA,$00,$37,$67,$A7));
5621
  MEDIASUBTYPE_Line21_VBIRawData: TGUID = (D1:$6E8D4A24;D2:$310C;D3:$11D0;D4:($B7,$9A,$00,$AA,$00,$37,$67,$A7));
5622
  MEDIASUBTYPE_DssVideo: TGUID = (D1:$A0AF4F81;D2:$E163;D3:$11D0;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5623
  MEDIASUBTYPE_DssAudio: TGUID = (D1:$A0AF4F82;D2:$E163;D3:$11D0;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5624
  MEDIASUBTYPE_VPVideo: TGUID = (D1:$5A9B6A40;D2:$1A22;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5625
  MEDIASUBTYPE_VPVBI: TGUID = (D1:$5A9B6A41;D2:$1A22;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5626
 
5627
// the cutlist source filter
5628
  CLSID_SimpleCutList: TGUID = (D1:$A5EA8D30;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
5629
  CLSID_VideoFileClip: TGUID = (D1:$A5EA8D31;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
5630
  CLSID_AudioFileClip: TGUID = (D1:$A5EA8D32;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
5631
  CLSID_CutListCacheMemory: TGUID = (D1:$A5EA8D33;D2:$253D;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
5632
 
5633
 
5634
// end cut list stuff
5635
  CLSID_CaptureGraphBuilder: TGUID = (D1:$BF87B6E0;D2:$8C27;D3:$11D0;D4:($B3,$F0,$00,$AA,$00,$37,$61,$C5));
5636
  CLSID_ProtoFilterGraph: TGUID = (D1:$E436EBB0;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5637
  CLSID_SystemClock: TGUID = (D1:$E436EBB1;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5638
  CLSID_FilterMapper: TGUID = (D1:$E436EBB2;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5639
  CLSID_FilterGraph: TGUID = (D1:$E436EBB3;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5640
  CLSID_FilterGraphNoThread: TGUID = (D1:$E436EBB8;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5641
  CLSID_MPEG1Doc: TGUID = (D1:$E4BBD160;D2:$4269;D3:$11CE;D4:($83,$8D,$00,$AA,$00,$55,$59,$5A));
5642
  CLSID_FileSource: TGUID = (D1:$701722E0;D2:$8AE3;D3:$11CE;D4:($A8,$5C,$00,$AA,$00,$2F,$EA,$B5));
5643
  CLSID_MPEG1PacketPlayer: TGUID = (D1:$26C25940;D2:$4CA9;D3:$11CE;D4:($A8,$28,$00,$AA,$00,$2F,$EA,$B5));
5644
  CLSID_MPEG1Splitter: TGUID = (D1:$336475D0;D2:$942A;D3:$11CE;D4:($A8,$70,$00,$AA,$00,$2F,$EA,$B5));
5645
  CLSID_CMpegVideoCodec: TGUID = (D1:$FEB50740;D2:$7BEF;D3:$11CE;D4:($9B,$D9,$00,$00,$E2,$02,$59,$9C));
5646
  CLSID_CMpegAudioCodec: TGUID = (D1:$4A2286E0;D2:$7BEF;D3:$11CE;D4:($9B,$D9,$00,$00,$E2,$02,$59,$9C));
5647
  CLSID_TextRender: TGUID = (D1:$E30629D3;D2:$27E5;D3:$11CE;D4:($87,$5D,$00,$60,$8C,$B7,$80,$66));
5648
 
5649
  CLSID_InfTee: TGUID = (D1:$F8388A40;D2:$D5BB;D3:$11D0;D4:($BE,$5A,$00,$80,$C7,$06,$56,$8E));
5650
  CLSID_AviSplitter: TGUID = (D1:$1B544C20;D2:$FD0B;D3:$11CE;D4:($8C,$63,$00,$AA,$00,$44,$B5,$1E));
5651
  CLSID_AviReader: TGUID = (D1:$1B544C21;D2:$FD0B;D3:$11CE;D4:($8C,$63,$00,$AA,$00,$44,$B5,$1E));
5652
  CLSID_VfwCapture: TGUID = (D1:$1B544C22;D2:$FD0B;D3:$11CE;D4:($8C,$63,$00,$AA,$00,$44,$B5,$1E));
5653
  CLSID_CaptureProperties: TGUID = (D1:$1B544C22;D2:$FD0B;D3:$11CE;D4:($8C,$63,$00,$AA,$00,$44,$B5,$1F));
5654
  CLSID_FGControl: TGUID = (D1:$E436EBB4;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5655
  CLSID_MOVReader: TGUID = (D1:$44584800;D2:$F8EE;D3:$11CE;D4:($B2,$D4,$00,$DD,$01,$10,$1B,$85));
5656
  CLSID_AVIDoc: TGUID = (D1:$D3588AB0;D2:$0781;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
5657
  CLSID_AVIDocWriter: TGUID = (D1:$D3588AB1;D2:$0781;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
5658
  CLSID_VideoRenderer: TGUID = (D1:$70E102B0;D2:$5556;D3:$11CE;D4:($97,$C0,$00,$AA,$00,$55,$59,$5A));
5659
  CLSID_Colour: TGUID = (D1:$1643E180;D2:$90F5;D3:$11CE;D4:($97,$D5,$00,$AA,$00,$55,$59,$5A));
5660
  CLSID_Dither: TGUID = (D1:$1DA08500;D2:$9EDC;D3:$11CF;D4:($BC,$10,$00,$AA,$00,$AC,$74,$F6));
5661
  CLSID_ModexRenderer: TGUID = (D1:$07167665;D2:$5011;D3:$11CF;D4:($BF,$33,$00,$AA,$00,$55,$59,$5A));
5662
  CLSID_AudioRender: TGUID = (D1:$E30629D1;D2:$27E5;D3:$11CE;D4:($87,$5D,$00,$60,$8C,$B7,$80,$66));
5663
  CLSID_AudioProperties: TGUID = (D1:$05589FAF;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5664
 
5665
  CLSID_DSoundRender: TGUID = (D1:$79376820;D2:$07D0;D3:$11CF;D4:($A2,$4D,$00,$20,$AF,$D7,$97,$67));
5666
  CLSID_AudioRecord: TGUID = (D1:$E30629D2;D2:$27E5;D3:$11CE;D4:($87,$5D,$00,$60,$8C,$B7,$80,$66));
5667
  CLSID_AVIDec: TGUID = (D1:$CF49D4E0;D2:$1115;D3:$11CE;D4:($B0,$3A,$00,$20,$AF,$0B,$A7,$70));
5668
  CLSID_ACMWrapper: TGUID = (D1:$6A08CF80;D2:$0E18;D3:$11CF;D4:($A2,$4D,$00,$20,$AF,$D7,$97,$67));
5669
  CLSID_AsyncReader: TGUID = (D1:$E436EBB5;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5670
  CLSID_URLReader: TGUID = (D1:$E436EBB6;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5671
  CLSID_PersistMonikerPID: TGUID = (D1:$E436EBB7;D2:$524F;D3:$11CE;D4:($9F,$53,$00,$20,$AF,$0B,$A7,$70));
5672
  CLSID_AMovie: TGUID = (D1:$5F2759C0;D2:$7685;D3:$11CF;D4:($8B,$23,$00,$80,$5F,$6C,$EF,$60));
5673
  CLSID_AVICo: TGUID = (D1:$D76E2820;D2:$1563;D3:$11CF;D4:($AC,$98,$00,$AA,$00,$4C,$0F,$A9));
5674
  CLSID_FileWriter: TGUID = (D1:$8596E5F0;D2:$0DA5;D3:$11D0;D4:($BD,$21,$00,$A0,$C9,$11,$CE,$86));
5675
 
5676
  CLSID_AviDest: TGUID = (D1:$E2510970;D2:$F137;D3:$11CE;D4:($8B,$67,$00,$AA,$00,$A3,$F1,$A6));
5677
  CLSID_AviMuxProptyPage: TGUID = (D1:$C647B5C0;D2:$157C;D3:$11D0;D4:($BD,$23,$00,$A0,$C9,$11,$CE,$86));
5678
  CLSID_AviMuxProptyPage1: TGUID = (D1:$0A9AE910;D2:$85C0;D3:$11D0;D4:($BD,$42,$00,$A0,$C9,$11,$CE,$86));
5679
  CLSID_AVIMIDIRender: TGUID = (D1:$07B65360;D2:$C445;D3:$11CE;D4:($AF,$DE,$00,$AA,$00,$6C,$14,$F4));
5680
 
5681
  CLSID_DVVideoCodec: TGUID = (D1:$B1B77C00;D2:$C3E4;D3:$11CF;D4:($AF,$79,$00,$AA,$00,$B6,$7A,$42));
5682
  CLSID_DVVideoEnc: TGUID = (D1:$13AA3650;D2:$BB6F;D3:$11D0;D4:($AF,$B9,$00,$AA,$00,$B6,$7A,$42));
5683
  CLSID_DVSplitter: TGUID = (D1:$4EB31670;D2:$9FC6;D3:$11CF;D4:($AF,$6E,$00,$AA,$00,$B6,$7A,$42));
5684
  CLSID_DVMux: TGUID = (D1:$129D7E40;D2:$C10D;D3:$11D0;D4:($AF,$B9,$00,$AA,$00,$B6,$7A,$42));
5685
  CLSID_SeekingPassThru: TGUID = (D1:$060AF76C;D2:$68DD;D3:$11D0;D4:($8F,$C1,$00,$C0,$4F,$D9,$18,$9D));
5686
  CLSID_Line21Decoder: TGUID = (D1:$6E8D4A20;D2:$310C;D3:$11D0;D4:($B7,$9A,$00,$AA,$00,$37,$67,$A7));
5687
  CLSID_OverlayMixer: TGUID = (D1:$CD8743A1;D2:$3736;D3:$11D0;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
5688
  CLSID_VBISurfaces: TGUID = (D1:$814B9800;D2:$1C88;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5689
 
5690
// pnp objects and categories
5691
  CLSID_SystemDeviceEnum: TGUID = (D1:$62BE5D10;D2:$60EB;D3:$11D0;D4:($BD,$3B,$00,$A0,$C9,$11,$CE,$86));
5692
  CLSID_CDeviceMoniker: TGUID = (D1:$4315D437;D2:$5B8C;D3:$11D0;D4:($BD,$3B,$00,$A0,$C9,$11,$CE,$86));
5693
  CLSID_VideoInputDeviceCategory: TGUID = (D1:$860BB310;D2:$5D01;D3:$11D0;D4:($BD,$3B,$00,$A0,$C9,$11,$CE,$86));
5694
  CLSID_CVidCapClassManager: TGUID = (D1:$860BB310;D2:$5D01;D3:$11D0;D4:($BD,$3B,$00,$A0,$C9,$11,$CE,$86));
5695
  CLSID_LegacyAmFilterCategory: TGUID = (D1:$083863F1;D2:$70DE;D3:$11D0;D4:($BD,$40,$00,$A0,$C9,$11,$CE,$86));
5696
  CLSID_CQzFilterClassManager: TGUID = (D1:$083863F1;D2:$70DE;D3:$11D0;D4:($BD,$40,$00,$A0,$C9,$11,$CE,$86));
5697
  CLSID_VideoCompressorCategory: TGUID = (D1:$33D9A760;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5698
  CLSID_CIcmCoClassManager: TGUID = (D1:$33D9A760;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5699
  CLSID_AudioCompressorCategory: TGUID = (D1:$33D9A761;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5700
  CLSID_CAcmCoClassManager: TGUID = (D1:$33D9A761;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5701
  CLSID_AudioInputDeviceCategory: TGUID = (D1:$33D9A762;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5702
  CLSID_CWaveinClassManager: TGUID = (D1:$33D9A762;D2:$90C8;D3:$11D0;D4:($BD,$43,$00,$A0,$C9,$11,$CE,$86));
5703
  CLSID_AudioRendererCategory: TGUID = (D1:$E0F158E1;D2:$CB04;D3:$11D0;D4:($BD,$4E,$00,$A0,$C9,$11,$CE,$86));
5704
  CLSID_CWaveOutClassManager: TGUID = (D1:$E0F158E1;D2:$CB04;D3:$11D0;D4:($BD,$4E,$00,$A0,$C9,$11,$CE,$86));
5705
  CLSID_MidiRendererCategory: TGUID = (D1:$4EFE2452;D2:$168A;D3:$11D1;D4:($BC,$76,$00,$C0,$4F,$B9,$45,$3B));
5706
  CLSID_CMidiOutClassManager: TGUID = (D1:$4EFE2452;D2:$168A;D3:$11D1;D4:($BC,$76,$00,$C0,$4F,$B9,$45,$3B));
5707
  CLSID_ActiveMovieCategories: TGUID = (D1:$DA4E3DA0;D2:$D07D;D3:$11D0;D4:($BD,$50,$00,$A0,$C9,$11,$CE,$86));
5708
  CLSID_DVDHWDecodersCategory: TGUID = (D1:$2721AE20;D2:$7E70;D3:$11D0;D4:($A5,$D6,$28,$DB,$04,$C1,$00,$00));
5709
  CLSID_FilterMapper2: TGUID = (D1:$CDA42200;D2:$BD88;D3:$11D0;D4:($BD,$4E,$00,$A0,$C9,$11,$CE,$86));
5710
  CLSID_MemoryAllocator: TGUID = (D1:$1E651CC0;D2:$B199;D3:$11D0;D4:($82,$12,$00,$C0,$4F,$C3,$2C,$45));
5711
  CLSID_MediaPropertyBag: TGUID = (D1:$CDBD8D00;D2:$C193;D3:$11D0;D4:($BD,$4E,$00,$A0,$C9,$11,$CE,$86));
5712
  CLSID_DvdGraphBuilder: TGUID = (D1:$FCC152B7;D2:$F372;D3:$11D0;D4:($8E,$00,$00,$C0,$4F,$D7,$C0,$8B));
5713
  CLSID_DVDNavigator: TGUID = (D1:$9B8C4620;D2:$2C1A;D3:$11D0;D4:($84,$93,$00,$A0,$24,$38,$AD,$48));
5714
 
5715
 
5716
// -- format types ---
5717
  FORMAT_None: TGUID = (D1:$0F6417D6;D2:$C318;D3:$11D0;D4:($A4,$3F,$00,$A0,$C9,$22,$31,$96));
5718
  FORMAT_VideoInfo: TGUID = (D1:$05589F80;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5719
  FORMAT_VideoInfo2: TGUID = (D1:$F72A76A0;D2:$EB0A;D3:$11D0;D4:($AC,$E4,$00,$00,$C0,$CC,$16,$BA));
5720
  FORMAT_WaveFormatEx: TGUID = (D1:$05589F81;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5721
  FORMAT_MPEGVideo: TGUID = (D1:$05589F82;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5722
  FORMAT_MPEGStreams: TGUID = (D1:$05589F83;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5723
  FORMAT_DvInfo: TGUID = (D1:$05589F84;D2:$C356;D3:$11CE;D4:($BF,$01,$00,$AA,$00,$55,$59,$5A));
5724
 
5725
 
5726
// -- Video related GUIDs ---
5727
  CLSID_DirectDrawProperties: TGUID = (D1:$944D4C00;D2:$DD52;D3:$11CE;D4:($BF,$0E,$00,$AA,$00,$55,$59,$5A));
5728
  CLSID_PerformanceProperties: TGUID = (D1:$59CE6880;D2:$ACF8;D3:$11CF;D4:($B5,$6E,$00,$80,$C7,$C4,$B6,$8A));
5729
  CLSID_QualityProperties: TGUID = (D1:$418AFB70;D2:$F8B8;D3:$11CE;D4:($AA,$C6,$00,$20,$AF,$0B,$99,$A3));
5730
  CLSID_VPObject: TGUID = (D1:$CE292861;D2:$FC88;D3:$11D0;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
5731
  IID_IVPObject: TGUID = (D1:$CE292862;D2:$FC88;D3:$11D0;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
5732
  IID_IVPControl: TGUID = (D1:$25DF12C1;D2:$3DE0;D3:$11D1;D4:($9E,$69,$00,$C0,$4F,$D7,$C1,$5B));
5733
  CLSID_VPVBIObject: TGUID = (D1:$814B9801;D2:$1C88;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5734
  IID_IVPVBIObject: TGUID = (D1:$814B9802;D2:$1C88;D3:$11D1;D4:($BA,$D9,$00,$60,$97,$44,$11,$1A));
5735
 
5736
 
5737
  CLSID_ModexProperties: TGUID = (D1:$0618AA30;D2:$6BC4;D3:$11CF;D4:($BF,$36,$00,$AA,$00,$55,$59,$5A));
5738
 
5739
// DV decoder property
5740
  CLSID_DVDecPropertiesPage: TGUID = (D1:$101193C0;D2:$0BFE;D3:$11D0;D4:($AF,$91,$00,$AA,$00,$B6,$7A,$42));
5741
 
5742
// DV encoder property
5743
  CLSID_DVEncPropertiesPage: TGUID = (D1:$4150F050;D2:$BB6F;D3:$11D0;D4:($AF,$B9,$00,$AA,$00,$B6,$7A,$42));
5744
 
5745
// DV Muxer property
5746
  CLSID_DVMuxPropertyPage: TGUID = (D1:$4DB880E0;D2:$C10D;D3:$11D0;D4:($AF,$B9,$00,$AA,$00,$B6,$7A,$42));
5747
 
5748
 
5749
// -- Analog video related GUIDs ---
5750
 
5751
 
5752
// -- format types ---
5753
  FORMAT_AnalogVideo: TGUID = (D1:$0482DDE0;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5754
 
5755
  MEDIATYPE_AnalogVideo: TGUID = (D1:$0482DDE1;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5756
  MEDIASUBTYPE_AnalogVideo_NTSC_M: TGUID = (D1:$0482DDE2;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5757
  MEDIASUBTYPE_AnalogVideo_PAL_B: TGUID = (D1:$0482DDE5;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5758
  MEDIASUBTYPE_AnalogVideo_PAL_D: TGUID = (D1:$0482DDE6;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5759
  MEDIASUBTYPE_AnalogVideo_PAL_G: TGUID = (D1:$0482DDE7;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5760
  MEDIASUBTYPE_AnalogVideo_PAL_H: TGUID = (D1:$0482DDE8;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5761
  MEDIASUBTYPE_AnalogVideo_PAL_I: TGUID = (D1:$0482DDE9;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5762
  MEDIASUBTYPE_AnalogVideo_PAL_M: TGUID = (D1:$0482DDEA;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5763
  MEDIASUBTYPE_AnalogVideo_PAL_N: TGUID = (D1:$0482DDEB;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5764
 
5765
// -- Analog Video subtypes, SECAM
5766
  MEDIASUBTYPE_AnalogVideo_SECAM_B: TGUID = (D1:$0482DDF0;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5767
  MEDIASUBTYPE_AnalogVideo_SECAM_D: TGUID = (D1:$0482DDF1;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5768
  MEDIASUBTYPE_AnalogVideo_SECAM_G: TGUID = (D1:$0482DDF2;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5769
  MEDIASUBTYPE_AnalogVideo_SECAM_H: TGUID = (D1:$0482DDF3;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5770
  MEDIASUBTYPE_AnalogVideo_SECAM_K: TGUID = (D1:$0482DDF4;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5771
  MEDIASUBTYPE_AnalogVideo_SECAM_K1: TGUID = (D1:$0482DDF5;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5772
  MEDIASUBTYPE_AnalogVideo_SECAM_L: TGUID = (D1:$0482DDF6;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5773
 
5774
 
5775
// --  External audio related GUIDs ---
5776
 
5777
// -- major types, Analog Audio
5778
  MEDIATYPE_AnalogAudio: TGUID = (D1:$0482DEE1;D2:$7817;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5779
 
5780
// -- Well known time format GUIDs ---
5781
  TIME_FORMAT_NONE: TGUID = (D1:$00000000;D2:$0000;D3:$0000;D4:($00,$00,$00,$00,$00,$00,$00,$00));
5782
  TIME_FORMAT_FRAME: TGUID = (D1:$7B785570;D2:$8C82;D3:$11CF;D4:($BC,$0C,$00,$AA,$00,$AC,$74,$F6));
5783
  TIME_FORMAT_BYTE: TGUID = (D1:$7B785571;D2:$8C82;D3:$11CF;D4:($BC,$0C,$00,$AA,$00,$AC,$74,$F6));
5784
  TIME_FORMAT_SAMPLE: TGUID = (D1:$7B785572;D2:$8C82;D3:$11CF;D4:($BC,$0C,$00,$AA,$00,$AC,$74,$F6));
5785
  TIME_FORMAT_FIELD: TGUID = (D1:$7B785573;D2:$8C82;D3:$11CF;D4:($BC,$0C,$00,$AA,$00,$AC,$74,$F6));
5786
  TIME_FORMAT_MEDIA_TIME: TGUID = (D1:$7B785574;D2:$8C82;D3:$11CF;D4:($BC,$0C,$00,$AA,$00,$AC,$74,$F6));
5787
 
5788
// for IKsPropertySet
5789
  AMPROPSETID_Pin: TGUID = (D1:$9B00F101;D2:$1567;D3:$11D1;D4:($B3,$F1,$00,$AA,$00,$37,$61,$C5));
5790
  PIN_CATEGORY_CAPTURE: TGUID = (D1:$FB6C4281;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5791
  PIN_CATEGORY_PREVIEW: TGUID = (D1:$FB6C4282;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5792
  PIN_CATEGORY_ANALOGVIDEOIN: TGUID = (D1:$FB6C4283;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5793
  PIN_CATEGORY_VBI: TGUID = (D1:$FB6C4284;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5794
  PIN_CATEGORY_VIDEOPORT: TGUID = (D1:$FB6C4285;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5795
  PIN_CATEGORY_NABTS: TGUID = (D1:$FB6C4286;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5796
  PIN_CATEGORY_EDS: TGUID = (D1:$FB6C4287;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5797
  PIN_CATEGORY_TELETEXT: TGUID = (D1:$FB6C4288;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5798
  PIN_CATEGORY_CC: TGUID = (D1:$FB6C4289;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5799
  PIN_CATEGORY_STILL: TGUID = (D1:$FB6C428A;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5800
  PIN_CATEGORY_TIMECODE: TGUID = (D1:$FB6C428B;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5801
  PIN_CATEGORY_VIDEOPORT_VBI: TGUID = (D1:$FB6C428C;D2:$0353;D3:$11D1;D4:($90,$5F,$00,$00,$C0,$CC,$16,$BA));
5802
 
5803
 
5804
// -------------------------------------------------------------------------
5805
// KSProxy GUIDS
5806
// -------------------------------------------------------------------------
5807
 
5808
  CLSID_TVTunerFilterPropertyPage: TGUID = (D1:$266EEE41;D2:$6C63;D3:$11CF;D4:($8A,$03,$00,$AA,$00,$6E,$CB,$65));
5809
  CLSID_CrossbarFilterPropertyPage: TGUID = (D1:$71F96461;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5810
  CLSID_TVAudioFilterPropertyPage: TGUID = (D1:$71F96463;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5811
  CLSID_VideoProcAmpPropertyPage: TGUID = (D1:$71F96464;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5812
  CLSID_CameraControlPropertyPage: TGUID = (D1:$71F96465;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5813
  CLSID_AnalogVideoDecoderPropertyPage: TGUID = (D1:$71F96466;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5814
  CLSID_VideoStreamConfigPropertyPage: TGUID = (D1:$71F96467;D2:$78F3;D3:$11D0;D4:($A1,$8C,$00,$A0,$C9,$11,$89,$56));
5815
 
5816
(*==========================================================================;
5817
 *
5818
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
5819
 *
5820
 *  File:       ksuuids.h
5821
 *
5822
 ***************************************************************************)
5823
// contains the GUIDs for the MediaType type, subtype fields and format types
5824
// for DVD/MPEG2 media types.
5825
 
5826
const
5827
  MEDIASUBTYPE_MPEG2_AUDIO: TGUID = (D1:$E06D802B;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5828
  MEDIASUBTYPE_DOLBY_AC3: TGUID = (D1:$E06D802C;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5829
  MEDIASUBTYPE_DVD_SUBPICTURE: TGUID = (D1:$E06D802D;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5830
  MEDIASUBTYPE_DVD_LPCM_AUDIO: TGUID = (D1:$E06D8032;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5831
 
5832
// DVD-related mediatypes
5833
  MEDIATYPE_DVD_ENCRYPTED_PACK: TGUID = (D1:$ED0B916A;D2:$044D;D3:$11D1;D4:($AA,$78,$00,$C0,$004F,$C3,$1D,$60));
5834
  MEDIATYPE_DVD_NAVIGATION: TGUID = (D1:$E06D802E;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5835
  MEDIASUBTYPE_DVD_NAVIGATION_PCI: TGUID = (D1:$E06D802F;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5836
  MEDIASUBTYPE_DVD_NAVIGATION_DSI: TGUID = (D1:$E06D8030;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5837
  MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER: TGUID = (D1:$E06D8031;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5838
 
5839
//
5840
// DVD - MPEG2/AC3-related Formats
5841
//
5842
 
5843
  FORMAT_MPEG2Video: TGUID = (D1:$E06D80E3;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5844
  FORMAT_DolbyAC3: TGUID = (D1:$E06D80E4;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5845
  FORMAT_MPEG2Audio: TGUID = (D1:$E06D80E5;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5846
  FORMAT_DVD_LPCMAudio: TGUID = (D1:$E06D80E6;D2:$DB46;D3:$11CF;D4:($B4,$D1,$00,$80,$005F,$6C,$BB,$EA));
5847
 
5848
//
5849
// KS Property Set Id (to communicate with the WDM Proxy filter) -- from
5850
// ksmedia.h of WDM DDK.
5851
//
5852
 
5853
  AM_KSPROPSETID_AC3: TGUID = (D1:$BFABE720;D2:$6E1F;D3:$11D0;D4:($BC,$F2,$44,$45,$53,$54,$00,$00));
5854
  AM_KSPROPSETID_DvdSubPic: TGUID = (D1:$AC390460;D2:$43AF;D3:$11D0;D4:($BD,$6A,$00,$35,$05,$C1,$03,$A9));
5855
  AM_KSPROPSETID_CopyProt: TGUID = (D1:$0E8A0A40;D2:$6AEF;D3:$11D0;D4:($9E,$D0,$00,$A0,$24,$CA,$19,$B3));
5856
  AM_KSPROPSETID_TSRateChange: TGUID = (D1:$A503C5C0;D2:$1D1D;D3:$11D1;D4:($AD,$80,$44,$45,$53,$54,$00,$00));
5857
 
5858
//
5859
// KS categories from ks.h and ksmedia.h
5860
//
5861
//
5862
 
5863
  AM_KSCATEGORY_CAPTURE: TGUID = (D1:$65E8773D;D2:$8F56;D3:$11D0;D4:($A3,$B9,$00,$A0,$C9,$22,$31,$96));
5864
  AM_KSCATEGORY_RENDER: TGUID = (D1:$65E8773E;D2:$8F56;D3:$11D0;D4:($A3,$B9,$00,$A0,$C9,$22,$31,$96));
5865
  AM_KSCATEGORY_DATACOMPRESSOR: TGUID = (D1:$1E84C900;D2:$7E70;D3:$11D0;D4:($A5,$D6,$28,$DB,$04,$C1,$00,$00));
5866
  AM_KSCATEGORY_AUDIO: TGUID = (D1:$6994AD04;D2:$93EF;D3:$11D0;D4:($A3,$CC,$00,$A0,$C9,$22,$31,$96));
5867
  AM_KSCATEGORY_VIDEO: TGUID = (D1:$6994AD05;D2:$93EF;D3:$11D0;D4:($A3,$CC,$00,$A0,$C9,$22,$31,$96));
5868
  AM_KSCATEGORY_TVTUNER: TGUID = (D1:$A799A800;D2:$A46D;D3:$11D0;D4:($A1,$8C,$00,$A0,$24,$01,$DC,$D4));
5869
  AM_KSCATEGORY_CROSSBAR: TGUID = (D1:$A799A801;D2:$A46D;D3:$11D0;D4:($A1,$8C,$00,$A0,$24,$01,$DC,$D4));
5870
  AM_KSCATEGORY_TVAUDIO: TGUID = (D1:$A799A802;D2:$A46D;D3:$11D0;D4:($A1,$8C,$00,$A0,$24,$01,$DC,$D4));
5871
 
5872
 
5873
//
5874
// guids needed to support IKsPin interface
5875
//
5876
//
5877
 
5878
  IID_IKsPin: TGUID = (D1:$B61178D1;D2:$A2D9;D3:$11CF;D4:($9E,$53,$00,$AA,$00,$A2,$16,$A1));
5879
  AM_INTERFACESETID_Standard: TGUID = (D1:$1A8766A0;D2:$62CE;D3:$11CF;D4:($A5,$D6,$28,$DB,$04,$C1,$00,$00));
5880
 
5881
implementation
5882
 
5883
const
5884
  ole32 = 'ole32.dll';
5885
  quartz = 'quartz.dll';
5886
 
5887
function QzInitialize; external ole32 name 'CoInitialize';
5888
procedure QzUninitialize; external ole32 name 'CoUninitialize';
5889
procedure QzFreeUnusedLibraries; external ole32 name 'CoFreeUnusedLibraries';
5890
 
5891
function QzGetMalloc; external ole32 name 'CoGetMalloc';
5892
function QzTaskMemAlloc; external ole32 name 'CoTaskMemAlloc';
5893
function QzTaskMemRealloc; external ole32 name 'CoTaskMemRealloc';
5894
procedure QzTaskMemFree; external ole32 name 'CoTaskMemFree';
5895
 
5896
function QzCreateFilterObject; external ole32 name 'CoCreateInstance';
5897
function QzCLSIDFromString; external ole32 name 'CLSIDFromString';
5898
function QzStringFromGUID2; external ole32 name 'StringFromGUID2';
5899
 
5900
 
5901
function AMGetErrorTextA; external quartz;
5902
function AMGetErrorTextW; external quartz;
5903
function AMGetErrorText; external quartz name 'AMGetErrorTextA';
5904
 
5905
end.
5906