home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / DELPHIX.ZIP / Source / DShow.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-10-06  |  260.0 KB  |  5,914 lines

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