Subversion Repositories spacemission

Rev

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