WMF9.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:498k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1.     (*********************************************************************
  2.      *  Windows Media Format 9 API                                       *
  3.      *                                                                   *
  4.      * home page : http://www.progdigy.com                               *
  5.      * email     : hgourvest@progdigy.com                                *
  6.      *                                                                   *
  7.      * date      : 21-02-2003                                            *
  8.      *                                                                   *
  9.      * The contents of this file are used with permission, subject to    *
  10.      * the Mozilla Public License Version 1.1 (the "License"); you may   *
  11.      * not use this file except in compliance with the License. You may  *
  12.      * obtain a copy of the License at                                   *
  13.      * http://www.mozilla.org/MPL/MPL-1.1.html                           *
  14.      *                                                                   *
  15.      * wmsdkvalidate.h, wmdxva.idl, wmnetsourcecreator.idl,              *
  16.      * wmsbuffer.idl, drmexternals.id, asferr.h, wmsysprf.h,             *
  17.      * WMSInternalAdminNetSource.idl, wmsdkidl.idl, dshowasf.idl         *
  18.      *                                                                   *
  19.      * Software distributed under the License is distributed on an       *
  20.      * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or    *
  21.      * implied. See the License for the specific language governing      *
  22.      * rights and limitations under the License.                         *
  23.      *                                                                   *
  24.      *********************************************************************)
  25. unit WMF9;
  26. interface
  27. {$I DirectX.inc}
  28. {$IFDEF DYNAMIC_LINK_ALL}
  29.   {$DEFINE WMF9_DYNAMIC_LINK}
  30. {$ENDIF}
  31. {$HPPEMIT '#include "asferr.h"'}
  32. {$HPPEMIT '#include "drmexternals.h"'}
  33. {$HPPEMIT '#include "dshowasf.h"'}
  34. {$HPPEMIT '#include "nserror.h"'}
  35. {$HPPEMIT '#include "wmdxva.h"'}
  36. {$HPPEMIT '#include "wmnetsourcecreator.h"'}
  37. {$HPPEMIT '#include "wmsbuffer.h"'}
  38. {$HPPEMIT '#include "wmsdk.h"'}
  39. {$HPPEMIT '#include "wmsdkidl.h"'}
  40. {$HPPEMIT '#include "wmsdkvalidate.h"'}
  41. {$HPPEMIT '#include "wmsinternaladminnetsource.h"'}
  42. {$HPPEMIT '#include "wmsysprf.h"'}
  43. uses Windows, ActiveX, DirectShow9;
  44. //*@@@+++@@@@******************************************************************
  45. //
  46. // Microsoft Windows Media
  47. // Copyright (C) Microsoft Corporation. All rights reserved.
  48. //
  49. //*@@@---@@@@******************************************************************
  50. const
  51.   WMProfile_V40_DialUpMBR              : TGUID = '{fd7f47f1-72a6-45a4-80f0-3aecefc32c07}';
  52.   {$EXTERNALSYM WMProfile_V40_DialUpMBR}
  53.   WMProfile_V40_IntranetMBR            : TGUID = '{82cd3321-a94a-4ffc-9c2b-092c10ca16e7}';
  54.   {$EXTERNALSYM WMProfile_V40_IntranetMBR}
  55.   WMProfile_V40_2856100MBR             : TGUID = '{5a1c2206-dc5e-4186-beb2-4c5a994b132e}';
  56.   {$EXTERNALSYM WMProfile_V40_2856100MBR}
  57.   WMProfile_V40_6VoiceAudio            : TGUID = '{D508978A-11A0-4d15-B0DA-ACDC99D4F890}';
  58.   {$EXTERNALSYM WMProfile_V40_6VoiceAudio}
  59.   WMProfile_V40_16AMRadio              : TGUID = '{0f4be81f-d57d-41e1-b2e3-2fad986bfec2}';
  60.   {$EXTERNALSYM WMProfile_V40_16AMRadio}
  61.   WMProfile_V40_288FMRadioMono         : TGUID = '{7fa57fc8-6ea4-4645-8abf-b6e5a8f814a1}';
  62.   {$EXTERNALSYM WMProfile_V40_288FMRadioMono}
  63.   WMProfile_V40_288FMRadioStereo       : TGUID = '{22fcf466-aa40-431f-a289-06d0ea1a1e40}';
  64.   {$EXTERNALSYM WMProfile_V40_288FMRadioStereo}
  65.   WMProfile_V40_56DialUpStereo         : TGUID = '{e8026f87-e905-4594-a3c7-00d00041d1d9}';
  66.   {$EXTERNALSYM WMProfile_V40_56DialUpStereo}
  67.   WMProfile_V40_64Audio                : TGUID = '{4820b3f7-cbec-41dc-9391-78598714c8e5}';
  68.   {$EXTERNALSYM WMProfile_V40_64Audio}
  69.   WMProfile_V40_96Audio                : TGUID = '{0efa0ee3-9e64-41e2-837f-3c0038f327ba}';
  70.   {$EXTERNALSYM WMProfile_V40_96Audio}
  71.   WMProfile_V40_128Audio               : TGUID = '{93ddbe12-13dc-4e32-a35e-40378e34279a}';
  72.   {$EXTERNALSYM WMProfile_V40_128Audio}
  73.   WMProfile_V40_288VideoVoice          : TGUID = '{bb2bc274-0eb6-4da9-b550-ecf7f2b9948f}';
  74.   {$EXTERNALSYM WMProfile_V40_288VideoVoice}
  75.   WMProfile_V40_288VideoAudio          : TGUID = '{ac617f2d-6cbe-4e84-8e9a-ce151a12a354}';
  76.   {$EXTERNALSYM WMProfile_V40_288VideoAudio}
  77.   WMProfile_V40_288VideoWebServer      : TGUID = '{abf2f00d-d555-4815-94ce-8275f3a70bfe}';
  78.   {$EXTERNALSYM WMProfile_V40_288VideoWebServer}
  79.   WMProfile_V40_56DialUpVideo          : TGUID = '{e21713bb-652f-4dab-99de-71e04400270f}';
  80.   {$EXTERNALSYM WMProfile_V40_56DialUpVideo}
  81.   WMProfile_V40_56DialUpVideoWebServer : TGUID = '{b756ff10-520f-4749-a399-b780e2fc9250}';
  82.   {$EXTERNALSYM WMProfile_V40_56DialUpVideoWebServer}
  83.   WMProfile_V40_100Video               : TGUID = '{8f99ddd8-6684-456b-a0a3-33e1316895f0}';
  84.   {$EXTERNALSYM WMProfile_V40_100Video}
  85.   WMProfile_V40_250Video               : TGUID = '{541841c3-9339-4f7b-9a22-b11540894e42}';
  86.   {$EXTERNALSYM WMProfile_V40_250Video}
  87.   WMProfile_V40_512Video               : TGUID = '{70440e6d-c4ef-4f84-8cd0-d5c28686e784}';
  88.   {$EXTERNALSYM WMProfile_V40_512Video}
  89.   WMProfile_V40_1MBVideo               : TGUID = '{b4482a4c-cc17-4b07-a94e-9818d5e0f13f}';
  90.   {$EXTERNALSYM WMProfile_V40_1MBVideo}
  91.   WMProfile_V40_3MBVideo               : TGUID = '{55374ac0-309b-4396-b88f-e6e292113f28}';
  92.   {$EXTERNALSYM WMProfile_V40_3MBVideo}
  93.   WMProfile_V70_DialUpMBR              : TGUID = '{5B16E74B-4068-45b5-B80E-7BF8C80D2C2F}';
  94.   {$EXTERNALSYM WMProfile_V70_DialUpMBR}
  95.   WMProfile_V70_IntranetMBR            : TGUID = '{045880DC-34B6-4ca9-A326-73557ED143F3}';
  96.   {$EXTERNALSYM WMProfile_V70_IntranetMBR}
  97.   WMProfile_V70_2856100MBR             : TGUID = '{07DF7A25-3FE2-4a5b-8B1E-348B0721CA70}';
  98.   {$EXTERNALSYM WMProfile_V70_2856100MBR}
  99.   WMProfile_V70_288VideoVoice          : TGUID = '{B952F38E-7DBC-4533-A9CA-B00B1C6E9800}';
  100.   {$EXTERNALSYM WMProfile_V70_288VideoVoice}
  101.   WMProfile_V70_288VideoAudio          : TGUID = '{58BBA0EE-896A-4948-9953-85B736F83947}';
  102.   {$EXTERNALSYM WMProfile_V70_288VideoAudio}
  103.   WMProfile_V70_288VideoWebServer      : TGUID = '{70A32E2B-E2DF-4ebd-9105-D9CA194A2D50}';
  104.   {$EXTERNALSYM WMProfile_V70_288VideoWebServer}
  105.   WMProfile_V70_56VideoWebServer       : TGUID = '{DEF99E40-57BC-4ab3-B2D1-B6E3CAF64257}';
  106.   {$EXTERNALSYM WMProfile_V70_56VideoWebServer}
  107.   WMProfile_V70_64VideoISDN            : TGUID = '{C2B7A7E9-7B8E-4992-A1A1-068217A3B311}';
  108.   {$EXTERNALSYM WMProfile_V70_64VideoISDN}
  109.   WMProfile_V70_100Video               : TGUID = '{D9F3C932-5EA9-4c6d-89B4-2686E515426E}';
  110.   {$EXTERNALSYM WMProfile_V70_100Video}
  111.   WMProfile_V70_256Video               : TGUID = '{AFE69B3A-403F-4a1b-8007-0E21CFB3DF84}';
  112.   {$EXTERNALSYM WMProfile_V70_256Video}
  113.   WMProfile_V70_384Video               : TGUID = '{F3D45FBB-8782-44df-97C6-8678E2F9B13D}';
  114.   {$EXTERNALSYM WMProfile_V70_384Video}
  115.   WMProfile_V70_768Video               : TGUID = '{0326EBB6-F76E-4964-B0DB-E729978D35EE}';
  116.   {$EXTERNALSYM WMProfile_V70_768Video}
  117.   WMProfile_V70_1500Video              : TGUID = '{0B89164A-5490-4686-9E37-5A80884E5146}';
  118.   {$EXTERNALSYM WMProfile_V70_1500Video}
  119.   WMProfile_V70_2000Video              : TGUID = '{AA980124-BF10-4e4f-9AFD-4329A7395CFF}';
  120.   {$EXTERNALSYM WMProfile_V70_2000Video}
  121.   WMProfile_V70_700FilmContentVideo    : TGUID = '{7A747920-2449-4d76-99CB-FDB0C90484D4}';
  122.   {$EXTERNALSYM WMProfile_V70_700FilmContentVideo}
  123.   WMProfile_V70_1500FilmContentVideo   : TGUID = '{F6A5F6DF-EE3F-434c-A433-523CE55F516B}';
  124.   {$EXTERNALSYM WMProfile_V70_1500FilmContentVideo}
  125.   WMProfile_V70_6VoiceAudio            : TGUID = '{EABA9FBF-B64F-49b3-AA0C-73FBDD150AD0}';
  126.   {$EXTERNALSYM WMProfile_V70_6VoiceAudio}
  127.   WMProfile_V70_288FMRadioMono         : TGUID = '{C012A833-A03B-44a5-96DC-ED95CC65582D}';
  128.   {$EXTERNALSYM WMProfile_V70_288FMRadioMono}
  129.   WMProfile_V70_288FMRadioStereo       : TGUID = '{E96D67C9-1A39-4dc4-B900-B1184DC83620}';
  130.   {$EXTERNALSYM WMProfile_V70_288FMRadioStereo}
  131.   WMProfile_V70_56DialUpStereo         : TGUID = '{674EE767-0949-4fac-875E-F4C9C292013B}';
  132.   {$EXTERNALSYM WMProfile_V70_56DialUpStereo}
  133.   WMProfile_V70_64AudioISDN            : TGUID = '{91DEA458-9D60-4212-9C59-D40919C939E4}';
  134.   {$EXTERNALSYM WMProfile_V70_64AudioISDN}
  135.   WMProfile_V70_64Audio                : TGUID = '{B29CFFC6-F131-41db-B5E8-99D8B0B945F4}';
  136.   {$EXTERNALSYM WMProfile_V70_64Audio}
  137.   WMProfile_V70_96Audio                : TGUID = '{A9D4B819-16CC-4a59-9F37-693DBB0302D6}';
  138.   {$EXTERNALSYM WMProfile_V70_96Audio}
  139.   WMProfile_V70_128Audio               : TGUID = '{C64CF5DA-DF45-40d3-8027-DE698D68DC66}';
  140.   {$EXTERNALSYM WMProfile_V70_128Audio}
  141.   WMProfile_V70_225VideoPDA            : TGUID = '{F55EA573-4C02-42b5-9026-A8260C438A9F}';
  142.   {$EXTERNALSYM WMProfile_V70_225VideoPDA}
  143.   WMProfile_V70_150VideoPDA            : TGUID = '{0F472967-E3C6-4797-9694-F0304C5E2F17}';
  144.   {$EXTERNALSYM WMProfile_V70_150VideoPDA}
  145.   WMProfile_V80_255VideoPDA            : TGUID = '{FEEDBCDF-3FAC-4c93-AC0D-47941EC72C0B}';
  146.   {$EXTERNALSYM WMProfile_V80_255VideoPDA}
  147.   WMProfile_V80_150VideoPDA            : TGUID = '{AEE16DFA-2C14-4a2f-AD3F-A3034031784F}';
  148.   {$EXTERNALSYM WMProfile_V80_150VideoPDA}
  149.   WMProfile_V80_28856VideoMBR          : TGUID = '{D66920C4-C21F-4ec8-A0B4-95CF2BD57FC4}';
  150.   {$EXTERNALSYM WMProfile_V80_28856VideoMBR}
  151.   WMProfile_V80_100768VideoMBR         : TGUID = '{5BDB5A0E-979E-47d3-9596-73B386392A55}';
  152.   {$EXTERNALSYM WMProfile_V80_100768VideoMBR}
  153.   WMProfile_V80_288100VideoMBR         : TGUID = '{D8722C69-2419-4b36-B4E0-6E17B60564E5}';
  154.   {$EXTERNALSYM WMProfile_V80_288100VideoMBR}
  155.   WMProfile_V80_288Video               : TGUID = '{3DF678D9-1352-4186-BBF8-74F0C19B6AE2}';
  156.   {$EXTERNALSYM WMProfile_V80_288Video}
  157.   WMProfile_V80_56Video                : TGUID = '{254E8A96-2612-405c-8039-F0BF725CED7D}';
  158.   {$EXTERNALSYM WMProfile_V80_56Video}
  159.   WMProfile_V80_100Video               : TGUID = '{A2E300B4-C2D4-4fc0-B5DD-ECBD948DC0DF}';
  160.   {$EXTERNALSYM WMProfile_V80_100Video}
  161.   WMProfile_V80_256Video               : TGUID = '{BBC75500-33D2-4466-B86B-122B201CC9AE}';
  162.   {$EXTERNALSYM WMProfile_V80_256Video}
  163.   WMProfile_V80_384Video               : TGUID = '{29B00C2B-09A9-48bd-AD09-CDAE117D1DA7}';
  164.   {$EXTERNALSYM WMProfile_V80_384Video}
  165.   WMProfile_V80_768Video               : TGUID = '{74D01102-E71A-4820-8F0D-13D2EC1E4872}';
  166.   {$EXTERNALSYM WMProfile_V80_768Video}
  167.   WMProfile_V80_700NTSCVideo           : TGUID = '{C8C2985F-E5D9-4538-9E23-9B21BF78F745}';
  168.   {$EXTERNALSYM WMProfile_V80_700NTSCVideo}
  169.   WMProfile_V80_1400NTSCVideo          : TGUID = '{931D1BEE-617A-4bcd-9905-CCD0786683EE}';
  170.   {$EXTERNALSYM WMProfile_V80_1400NTSCVideo}
  171.   WMProfile_V80_384PALVideo            : TGUID = '{9227C692-AE62-4f72-A7EA-736062D0E21E}';
  172.   {$EXTERNALSYM WMProfile_V80_384PALVideo}
  173.   WMProfile_V80_700PALVideo            : TGUID = '{EC298949-639B-45e2-96FD-4AB32D5919C2}';
  174.   {$EXTERNALSYM WMProfile_V80_700PALVideo}
  175.   WMProfile_V80_288MonoAudio           : TGUID = '{7EA3126D-E1BA-4716-89AF-F65CEE0C0C67}';
  176.   {$EXTERNALSYM WMProfile_V80_288MonoAudio}
  177.   WMProfile_V80_288StereoAudio         : TGUID = '{7E4CAB5C-35DC-45bb-A7C0-19B28070D0CC}';
  178.   {$EXTERNALSYM WMProfile_V80_288StereoAudio}
  179.   WMProfile_V80_32StereoAudio          : TGUID = '{60907F9F-B352-47e5-B210-0EF1F47E9F9D}';
  180.   {$EXTERNALSYM WMProfile_V80_32StereoAudio}
  181.   WMProfile_V80_48StereoAudio          : TGUID = '{5EE06BE5-492B-480a-8A8F-12F373ECF9D4}';
  182.   {$EXTERNALSYM WMProfile_V80_48StereoAudio}
  183.   WMProfile_V80_64StereoAudio          : TGUID = '{09BB5BC4-3176-457f-8DD6-3CD919123E2D}';
  184.   {$EXTERNALSYM WMProfile_V80_64StereoAudio}
  185.   WMProfile_V80_96StereoAudio          : TGUID = '{1FC81930-61F2-436f-9D33-349F2A1C0F10}';
  186.   {$EXTERNALSYM WMProfile_V80_96StereoAudio}
  187.   WMProfile_V80_128StereoAudio         : TGUID = '{407B9450-8BDC-4ee5-88B8-6F527BD941F2}';
  188.   {$EXTERNALSYM WMProfile_V80_128StereoAudio}
  189.   WMProfile_V80_288VideoOnly           : TGUID = '{8C45B4C7-4AEB-4f78-A5EC-88420B9DADEF}';
  190.   {$EXTERNALSYM WMProfile_V80_288VideoOnly}
  191.   WMProfile_V80_56VideoOnly            : TGUID = '{6E2A6955-81DF-4943-BA50-68A986A708F6}';
  192.   {$EXTERNALSYM WMProfile_V80_56VideoOnly}
  193.   WMProfile_V80_FAIRVBRVideo           : TGUID = '{3510A862-5850-4886-835F-D78EC6A64042}';
  194.   {$EXTERNALSYM WMProfile_V80_FAIRVBRVideo}
  195.   WMProfile_V80_HIGHVBRVideo           : TGUID = '{0F10D9D3-3B04-4fb0-A3D3-88D4AC854ACC}';
  196.   {$EXTERNALSYM WMProfile_V80_HIGHVBRVideo}
  197.   WMProfile_V80_BESTVBRVideo           : TGUID = '{048439BA-309C-440e-9CB4-3DCCA3756423}';
  198.   {$EXTERNALSYM WMProfile_V80_BESTVBRVideo}
  199. //*@@@+++@@@@******************************************************************
  200. //
  201. // Microsoft Windows Media
  202. // Copyright (C) Microsoft Corporation. All rights reserved.
  203. //
  204. //*@@@---@@@@******************************************************************
  205. //
  206. //import "mediaobj.idl";
  207. //import "videoacc.idl"; // IAMVideoAccelerator
  208. const
  209.   IID_IWMPlayerTimestampHook     : TGUID = '{28580dda-d98e-48d0-b7ae-69e473a02825}';
  210.   {$EXTERNALSYM IID_IWMPlayerTimestampHook}
  211.   IID_IWMCodecVideoAccelerator   : TGUID = '{990641b0-739f-4e94-a808-9888da8f75af}';
  212.   {$EXTERNALSYM IID_IWMCodecVideoAccelerator}
  213.   IID_IWMCodecAMVideoAccelerator : TGUID = '{d98ee251-34e0-4a2d-9312-9b4c788d9fa1}';
  214.   {$EXTERNALSYM IID_IWMCodecAMVideoAccelerator}
  215. type
  216. // Implemented by the player            
  217.   {$HPPEMIT 'typedef System::DelphiInterface<IWMPlayerTimestampHook> _di_IWMPlayerTimestampHook;'}
  218.   {$EXTERNALSYM IWMPlayerTimestampHook}
  219.   IWMPlayerTimestampHook = interface(IUnknown)
  220.   ['{28580dda-d98e-48d0-b7ae-69e473a02825}']
  221.   (*** IWMPlayerTimestampHook methods ***)
  222.     function MapTimestamp(rtIn: TReferenceTime;
  223.       out prtOut: TReferenceTime): HRESULT; stdcall;
  224.   end;
  225. // Implemeted by video decoder DMOs for DXVA support
  226.   {$HPPEMIT 'typedef System::DelphiInterface<IWMCodecAMVideoAccelerator> _di_IWMCodecAMVideoAccelerator;'}
  227.   {$EXTERNALSYM IWMCodecAMVideoAccelerator}
  228.   IWMCodecAMVideoAccelerator = interface(IUnknown)
  229.   ['{d98ee251-34e0-4a2d-9312-9b4c788d9fa1}']
  230.   (*** IWMCodecAMVideoAccelerator methods ***)
  231.     function SetAcceleratorInterface(pIAMVA: IAMVideoAccelerator): HRESULT; stdcall;
  232.     function NegotiateConnection(pMediaType: PDMOMediaType ): HRESULT; stdcall;
  233.     function SetPlayerNotify(pHook: IWMPlayerTimestampHook): HRESULT; stdcall;
  234.   end;
  235. // Outdated version of IWMCodecAMVideoAccelerator
  236.   {$HPPEMIT 'typedef System::DelphiInterface<IWMCodecVideoAccelerator> _di_IWMCodecVideoAccelerator;'}
  237.   {$EXTERNALSYM IWMCodecVideoAccelerator}
  238.   IWMCodecVideoAccelerator = interface(IUnknown)
  239.   ['{990641b0-739f-4e94-a808-9888da8f75af}']
  240.   (*** IWMCodecVideoAccelerator methods ***)
  241.     function NegotiateConnection(pIAMVA: IAMVideoAccelerator;
  242.       pMediaType: PDMOMediaType): HRESULT;
  243.     function SetPlayerNotify(pHook: IWMPlayerTimestampHook): HRESULT;
  244.   end;
  245. //*****************************************************************************
  246. //
  247. // Microsoft Windows Media
  248. // Copyright (C) Microsoft Corporation. All rights reserved.
  249. //
  250. // FileName:            WMNetSourceCreator.idl
  251. //
  252. // Abstract:
  253. //
  254. //*****************************************************************************
  255. const
  256.   CLSID_ClientNetManager  : TGUID = '{CD12A3CE-9C42-11D2-BEED-0060082F2054}';
  257.   {$EXTERNALSYM CLSID_ClientNetManager}
  258.   IID_INSNetSourceCreator : TGUID = '{0C0E4080-9081-11d2-BEEC-0060082F2054}';
  259.   {$EXTERNALSYM IID_INSNetSourceCreator}
  260. //////////////////////////////////////////////////////////////////////////////
  261. //
  262. // Interface for creating a NetSource plugin.
  263. //
  264. type
  265.   {$HPPEMIT 'typedef System::DelphiInterface<INSNetSourceCreator> _di_INSNetSourceCreator;'}
  266.   {$EXTERNALSYM INSNetSourceCreator}
  267.   INSNetSourceCreator = interface(IUnknown)
  268.   ['{0C0E4080-9081-11d2-BEEC-0060082F2054}']
  269.   (*** INSNetSourceCreator methods ***)
  270.     function Initialize: HRESULT; stdcall;
  271.     //
  272.     // This method is called to create an instance of the a particular
  273.     // Network Source plugin
  274.     //
  275.     function CreateNetSource(pszStreamName: PWideChar; pMonitor: IUnknown;
  276.       pData: PBYTE; pUserContext, pCallback: IUnknown; qwContext: Int64): HRESULT; stdcall;
  277.     //
  278.     // This method returns the namespace node for the properties of the
  279.     // the Network Source plugin that would be used given the
  280.     // provided stream name.
  281.     //
  282.     function GetNetSourceProperties(pszStreamName: PWideChar;
  283.       out ppPropertiesNode: IUnknown): HRESULT; stdcall;
  284.     //
  285.     // Returns part of the Namespace that is used for values that are
  286.     // shared among all Network Source plugins
  287.     //
  288.     function GetNetSourceSharedNamespace(out ppSharedNamespace: IUnknown): HRESULT; stdcall;
  289.     function GetNetSourceAdminInterface(pszStreamName: PWideChar;
  290.       out pVal: OLEVARIANT): HRESULT; stdcall;
  291.     //
  292.     // Iterate through the network protocols supported
  293.     //
  294.     function GetNumProtocolsSupported(out pcProtocols: LongWord): HRESULT; stdcall;
  295.     function GetProtocolName(dwProtocolNum: LongWord; {out} pwszProtocolName: PWideChar;
  296.       var pcchProtocolName: Word): HRESULT; stdcall;
  297.     function Shutdown: HRESULT; stdcall;
  298.   end;
  299. //*@@@+++@@@@******************************************************************
  300. //
  301. // Microsoft Windows Media
  302. // Copyright (C) Microsoft Corporation. All rights reserved.
  303. //
  304. //*@@@---@@@@******************************************************************
  305. const
  306.   IID_INSSBuffer           : TGUID = '{E1CD3524-03D7-11d2-9EED-006097D2D7CF}';
  307.   {$EXTERNALSYM IID_INSSBuffer}
  308.   IID_IWMSBuffer           : TGUID = '{E1CD3524-03D7-11d2-9EED-006097D2D7CF}';
  309.   {$EXTERNALSYM IID_IWMSBuffer}
  310.   IID_INSSBuffer2          : TGUID = '{4f528693-1035-43fe-b428-757561ad3a68}';
  311.   {$EXTERNALSYM IID_INSSBuffer2}
  312.   IID_INSSBuffer3          : TGUID = '{c87ceaaf-75be-4bc4-84eb-ac2798507672}';
  313.   {$EXTERNALSYM IID_INSSBuffer3}
  314.   IID_INSSBuffer4          : TGUID = '{b6b8fd5a-32e2-49d4-a910-c26cc85465ed}';
  315.   {$EXTERNALSYM IID_INSSBuffer4}
  316.   IID_IWMSBufferAllocator  : TGUID = '{61103CA4-2033-11d2-9EF1-006097D2D7CF}';
  317.   {$EXTERNALSYM IID_IWMSBufferAllocator}
  318. type
  319.   {$HPPEMIT 'typedef System::DelphiInterface<INSSBuffer> _di_INSSBuffer;'}
  320.   {$EXTERNALSYM INSSBuffer}
  321.   INSSBuffer = interface(IUnknown)
  322.   ['{E1CD3524-03D7-11d2-9EED-006097D2D7CF}']
  323.   (*** INSSBuffer methods ***)
  324.     function GetLength(out pdwLength: LongWord): HRESULT; stdcall;
  325.     function SetLength(dwLength: LongWord): HRESULT; stdcall;
  326.     function GetMaxLength(out pdwLength: LongWord): HRESULT; stdcall;
  327.     function GetBuffer(out ppdwBuffer: PBYTE): HRESULT; stdcall;
  328.     function GetBufferAndLength(out ppdwBuffer: PBYTE; out pdwLength: LongWord): HRESULT; stdcall;
  329.   end;
  330.   {$HPPEMIT 'typedef System::DelphiInterface<INSSBuffer2> _di_INSSBuffer2;'}
  331.   {$EXTERNALSYM INSSBuffer2}
  332.   INSSBuffer2 = interface(INSSBuffer)
  333.   ['{4F528693-1035-43fe-B428-757561AD3A68}']
  334.   (*** INSSBuffer2 methods ***)
  335.     function GetSampleProperties(cbProperties: LongWord; {out} pbProperties: PBYTE): HRESULT; stdcall;
  336.     function SetSampleProperties(cbProperties: LongWord; pbProperties: PBYTE): HRESULT; stdcall;
  337.   end;
  338.   {$HPPEMIT 'typedef System::DelphiInterface<INSSBuffer3> _di_INSSBuffer3;'}
  339.   {$EXTERNALSYM INSSBuffer3}
  340.   INSSBuffer3 = interface(INSSBuffer2)
  341.   ['{C87CEAAF-75BE-4bc4-84EB-AC2798507672}']
  342.   (*** INSSBuffer3 methods ***)
  343.     function SetProperty(guidBufferProperty: TGUID; pvBufferProperty: Pointer;
  344.       dwBufferPropertySize: LongWord): HRESULT; stdcall;
  345.     function GetProperty(guidBufferProperty: TGUID; {out} pvBufferProperty: Pointer;
  346.       var pdwBufferPropertySize: LongWord): HRESULT; stdcall;
  347.   end;
  348.   {$HPPEMIT 'typedef System::DelphiInterface<INSSBuffer4> _di_INSSBuffer4;'}
  349.   {$EXTERNALSYM INSSBuffer4}
  350.   INSSBuffer4 = interface(INSSBuffer3)
  351.   ['{B6B8FD5A-32E2-49d4-A910-C26CC85465ED}']
  352.   (*** INSSBuffer4 methods ***)
  353.     function GetPropertyCount(out pcBufferProperties: LongWord): HRESULT; stdcall;
  354.     function GetPropertyByIndex(dwBufferPropertyIndex: LongWord;
  355.       out pguidBufferProperty: TGUID; pvBufferProperty: pointer;
  356.       var pdwBufferPropertySize: LongWord): HRESULT; stdcall;
  357.   end;
  358.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSBufferAllocator> _di_IWMSBufferAllocator;'}
  359.   {$EXTERNALSYM IWMSBufferAllocator}
  360.   IWMSBufferAllocator = interface(IUnknown)
  361.   ['{61103CA4-2033-11d2-9EF1-006097D2D7CF}']
  362.   (*** IWMSBufferAllocator methods ***)
  363.     function AllocateBuffer(dwMaxBufferSize: LongWord; out ppBuffer: INSSBuffer): HRESULT; stdcall;
  364.     function AllocatePageSizeBuffer(dwMaxBufferSize: LongWord; out ppBuffer: INSSBuffer): HRESULT; stdcall;
  365.   end;
  366. //*@@@+++@@@@******************************************************************
  367. //
  368. // Microsoft Windows Media
  369. // Copyright (C) Microsoft Corporation. All rights reserved.
  370. //
  371. //*@@@---@@@@******************************************************************
  372. //
  373. // The following is a partial list of DRM actions that are of interest to applications
  374. const
  375.   g_wszWMDRM_RIGHT_PLAYBACK                    = WideString('Play');
  376.   {$EXTERNALSYM g_wszWMDRM_RIGHT_PLAYBACK}
  377.   g_wszWMDRM_RIGHT_COPY_TO_CD                  = WideString('Print.redbook');
  378.   {$EXTERNALSYM g_wszWMDRM_RIGHT_COPY_TO_CD}
  379.   g_wszWMDRM_RIGHT_COPY_TO_SDMI_DEVICE         = WideString('Transfer.SDMI');
  380.   {$EXTERNALSYM g_wszWMDRM_RIGHT_COPY_TO_SDMI_DEVICE}
  381.   g_wszWMDRM_RIGHT_COPY_TO_NON_SDMI_DEVICE     = WideString('Transfer.NONSDMI');
  382.   {$EXTERNALSYM g_wszWMDRM_RIGHT_COPY_TO_NON_SDMI_DEVICE}
  383.   g_wszWMDRM_RIGHT_BACKUP                      = WideString('Backup');
  384.   {$EXTERNALSYM g_wszWMDRM_RIGHT_BACKUP}
  385.   g_wszWMDRM_IsDRM                             = WideString('IsDRM');
  386.   {$EXTERNALSYM g_wszWMDRM_IsDRM}
  387.   g_wszWMDRM_IsDRMCached                       = WideString('IsDRMCached');
  388.   {$EXTERNALSYM g_wszWMDRM_IsDRMCached}
  389.   g_wszWMDRM_BaseLicenseAcqURL                 = WideString('BaseLAURL');
  390.   {$EXTERNALSYM g_wszWMDRM_BaseLicenseAcqURL}
  391.   g_wszWMDRM_Rights                            = WideString('Rights');
  392.   {$EXTERNALSYM g_wszWMDRM_Rights}
  393.   g_wszWMDRM_LicenseID                         = WideString('LID');
  394.   {$EXTERNALSYM g_wszWMDRM_LicenseID}
  395.   g_wszWMDRM_ActionAllowed                     = WideString('ActionAllowed.');
  396.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed}
  397.   g_wszWMDRM_ActionAllowed_Playback            = WideString('ActionAllowed.Play');
  398.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed_Playback}
  399.   g_wszWMDRM_ActionAllowed_CopyToCD            = WideString('ActionAllowed.Print.redbook');
  400.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed_CopyToCD}
  401.   g_wszWMDRM_ActionAllowed_CopyToSDMIDevice    = WideString('ActionAllowed.Transfer.SDMI');
  402.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed_CopyToSDMIDevice}
  403.   g_wszWMDRM_ActionAllowed_CopyToNonSDMIDevice = WideString('ActionAllowed.Transfer.NONSDMI');
  404.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed_CopyToNonSDMIDevice}
  405.   g_wszWMDRM_ActionAllowed_Backup              = WideString('ActionAllowed.Backup');
  406.   {$EXTERNALSYM g_wszWMDRM_ActionAllowed_Backup}
  407.   g_wszWMDRM_LicenseState                      = WideString('LicenseStateData.');
  408.   {$EXTERNALSYM g_wszWMDRM_LicenseState}
  409.   g_wszWMDRM_LicenseState_Playback             = WideString('LicenseStateData.Play');
  410.   {$EXTERNALSYM g_wszWMDRM_LicenseState_Playback}
  411.   g_wszWMDRM_LicenseState_CopyToCD             = WideString('LicenseStateData.Print.redbook');
  412.   {$EXTERNALSYM g_wszWMDRM_LicenseState_CopyToCD}
  413.   g_wszWMDRM_LicenseState_CopyToSDMIDevice     = WideString('LicenseStateData.Transfer.SDMI');
  414.   {$EXTERNALSYM g_wszWMDRM_LicenseState_CopyToSDMIDevice}
  415.   g_wszWMDRM_LicenseState_CopyToNonSDMIDevice  = WideString('LicenseStateData.Transfer.NONSDMI');
  416.   {$EXTERNALSYM g_wszWMDRM_LicenseState_CopyToNonSDMIDevice}
  417.   g_wszWMDRM_DRMHeader                         = WideString('DRMHeader.');
  418.   {$EXTERNALSYM g_wszWMDRM_DRMHeader}
  419.   g_wszWMDRM_DRMHeader_KeyID                   = WideString('DRMHeader.KID');
  420.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_KeyID}
  421.   g_wszWMDRM_DRMHeader_LicenseAcqURL           = WideString('DRMHeader.LAINFO');
  422.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_LicenseAcqURL}
  423.   g_wszWMDRM_DRMHeader_ContentID               = WideString('DRMHeader.CID');
  424.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_ContentID}
  425.   g_wszWMDRM_DRMHeader_IndividualizedVersion   = WideString('DRMHeader.SECURITYVERSION');
  426.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_IndividualizedVersion}
  427.   g_wszWMDRM_DRMHeader_ContentDistributor      = WideString('DRMHeader.ContentDistributor');
  428.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_ContentDistributor}
  429.   g_wszWMDRM_DRMHeader_SubscriptionContentID   = WideString('DRMHeader.SubscriptionContentID');
  430.   {$EXTERNALSYM g_wszWMDRM_DRMHeader_SubscriptionContentID}
  431. // This enum indicates the category for each possible output string to be displayed.
  432. // 0 -  Playback not permitted.
  433. // 1 -  Playback unlimited.
  434. // 2 -  Playback valid 5 times.
  435. // 3 -  Playback valid from 7/12/00.
  436. // 4 -  Playback valid until 7/12/00.
  437. // 5 -  Playback valid from 5/12 to 9/12.
  438. // 6 -  Playback valid 5 times from 7/12/00.
  439. // 7 -  Playback valid 5 times until 7/12/00.
  440. // 8 -  Playback valid 5 times from 5/12 to 9/12.
  441. // 9 -  Playback valid for 24 hours from first use.
  442. type
  443.   DRM_LICENSE_STATE_CATEGORY = (
  444.     WM_DRM_LICENSE_STATE_NORIGHT,
  445.     WM_DRM_LICENSE_STATE_UNLIM,
  446.     WM_DRM_LICENSE_STATE_COUNT,
  447.     WM_DRM_LICENSE_STATE_FROM,
  448.     WM_DRM_LICENSE_STATE_UNTIL,
  449.     WM_DRM_LICENSE_STATE_FROM_UNTIL,
  450.     WM_DRM_LICENSE_STATE_COUNT_FROM,
  451.     WM_DRM_LICENSE_STATE_COUNT_UNTIL,
  452.     WM_DRM_LICENSE_STATE_COUNT_FROM_UNTIL,
  453.     WM_DRM_LICENSE_STATE_EXPIRATION_AFTER_FIRSTUSE
  454.   );
  455.   {$EXTERNALSYM DRM_LICENSE_STATE_CATEGORY}
  456.   TDRMLicenseStateCategory = DRM_LICENSE_STATE_CATEGORY;
  457.   PDRMLicenseStateData = ^TDRMLicenseStateData;
  458.   _DRM_LICENSE_STATE_DATA = packed record
  459.     dwStreamId  : LongWord;                   // 0 -> All streams, != 0 -> A particular stream.
  460.     dwCategory  : TDRMLicenseStateCategory;   // Indicates the category of string to be displayed.
  461.     dwNumCounts : LongWord;                   // Number of items supplied in dwCount.
  462.     dwCount     : array[0..3] of LongWord;    // Up to 4 counts.
  463.     dwNumDates  : LongWord;                   // Number of items supplied in dwDate.
  464.     datetime    : array [0..3] of FILETIME;   // Up to 4 dates.
  465.     dwVague     : LongWord;                   // 0 -> certain, 1 -> atleast.  (There could be more
  466.                                               //               licenses. Aggregation not possible.)
  467.   end;
  468.   {$EXTERNALSYM _DRM_LICENSE_STATE_DATA}
  469.   DRM_LICENSE_STATE_DATA = _DRM_LICENSE_STATE_DATA;
  470.   {$EXTERNALSYM DRM_LICENSE_STATE_DATA}
  471.   TDRMLicenseStateData = _DRM_LICENSE_STATE_DATA;
  472.   DRM_HTTP_STATUS = (
  473.     HTTP_NOTINITIATED,
  474.     HTTP_CONNECTING,
  475.     HTTP_REQUESTING,
  476.     HTTP_RECEIVING,
  477.     HTTP_COMPLETED
  478.   );
  479.   {$EXTERNALSYM DRM_HTTP_STATUS}
  480.   TDRMHTTPStatus = DRM_HTTP_STATUS;
  481.   //  The various states individualization can be in:
  482. {$IFNDEF COMPILER6_UP}
  483.   DRM_INDIVIDUALIZATION_STATUS = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  484.   const
  485.     INDI_UNDEFINED = $00;
  486.     {$EXTERNALSYM INDI_UNDEFINED}
  487.     INDI_BEGIN     = $01;
  488.     {$EXTERNALSYM INDI_BEGIN}
  489.     INDI_SUCCEED   = $02;
  490.     {$EXTERNALSYM INDI_SUCCEED}
  491.     INDI_FAIL      = $04;
  492.     {$EXTERNALSYM INDI_FAIL}
  493.     INDI_CANCEL    = $08;
  494.     {$EXTERNALSYM INDI_CANCEL}
  495.     INDI_DOWNLOAD  = $10;
  496.     {$EXTERNALSYM INDI_DOWNLOAD}
  497.     INDI_INSTALL   = $20;
  498.     {$EXTERNALSYM INDI_INSTALL}
  499. {$ELSE}
  500. type
  501.   DRM_INDIVIDUALIZATION_STATUS = (
  502.     INDI_UNDEFINED = $00,
  503.     INDI_BEGIN     = $01,
  504.     INDI_SUCCEED   = $02,
  505.     INDI_FAIL      = $04,
  506.     INDI_CANCEL    = $08,
  507.     INDI_DOWNLOAD  = $10,
  508.     INDI_INSTALL   = $20
  509.   );
  510. {$ENDIF}
  511. type
  512.   {$EXTERNALSYM DRM_INDIVIDUALIZATION_STATUS}
  513.   TDRMIndividualizationStatus = DRM_INDIVIDUALIZATION_STATUS;
  514. type
  515.   PWMIndividualizeStatus = ^TWMIndividualizeStatus;
  516.   _WMIndividualizeStatus = packed record
  517.     hr                 : HRESULT;
  518.     enIndiStatus       : TDRMIndividualizationStatus;
  519.     pszIndiRespUrl     : PChar;
  520.     dwHTTPRequest      : LongWord;
  521.     enHTTPStatus       : TDRMHTTPStatus;
  522.     dwHTTPReadProgress : LongWord;
  523.     dwHTTPReadTotal    : LongWord;
  524.   end;
  525.   {$EXTERNALSYM _WMIndividualizeStatus}
  526.   WM_INDIVIDUALIZE_STATUS = _WMIndividualizeStatus;
  527.   {$EXTERNALSYM WM_INDIVIDUALIZE_STATUS}
  528.   TWMIndividualizeStatus = _WMIndividualizeStatus;
  529.   PWMGetLicenseData = ^TWMGetLicenseData;
  530.   _WMGetLicenseData = packed record
  531.     dwSize           : LongWord;
  532.     hr               : HRESULT;
  533.     wszURL           : PWideChar;
  534.     wszLocalFilename : PWideChar;
  535.     pbPostData       : PBYTE;
  536.     dwPostDataSize   : LongWord;
  537.   end;
  538.   {$EXTERNALSYM _WMGetLicenseData}
  539.   WM_GET_LICENSE_DATA = _WMGetLicenseData;
  540.   {$EXTERNALSYM WM_GET_LICENSE_DATA}
  541.   TWMGetLicenseData = _WMGetLicenseData;
  542. //*****************************************************************************
  543. //
  544. // Microsoft Windows Media
  545. // Copyright (C) Microsoft Corporation. All rights reserved.
  546. //
  547. // FileName:            WMSInternalAdminNetSource.idl
  548. //
  549. // Abstract:
  550. //
  551. //*****************************************************************************
  552. const
  553.   IID_IWMSInternalAdminNetSource  : TGUID = '{8BB23E5F-D127-4afb-8D02-AE5B66D54C78}';
  554.   {$EXTERNALSYM IID_IWMSInternalAdminNetSource}
  555.   IID_IWMSInternalAdminNetSource2 : TGUID = '{E74D58C3-CF77-4b51-AF17-744687C43EAE}';
  556.   {$EXTERNALSYM IID_IWMSInternalAdminNetSource2}
  557.   IID_IWMSInternalAdminNetSource3 : TGUID = '{6b63d08e-4590-44af-9eb3-57ff1e73bf80}';
  558.   {$EXTERNALSYM IID_IWMSInternalAdminNetSource3}
  559. type
  560.   NETSOURCE_URLCREDPOLICY_SETTINGS = (
  561.     NETSOURCE_URLCREDPOLICY_SETTING_SILENTLOGONOK,
  562.     NETSOURCE_URLCREDPOLICY_SETTING_MUSTPROMPTUSER,
  563.     NETSOURCE_URLCREDPOLICY_SETTING_ANONYMOUSONLY
  564.   );
  565.   {$EXTERNALSYM NETSOURCE_URLCREDPOLICY_SETTINGS}
  566.  TNetSourceURLCredpolicySettings = NETSOURCE_URLCREDPOLICY_SETTINGS;
  567. ////////////////////////////////////////////////////////////////////////////////////////////////////
  568. //
  569. // This interface is used by WMP 7 and MPXP
  570. //
  571.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSInternalAdminNetSource> _di_IWMSInternalAdminNetSource;'}
  572.   {$EXTERNALSYM IWMSInternalAdminNetSource}
  573.   IWMSInternalAdminNetSource = interface(IUnknown)
  574.   ['{8BB23E5F-D127-4afb-8D02-AE5B66D54C78}']
  575.   (*** IWMSInternalAdminNetSource methods ***)
  576.     function Initialize(pSharedNamespace,
  577.                        pNamespaceNode: IUnknown;
  578.                        pNetSourceCreator: INSNetSourceCreator;
  579.                        fEmbeddedInServer: BOOL): HRESULT; stdcall;
  580.     function GetNetSourceCreator(out ppNetSourceCreator: INSNetSourceCreator): HRESULT; stdcall;
  581.     // Authentication
  582.     function SetCredentials(bstrRealm, bstrName, bstrPassword: WideString; fPersist, fConfirmedGood: BOOL): HRESULT; stdcall;
  583.     function GetCredentials(bstrRealm: WideString; out pbstrName, pbstrPassword: WideString; out pfConfirmedGood: BOOL): HRESULT; stdcall;
  584.     function DeleteCredentials(bstrRealm: WideString): HRESULT; stdcall;
  585.     function GetCredentialFlags(out lpdwFlags: LongWord): HRESULT; stdcall;
  586.     function SetCredentialFlags(dwFlags: LongWord): HRESULT; stdcall;
  587.     // Proxy
  588.     function FindProxyForURL(bstrProtocol, bstrHost: WideString;
  589.                              out pfProxyEnabled: BOOL;
  590.                              out pbstrProxyServer: WideString;
  591.                              out pdwProxyPort: LongWord;
  592.                              var pdwProxyContext: LongWord): HRESULT; stdcall;
  593.     function RegisterProxyFailure(hrParam: HRESULT; dwProxyContext: LongWord): HRESULT; stdcall;
  594.     function ShutdownProxyContext(dwProxyContext: LongWord): HRESULT; stdcall;
  595.     function IsUsingIE(dwProxyContext: LongWord; out pfIsUsingIE: BOOL): HRESULT; stdcall;
  596.   end;
  597. ////////////////////////////////////////////////////////////////////////////////////////////////////
  598. //
  599. // This interface is used by WMP 7 and MPXP
  600. //
  601.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSInternalAdminNetSource2> _di_IWMSInternalAdminNetSource2;'}
  602.   {$EXTERNALSYM IWMSInternalAdminNetSource2}
  603.   IWMSInternalAdminNetSource2 = interface(IUnknown)
  604.   ['{E74D58C3-CF77-4b51-AF17-744687C43EAE}']
  605.   (*** IWMSInternalAdminNetSource2 methods ***)
  606.     // Authentication
  607.     function SetCredentialsEx(bstrRealm      : WideString;
  608.                               bstrUrl        : WideString;
  609.                               fProxy         : BOOL;
  610.                               bstrName       : WideString;
  611.                               bstrPassword   : WideString;
  612.                               fPersist       : BOOL;
  613.                               fConfirmedGood : BOOL): HRESULT; stdcall;
  614.     function GetCredentialsEx(bstrRealm           : WideString;
  615.                               bstrUrl             : WideString;
  616.                               fProxy              : BOOL;
  617.                               out pdwUrlPolicy    : TNetSourceURLCredpolicySettings;
  618.                               out pbstrName       : WideString;
  619.                               out pbstrPassword   : WideString;
  620.                               out pfConfirmedGood : BOOL): HRESULT; stdcall;
  621.     function DeleteCredentialsEx(bstrRealm, bstrUrl: WideString; fProxy: BOOL): HRESULT; stdcall;
  622.     function FindProxyForURLEx(bstrProtocol         : WideString;
  623.                                bstrHost             : WideString;
  624.                                bstrUrl              : WideString;
  625.                                out pfProxyEnabled   : BOOL;
  626.                                out pbstrProxyServer : WideString;
  627.                                out pdwProxyPort     : LongWord;
  628.                                var pdwProxyContext  : LongWord): HRESULT; stdcall;
  629.   end;
  630.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSInternalAdminNetSource3> _di_IWMSInternalAdminNetSource3;'}
  631.   {$EXTERNALSYM IWMSInternalAdminNetSource3}
  632.   IWMSInternalAdminNetSource3 = interface(IWMSInternalAdminNetSource2)
  633.   ['{6b63d08e-4590-44af-9eb3-57ff1e73bf80}']
  634.   (*** IWMSInternalAdminNetSource3 methods ***)
  635.     function GetNetSourceCreator2(out ppNetSourceCreator: IUnknown): HRESULT; stdcall;
  636.     // Proxy
  637.     function FindProxyForURLEx2(bstrProtocol         : WideString;
  638.                                 bstrHost             : WideString;
  639.                                 bstrUrl              : WideString;
  640.                                 out pfProxyEnabled   : BOOL;
  641.                                 out pbstrProxyServer : WideString;
  642.                                 out pdwProxyPort     : LongWord;
  643.                                 var pqwProxyContext  : Int64): HRESULT; stdcall;
  644.     function RegisterProxyFailure2(hrParam: HRESULT; qwProxyContext: Int64): HRESULT; stdcall;
  645.     function ShutdownProxyContext2(qwProxyContext: Int64): HRESULT; stdcall;
  646.     function IsUsingIE2(qwProxyContext: Int64; out pfIsUsingIE: BOOL): HRESULT; stdcall;
  647.     // Authentication
  648.     function SetCredentialsEx2(bstrRealm                : WideString;
  649.                                bstrUrl                  : WideString;
  650.                                fProxy                   : BOOL;
  651.                                bstrName                 : WideString;
  652.                                bstrPassword             : WideString;
  653.                                fPersist                 : BOOL;
  654.                                fConfirmedGood           : BOOL;
  655.                                fClearTextAuthentication : BOOL): HRESULT; stdcall;
  656.     function GetCredentialsEx2(bstrRealm                : WideString;
  657.                                bstrUrl                  : WideString;
  658.                                fProxy                   : BOOL;
  659.                                fClearTextAuthentication : BOOL;
  660.                                out pdwUrlPolicy         : TNetSourceURLCredpolicySettings;
  661.                                out pbstrName            : WideString;
  662.                                out pbstrPassword        : WideString;
  663.                                out pfConfirmedGood      : BOOL): HRESULT; stdcall;
  664.   end;
  665. //*@@@+++@@@@******************************************************************
  666. //
  667. // Microsoft Windows Media
  668. // Copyright (C) Microsoft Corporation. All rights reserved.
  669. //
  670. //*@@@---@@@@******************************************************************
  671. //
  672. ///////////////////////////////////////////////////////////////////////////////
  673. //
  674. // Enumerations and constants used by the SDK.
  675. //
  676. ///////////////////////////////////////////////////////////////////////////////
  677. //////////////////////////////////////////////////////////////////////////////
  678. //
  679. // Imports, typedefs and forward declarations
  680. //
  681. ///////////////////////////////////////////////////////////////////////////////
  682. //
  683. // Attributes
  684. //
  685. ///////////////////////////////////////////////////////////////////////////////
  686. ////////////////////////////////////////////////////////////////
  687. //
  688. // These are the special case attributes that give information
  689. // about the Windows Media file.
  690. //
  691. const
  692.   g_dwWMSpecialAttributes       = LongWord(20);
  693.   {$EXTERNALSYM g_dwWMSpecialAttributes}
  694.   g_wszWMDuration               = WideString('Duration');
  695.   {$EXTERNALSYM g_wszWMDuration}
  696.   g_wszWMBitrate                = WideString('Bitrate');
  697.   {$EXTERNALSYM g_wszWMBitrate}
  698.   g_wszWMSeekable               = WideString('Seekable');
  699.   {$EXTERNALSYM g_wszWMSeekable}
  700.   g_wszWMStridable              = WideString('Stridable');
  701.   {$EXTERNALSYM g_wszWMStridable}
  702.   g_wszWMBroadcast              = WideString('Broadcast');
  703.   {$EXTERNALSYM g_wszWMBroadcast}
  704.   g_wszWMProtected              = WideString('Is_Protected');
  705.   {$EXTERNALSYM g_wszWMProtected}
  706.   g_wszWMTrusted                = WideString('Is_Trusted');
  707.   {$EXTERNALSYM g_wszWMTrusted}
  708.   g_wszWMSignature_Name         = WideString('Signature_Name');
  709.   {$EXTERNALSYM g_wszWMSignature_Name}
  710.   g_wszWMHasAudio               = WideString('HasAudio');
  711.   {$EXTERNALSYM g_wszWMHasAudio}
  712.   g_wszWMHasImage               = WideString('HasImage');
  713.   {$EXTERNALSYM g_wszWMHasImage}
  714.   g_wszWMHasScript              = WideString('HasScript');
  715.   {$EXTERNALSYM g_wszWMHasScript}
  716.   g_wszWMHasVideo               = WideString('HasVideo');
  717.   {$EXTERNALSYM g_wszWMHasVideo}
  718.   g_wszWMCurrentBitrate         = WideString('CurrentBitrate');
  719.   {$EXTERNALSYM g_wszWMCurrentBitrate}
  720.   g_wszWMOptimalBitrate         = WideString('OptimalBitrate');
  721.   {$EXTERNALSYM g_wszWMOptimalBitrate}
  722.   g_wszWMHasAttachedImages      = WideString('HasAttachedImages');
  723.   {$EXTERNALSYM g_wszWMHasAttachedImages}
  724.   g_wszWMSkipBackward           = WideString('Can_Skip_Backward');
  725.   {$EXTERNALSYM g_wszWMSkipBackward}
  726.   g_wszWMSkipForward            = WideString('Can_Skip_Forward');
  727.   {$EXTERNALSYM g_wszWMSkipForward}
  728.   g_wszWMNumberOfFrames         = WideString('NumberOfFrames');
  729.   {$EXTERNALSYM g_wszWMNumberOfFrames}
  730.   g_wszWMFileSize               = WideString('FileSize');
  731.   {$EXTERNALSYM g_wszWMFileSize}
  732.   g_wszWMHasArbitraryDataStream = WideString('HasArbitraryDataStream');
  733.   {$EXTERNALSYM g_wszWMHasArbitraryDataStream}
  734.   g_wszWMHasFileTransferStream  = WideString('HasFileTransferStream');
  735.   {$EXTERNALSYM g_wszWMHasFileTransferStream}
  736.   g_wszWMContainerFormat        = WideString('WM/ContainerFormat');
  737.   {$EXTERNALSYM g_wszWMContainerFormat}
  738. ////////////////////////////////////////////////////////////////
  739. //
  740. // The content description object supports 5 basic attributes.
  741. //
  742.   g_dwWMContentAttributes = LongWord(5);
  743.   {$EXTERNALSYM g_dwWMContentAttributes}
  744.   g_wszWMTitle        = WideString('Title');
  745.   {$EXTERNALSYM g_wszWMTitle}
  746.   g_wszWMAuthor       = WideString('Author');
  747.   {$EXTERNALSYM g_wszWMAuthor}
  748.   g_wszWMDescription  = WideString('Description');
  749.   {$EXTERNALSYM g_wszWMDescription}
  750.   g_wszWMRating       = WideString('Rating');
  751.   {$EXTERNALSYM g_wszWMRating}
  752.   g_wszWMCopyright    = WideString('Copyright');
  753.   {$EXTERNALSYM g_wszWMCopyright}
  754. ////////////////////////////////////////////////////////////////
  755. //
  756. // These attributes are used to configure and query DRM settings in the reader and writer.
  757. //
  758.   g_wszWMUse_DRM                   = WideString('Use_DRM');
  759.   {$EXTERNALSYM g_wszWMUse_DRM}
  760.   g_wszWMDRM_Flags                 = WideString('DRM_Flags');
  761.   {$EXTERNALSYM g_wszWMDRM_Flags}
  762.   g_wszWMDRM_Level                 = WideString('DRM_Level');
  763.   {$EXTERNALSYM g_wszWMDRM_Level}
  764.   g_wszWMUse_Advanced_DRM          = WideString('Use_Advanced_DRM');
  765.   {$EXTERNALSYM g_wszWMUse_Advanced_DRM}
  766.   g_wszWMDRM_KeySeed               = WideString('DRM_KeySeed');
  767.   {$EXTERNALSYM g_wszWMDRM_KeySeed}
  768.   g_wszWMDRM_KeyID                 = WideString('DRM_KeyID');
  769.   {$EXTERNALSYM g_wszWMDRM_KeyID}
  770.   g_wszWMDRM_ContentID             = WideString('DRM_ContentID');
  771.   {$EXTERNALSYM g_wszWMDRM_ContentID}
  772.   g_wszWMDRM_IndividualizedVersion = WideString('DRM_IndividualizedVersion');
  773.   {$EXTERNALSYM g_wszWMDRM_IndividualizedVersion}
  774.   g_wszWMDRM_LicenseAcqURL         = WideString('DRM_LicenseAcqURL');
  775.   {$EXTERNALSYM g_wszWMDRM_LicenseAcqURL}
  776.   g_wszWMDRM_V1LicenseAcqURL       = WideString('DRM_V1LicenseAcqURL');
  777.   {$EXTERNALSYM g_wszWMDRM_V1LicenseAcqURL}
  778.   g_wszWMDRM_HeaderSignPrivKey     = WideString('DRM_HeaderSignPrivKey');
  779.   {$EXTERNALSYM g_wszWMDRM_HeaderSignPrivKey}
  780.   g_wszWMDRM_LASignaturePrivKey    = WideString('DRM_LASignaturePrivKey');
  781.   {$EXTERNALSYM g_wszWMDRM_LASignaturePrivKey}
  782.   g_wszWMDRM_LASignatureCert       = WideString('DRM_LASignatureCert');
  783.   {$EXTERNALSYM g_wszWMDRM_LASignatureCert}
  784.   g_wszWMDRM_LASignatureLicSrvCert = WideString('DRM_LASignatureLicSrvCert');
  785.   {$EXTERNALSYM g_wszWMDRM_LASignatureLicSrvCert}
  786.   g_wszWMDRM_LASignatureRootCert   = WideString('DRM_LASignatureRootCert');
  787.   {$EXTERNALSYM g_wszWMDRM_LASignatureRootCert}
  788. ////////////////////////////////////////////////////////////////
  789. //
  790. // These are the additional attributes defined in the WM attribute
  791. // namespace that give information about the content.
  792. //
  793.   g_wszWMAlbumTitle    = WideString('WM/AlbumTitle');
  794.   {$EXTERNALSYM g_wszWMAlbumTitle}
  795.   g_wszWMTrack         = WideString('WM/Track');
  796.   {$EXTERNALSYM g_wszWMTrack}
  797.   g_wszWMPromotionURL  = WideString('WM/PromotionURL');
  798.   {$EXTERNALSYM g_wszWMPromotionURL}
  799.   g_wszWMAlbumCoverURL = WideString('WM/AlbumCoverURL');
  800.   {$EXTERNALSYM g_wszWMAlbumCoverURL}
  801.   g_wszWMGenre         = WideString('WM/Genre');
  802.   {$EXTERNALSYM g_wszWMGenre}
  803.   g_wszWMYear          = WideString('WM/Year');
  804.   {$EXTERNALSYM g_wszWMYear}
  805.   g_wszWMGenreID       = WideString('WM/GenreID');
  806.   {$EXTERNALSYM g_wszWMGenreID}
  807.   g_wszWMMCDI          = WideString('WM/MCDI');
  808.   {$EXTERNALSYM g_wszWMMCDI}
  809.   g_wszWMComposer      = WideString('WM/Composer');
  810.   {$EXTERNALSYM g_wszWMComposer}
  811.   g_wszWMLyrics        = WideString('WM/Lyrics');
  812.   {$EXTERNALSYM g_wszWMLyrics}
  813.   g_wszWMTrackNumber   = WideString('WM/TrackNumber');
  814.   {$EXTERNALSYM g_wszWMTrackNumber}
  815.   g_wszWMToolName      = WideString('WM/ToolName');
  816.   {$EXTERNALSYM g_wszWMToolName}
  817.   g_wszWMToolVersion   = WideString('WM/ToolVersion');
  818.   {$EXTERNALSYM g_wszWMToolVersion}
  819.   g_wszWMIsVBR         = WideString('IsVBR');
  820.   {$EXTERNALSYM g_wszWMIsVBR}
  821. //
  822. // WM/AlbumArtist is a potentially different value than Author
  823. //
  824.   g_wszWMAlbumArtist = WideString('WM/AlbumArtist');
  825.   {$EXTERNALSYM g_wszWMAlbumArtist}
  826. ////////////////////////////////////////////////////////////////
  827. //
  828. // These optional attributes may be used to give information
  829. // about the branding of the content.
  830. //
  831.   g_wszWMBannerImageType = WideString('BannerImageType');
  832.   {$EXTERNALSYM g_wszWMBannerImageType}
  833.   g_wszWMBannerImageData = WideString('BannerImageData');
  834.   {$EXTERNALSYM g_wszWMBannerImageData}
  835.   g_wszWMBannerImageURL  = WideString('BannerImageURL');
  836.   {$EXTERNALSYM g_wszWMBannerImageURL}
  837.   g_wszWMCopyrightURL    = WideString('CopyrightURL');
  838.   {$EXTERNALSYM g_wszWMCopyrightURL}
  839. ////////////////////////////////////////////////////////////////
  840. //
  841. // Optional attributes, used to give information
  842. // about video stream properties.
  843. //
  844.   g_wszWMAspectRatioX = WideString('AspectRatioX');
  845.   {$EXTERNALSYM g_wszWMAspectRatioX}
  846.   g_wszWMAspectRatioY = WideString('AspectRatioY');
  847.   {$EXTERNALSYM g_wszWMAspectRatioY}
  848. ////////////////////////////////////////////////////////////////
  849. //
  850. // Optional attributes, used to give information
  851. // about the overall streaming properties of VBR files.
  852. // This attribute takes the format:
  853. //  Word wReserved (must be 0)
  854. //  WM_LEAKY_BUCKET_PAIR pair1
  855. //  WM_LEAKY_BUCKET_PAIR pair2
  856. //  ...
  857. //
  858.   g_wszASFLeakyBucketPairs = WideString('ASFLeakyBucketPairs');
  859.   {$EXTERNALSYM g_wszASFLeakyBucketPairs}
  860. ////////////////////////////////////////////////////////////////
  861. //
  862. // The NSC file supports the following attributes.
  863. //
  864.   g_dwWMNSCAttributes = LongWord(5);
  865.   {$EXTERNALSYM g_dwWMNSCAttributes}
  866.   g_wszWMNSCName        = WideString('NSC_Name');
  867.   {$EXTERNALSYM g_wszWMNSCName}
  868.   g_wszWMNSCAddress     = WideString('NSC_Address');
  869.   {$EXTERNALSYM g_wszWMNSCAddress}
  870.   g_wszWMNSCPhone       = WideString('NSC_Phone');
  871.   {$EXTERNALSYM g_wszWMNSCPhone}
  872.   g_wszWMNSCEmail       = WideString('NSC_Email');
  873.   {$EXTERNALSYM g_wszWMNSCEmail}
  874.   g_wszWMNSCDescription = WideString('NSC_Description');
  875.   {$EXTERNALSYM g_wszWMNSCDescription}
  876. ///////////////////////////////////////////////////////////////////
  877. ////////////////////////////////////////////////////////////////
  878. //
  879. // Attributes introduced in V9
  880. //
  881.   g_wszWMWriter                  = WideString('WM/Writer');
  882.   {$EXTERNALSYM g_wszWMWriter}
  883.   g_wszWMConductor               = WideString('WM/Conductor');
  884.   {$EXTERNALSYM g_wszWMConductor}
  885.   g_wszWMProducer                = WideString('WM/Producer');
  886.   {$EXTERNALSYM g_wszWMProducer}
  887.   g_wszWMDirector                = WideString('WM/Director');
  888.   {$EXTERNALSYM g_wszWMDirector}
  889.   g_wszWMContentGroupDescription = WideString('WM/ContentGroupDescription');
  890.   {$EXTERNALSYM g_wszWMContentGroupDescription}
  891.   g_wszWMSubTitle                = WideString('WM/SubTitle');
  892.   {$EXTERNALSYM g_wszWMSubTitle}
  893.   g_wszWMPartOfSet               = WideString('WM/PartOfSet');
  894.   {$EXTERNALSYM g_wszWMPartOfSet}
  895.   g_wszWMProtectionType          = WideString('WM/ProtectionType');
  896.   {$EXTERNALSYM g_wszWMProtectionType}
  897.   g_wszWMVideoHeight             = WideString('WM/VideoHeight');
  898.   {$EXTERNALSYM g_wszWMVideoHeight}
  899.   g_wszWMVideoWidth              = WideString('WM/VideoWidth');
  900.   {$EXTERNALSYM g_wszWMVideoWidth}
  901.   g_wszWMVideoFrameRate          = WideString('WM/VideoFrameRate');
  902.   {$EXTERNALSYM g_wszWMVideoFrameRate}
  903.   g_wszWMMediaClassPrimaryID     = WideString('WM/MediaClassPrimaryID');
  904.   {$EXTERNALSYM g_wszWMMediaClassPrimaryID}
  905.   g_wszWMMediaClassSecondaryID   = WideString('WM/MediaClassSecondaryID');
  906.   {$EXTERNALSYM g_wszWMMediaClassSecondaryID}
  907.   g_wszWMPeriod                  = WideString('WM/Period');
  908.   {$EXTERNALSYM g_wszWMPeriod}
  909.   g_wszWMCategory                = WideString('WM/Category');
  910.   {$EXTERNALSYM g_wszWMCategory}
  911.   g_wszWMPicture                 = WideString('WM/Picture');
  912.   {$EXTERNALSYM g_wszWMPicture}
  913.   g_wszWMLyrics_Synchronised     = WideString('WM/Lyrics_Synchronised');
  914.   {$EXTERNALSYM g_wszWMLyrics_Synchronised}
  915.   g_wszWMOriginalLyricist        = WideString('WM/OriginalLyricist');
  916.   {$EXTERNALSYM g_wszWMOriginalLyricist}
  917.   g_wszWMOriginalArtist          = WideString('WM/OriginalArtist');
  918.   {$EXTERNALSYM g_wszWMOriginalArtist}
  919.   g_wszWMOriginalAlbumTitle      = WideString('WM/OriginalAlbumTitle');
  920.   {$EXTERNALSYM g_wszWMOriginalAlbumTitle}
  921.   g_wszWMOriginalReleaseYear     = WideString('WM/OriginalReleaseYear');
  922.   {$EXTERNALSYM g_wszWMOriginalReleaseYear}
  923.   g_wszWMOriginalFilename        = WideString('WM/OriginalFilename');
  924.   {$EXTERNALSYM g_wszWMOriginalFilename}
  925.   g_wszWMPublisher               = WideString('WM/Publisher');
  926.   {$EXTERNALSYM g_wszWMPublisher}
  927.   g_wszWMEncodedBy               = WideString('WM/EncodedBy');
  928.   {$EXTERNALSYM g_wszWMEncodedBy}
  929.   g_wszWMEncodingSettings        = WideString('WM/EncodingSettings');
  930.   {$EXTERNALSYM g_wszWMEncodingSettings}
  931.   g_wszWMEncodingTime            = WideString('WM/EncodingTime');
  932.   {$EXTERNALSYM g_wszWMEncodingTime}
  933.   g_wszWMAuthorURL               = WideString('WM/AuthorURL');
  934.   {$EXTERNALSYM g_wszWMAuthorURL}
  935.   g_wszWMUserWebURL              = WideString('WM/UserWebURL');
  936.   {$EXTERNALSYM g_wszWMUserWebURL}
  937.   g_wszWMAudioFileURL            = WideString('WM/AudioFileURL');
  938.   {$EXTERNALSYM g_wszWMAudioFileURL}
  939.   g_wszWMAudioSourceURL          = WideString('WM/AudioSourceURL');
  940.   {$EXTERNALSYM g_wszWMAudioSourceURL}
  941.   g_wszWMLanguage                = WideString('WM/Language');
  942.   {$EXTERNALSYM g_wszWMLanguage}
  943.   g_wszWMParentalRating          = WideString('WM/ParentalRating');
  944.   {$EXTERNALSYM g_wszWMParentalRating}
  945.   g_wszWMBeatsPerMinute          = WideString('WM/BeatsPerMinute');
  946.   {$EXTERNALSYM g_wszWMBeatsPerMinute}
  947.   g_wszWMInitialKey              = WideString('WM/InitialKey');
  948.   {$EXTERNALSYM g_wszWMInitialKey}
  949.   g_wszWMMood                    = WideString('WM/Mood');
  950.   {$EXTERNALSYM g_wszWMMood}
  951.   g_wszWMText                    = WideString('WM/Text');
  952.   {$EXTERNALSYM g_wszWMText}
  953.   g_wszWMDVDID                   = WideString('WM/DVDID');
  954.   {$EXTERNALSYM g_wszWMDVDID}
  955.   g_wszWMWMContentID             = WideString('WM/WMContentID');
  956.   {$EXTERNALSYM g_wszWMWMContentID}
  957.   g_wszWMWMCollectionID          = WideString('WM/WMCollectionID');
  958.   {$EXTERNALSYM g_wszWMWMCollectionID}
  959.   g_wszWMWMCollectionGroupID     = WideString('WM/WMCollectionGroupID');
  960.   {$EXTERNALSYM g_wszWMWMCollectionGroupID}
  961.   g_wszWMUniqueFileIdentifier    = WideString('WM/UniqueFileIdentifier');
  962.   {$EXTERNALSYM g_wszWMUniqueFileIdentifier}
  963.   g_wszWMModifiedBy              = WideString('WM/ModifiedBy');
  964.   {$EXTERNALSYM g_wszWMModifiedBy}
  965.   g_wszWMRadioStationName        = WideString('WM/RadioStationName');
  966.   {$EXTERNALSYM g_wszWMRadioStationName}
  967.   g_wszWMRadioStationOwner       = WideString('WM/RadioStationOwner');
  968.   {$EXTERNALSYM g_wszWMRadioStationOwner}
  969.   g_wszWMPlaylistDelay           = WideString('WM/PlaylistDelay');
  970.   {$EXTERNALSYM g_wszWMPlaylistDelay}
  971.   g_wszWMCodec                   = WideString('WM/Codec');
  972.   {$EXTERNALSYM g_wszWMCodec}
  973.   g_wszWMDRM                     = WideString('WM/DRM');
  974.   {$EXTERNALSYM g_wszWMDRM}
  975.   g_wszWMISRC                    = WideString('WM/ISRC');
  976.   {$EXTERNALSYM g_wszWMISRC}
  977.   g_wszWMProvider                = WideString('WM/Provider');
  978.   {$EXTERNALSYM g_wszWMProvider}
  979.   g_wszWMProviderRating          = WideString('WM/ProviderRating');
  980.   {$EXTERNALSYM g_wszWMProviderRating}
  981.   g_wszWMProviderStyle           = WideString('WM/ProviderStyle');
  982.   {$EXTERNALSYM g_wszWMProviderStyle}
  983.   g_wszWMContentDistributor      = WideString('WM/ContentDistributor');
  984.   {$EXTERNALSYM g_wszWMContentDistributor}
  985.   g_wszWMSubscriptionContentID   = WideString('WM/SubscriptionContentID');
  986.   {$EXTERNALSYM g_wszWMSubscriptionContentID}
  987.   g_wszWMWMADRCPeakReference     = WideString('WM/WMADRCPeakReference');
  988.   {$EXTERNALSYM g_wszWMWMADRCPeakReference}
  989.   g_wszWMWMADRCPeakTarget        = WideString('WM/WMADRCPeakTarget');
  990.   {$EXTERNALSYM g_wszWMWMADRCPeakTarget}
  991.   g_wszWMWMADRCAverageReference  = WideString('WM/WMADRCAverageReference');
  992.   {$EXTERNALSYM g_wszWMWMADRCAverageReference}
  993.   g_wszWMWMADRCAverageTarget     = WideString('WM/WMADRCAverageTarget');
  994.   {$EXTERNALSYM g_wszWMWMADRCAverageTarget}
  995. ///////////////////////////////////////////////////////////////////
  996. ////////////////////////////////////////////////////////////////
  997. //
  998. // These are setting names for use in Get/SetOutputSetting
  999. //
  1000.   g_wszEarlyDataDelivery       = WideString('EarlyDataDelivery');
  1001.   {$EXTERNALSYM g_wszEarlyDataDelivery}
  1002.   g_wszJustInTimeDecode        = WideString('JustInTimeDecode');
  1003.   {$EXTERNALSYM g_wszJustInTimeDecode}
  1004.   g_wszSingleOutputBuffer      = WideString('SingleOutputBuffer');
  1005.   {$EXTERNALSYM g_wszSingleOutputBuffer}
  1006.   g_wszSoftwareScaling         = WideString('SoftwareScaling');
  1007.   {$EXTERNALSYM g_wszSoftwareScaling}
  1008.   g_wszDeliverOnReceive        = WideString('DeliverOnReceive');
  1009.   {$EXTERNALSYM g_wszDeliverOnReceive}
  1010.   g_wszScrambledAudio          = WideString('ScrambledAudio');
  1011.   {$EXTERNALSYM g_wszScrambledAudio}
  1012.   g_wszDedicatedDeliveryThread = WideString('DedicatedDeliveryThread');
  1013.   {$EXTERNALSYM g_wszDedicatedDeliveryThread}
  1014.   g_wszEnableDiscreteOutput    = WideString('EnableDiscreteOutput');
  1015.   {$EXTERNALSYM g_wszEnableDiscreteOutput}
  1016.   g_wszSpeakerConfig           = WideString('SpeakerConfig');
  1017.   {$EXTERNALSYM g_wszSpeakerConfig}
  1018.   g_wszDynamicRangeControl     = WideString('DynamicRangeControl');
  1019.   {$EXTERNALSYM g_wszDynamicRangeControl}
  1020.   g_wszAllowInterlacedOutput   = WideString('AllowInterlacedOutput');
  1021.   {$EXTERNALSYM g_wszAllowInterlacedOutput}
  1022.   g_wszVideoSampleDurations    = WideString('VideoSampleDurations');
  1023.   {$EXTERNALSYM g_wszVideoSampleDurations}
  1024.   g_wszStreamLanguage          = WideString('StreamLanguage');
  1025.   {$EXTERNALSYM g_wszStreamLanguage}
  1026. ///////////////////////////////////////////////////////////////////
  1027. ////////////////////////////////////////////////////////////////
  1028. //
  1029. // These are setting names for use in Get/SetInputSetting
  1030. //
  1031.   g_wszDeinterlaceMode                  = WideString('DeinterlaceMode');
  1032.   {$EXTERNALSYM g_wszDeinterlaceMode}
  1033.   g_wszInitialPatternForInverseTelecine = WideString('InitialPatternForInverseTelecine');
  1034.   {$EXTERNALSYM g_wszInitialPatternForInverseTelecine}
  1035.   g_wszJPEGCompressionQuality           = WideString('JPEGCompressionQuality');
  1036.   {$EXTERNALSYM g_wszJPEGCompressionQuality}
  1037.   g_wszWatermarkCLSID                   = WideString('WatermarkCLSID');
  1038.   {$EXTERNALSYM g_wszWatermarkCLSID}
  1039.   g_wszWatermarkConfig                  = WideString('WatermarkConfig');
  1040.   {$EXTERNALSYM g_wszWatermarkConfig}
  1041.   g_wszInterlacedCoding                 = WideString('InterlacedCoding');
  1042.   {$EXTERNALSYM g_wszInterlacedCoding}
  1043.   g_wszFixedFrameRate                   = WideString('FixedFrameRate');
  1044.   {$EXTERNALSYM g_wszFixedFrameRate}
  1045. ////////////////////////////////////////////////////////////////
  1046. //
  1047. // All known IWMPropertyVault property names
  1048. //
  1049. // g_wszOriginalSourceFormatTag is obsolete and has been superceded by g_wszOriginalWaveFormat
  1050.   g_wszOriginalSourceFormatTag    = WideString('_SOURCEFORMATTAG');
  1051.   {$EXTERNALSYM g_wszOriginalSourceFormatTag}
  1052.   g_wszOriginalWaveFormat         = WideString('_ORIGINALWAVEFORMAT');
  1053.   {$EXTERNALSYM g_wszOriginalWaveFormat}
  1054.   g_wszEDL                        = WideString('_EDL');
  1055.   {$EXTERNALSYM g_wszEDL}
  1056.   g_wszComplexity                 = WideString('_COMPLEXITYEX');
  1057.   {$EXTERNALSYM g_wszComplexity}
  1058.   g_wszDecoderComplexityRequested = WideString('_DECODERCOMPLEXITYPROFILE');
  1059.   {$EXTERNALSYM g_wszDecoderComplexityRequested}
  1060. ////////////////////////////////////////////////////////////////
  1061. //
  1062. // All known IWMIStreamProps property names
  1063. //
  1064.   g_wszReloadIndexOnSeek            = WideString('ReloadIndexOnSeek');
  1065.   {$EXTERNALSYM g_wszReloadIndexOnSeek}
  1066.   g_wszStreamNumIndexObjects        = WideString('StreamNumIndexObjects');
  1067.   {$EXTERNALSYM g_wszStreamNumIndexObjects}
  1068.   g_wszFailSeekOnError              = WideString('FailSeekOnError');
  1069.   {$EXTERNALSYM g_wszFailSeekOnError}
  1070.   g_wszPermitSeeksBeyondEndOfStream = WideString('PermitSeeksBeyondEndOfStream');
  1071.   {$EXTERNALSYM g_wszPermitSeeksBeyondEndOfStream}
  1072.   g_wszUsePacketAtSeekPoint         = WideString('UsePacketAtSeekPoint');
  1073.   {$EXTERNALSYM g_wszUsePacketAtSeekPoint}
  1074.   g_wszSourceBufferTime             = WideString('SourceBufferTime');
  1075.   {$EXTERNALSYM g_wszSourceBufferTime}
  1076.   g_wszSourceMaxBytesAtOnce         = WideString('SourceMaxBytesAtOnce');
  1077.   {$EXTERNALSYM g_wszSourceMaxBytesAtOnce}
  1078. ///////////////////////////////////////////////////////////////////
  1079. ////////////////////////////////////////////////////////////////
  1080. //
  1081. // VBR encoding settings
  1082. //
  1083.   g_wszVBREnabled         = WideString('_VBRENABLED');
  1084.   {$EXTERNALSYM g_wszVBREnabled}
  1085.   g_wszVBRQuality         = WideString('_VBRQUALITY');
  1086.   {$EXTERNALSYM g_wszVBRQuality}
  1087.   g_wszVBRBitrateMax      = WideString('_RMAX');
  1088.   {$EXTERNALSYM g_wszVBRBitrateMax}
  1089.   g_wszVBRBufferWindowMax = WideString('_BMAX');
  1090.   {$EXTERNALSYM g_wszVBRBufferWindowMax}
  1091. ////////////////////////////////////////////////////////////////
  1092. //
  1093. // VBR Video settings
  1094. //
  1095.   g_wszVBRPeak       = WideString('VBR Peak');
  1096.   {$EXTERNALSYM g_wszVBRPeak}
  1097.   g_wszBufferAverage = WideString('Buffer Average');
  1098.   {$EXTERNALSYM g_wszBufferAverage}
  1099. ////////////////////////////////////////////////////////////////
  1100. //
  1101. // Codec encoding complexity settings
  1102. //
  1103. // g_wszComplexity should be used to set desired encoding complexity on the
  1104. // stream's IWMPropertyVault (see above for definition)
  1105. // The below settings can be queried from IWMCodecInfo3::GetCodecProp()
  1106. //
  1107.   g_wszComplexityMax     = WideString('_COMPLEXITYEXMAX');
  1108.   {$EXTERNALSYM g_wszComplexityMax}
  1109.   g_wszComplexityOffline = WideString('_COMPLEXITYEXOFFLINE');
  1110.   {$EXTERNALSYM g_wszComplexityOffline}
  1111.   g_wszComplexityLive    = WideString('_COMPLEXITYEXLIVE');
  1112.   {$EXTERNALSYM g_wszComplexityLive}
  1113.   g_wszIsVBRSupported    = WideString('_ISVBRSUPPORTED');
  1114.   {$EXTERNALSYM g_wszIsVBRSupported}
  1115. ////////////////////////////////////////////////////////////////
  1116. //
  1117. // Codec enumeration settings
  1118. //
  1119. // g_wszVBREnabled can be used as a codec enumeration setting (see above for definition)
  1120.   g_wszNumPasses = WideString('_PASSESUSED');
  1121.   {$EXTERNALSYM g_wszNumPasses}
  1122. ////////////////////////////////////////////////////////////////
  1123. //
  1124. // These are WMA Voice V9 attribute names and values
  1125. //
  1126.   g_wszMusicSpeechClassMode = WideString('MusicSpeechClassMode');
  1127.   {$EXTERNALSYM g_wszMusicSpeechClassMode}
  1128.   g_wszMusicClassMode       = WideString('MusicClassMode');
  1129.   {$EXTERNALSYM g_wszMusicClassMode}
  1130.   g_wszSpeechClassMode      = WideString('SpeechClassMode');
  1131.   {$EXTERNALSYM g_wszSpeechClassMode}
  1132.   g_wszMixedClassMode       = WideString('MixedClassMode');
  1133.   {$EXTERNALSYM g_wszMixedClassMode}
  1134. ////////////////////////////////////////////////////////////////
  1135. //
  1136. // The WMA Voice V9 supports the following format property.
  1137. //
  1138.   g_wszSpeechCaps = WideString('SpeechFormatCap');
  1139.   {$EXTERNALSYM g_wszSpeechCaps}
  1140. ////////////////////////////////////////////////////////////////
  1141. //
  1142. // Multi-channel WMA properties
  1143. //
  1144.   g_wszPeakValue              = WideString('PeakValue');
  1145.   {$EXTERNALSYM g_wszPeakValue}
  1146.   g_wszAverageLevel           = WideString('AverageLevel');
  1147.   {$EXTERNALSYM g_wszAverageLevel}
  1148.   g_wszFold6To2Channels3      = WideString('Fold6To2Channels3');
  1149.   {$EXTERNALSYM g_wszFold6To2Channels3}
  1150.   g_wszFoldToChannelsTemplate = WideString('Fold%luTo%luChannels%lu');
  1151.   {$EXTERNALSYM g_wszFoldToChannelsTemplate}
  1152. ////////////////////////////////////////////////////////////////
  1153. //
  1154. // Complexity profile description strings
  1155. //
  1156.   g_wszDeviceConformanceTemplate = WideString('DeviceConformanceTemplate');
  1157.   {$EXTERNALSYM g_wszDeviceConformanceTemplate}
  1158. ////////////////////////////////////////////////////////////////
  1159. //
  1160. // Frame interpolation on video decode
  1161. //
  1162.   g_wszEnableFrameInterpolation = WideString('EnableFrameInterpolation');
  1163.   {$EXTERNALSYM g_wszEnableFrameInterpolation}
  1164. ////////////////////////////////////////////////////////////////
  1165. //
  1166. // Needs previous sample for Delta frame on video decode
  1167. //
  1168.   g_wszNeedsPreviousSample = WideString('NeedsPreviousSample');
  1169.   {$EXTERNALSYM g_wszNeedsPreviousSample}
  1170. ///////////////////////////////////////////////////////////////////////////////
  1171. //
  1172. // Enumerations and flags used by the SDK.
  1173. //
  1174. ///////////////////////////////////////////////////////////////////////////////
  1175. ////////////////////////////////////////////////////////////////
  1176. //
  1177. // Flags that can be passed into the Start method of IWMReader
  1178. //
  1179.   WM_START_CURRENTPOSITION = Int64(-1);
  1180.   {$EXTERNALSYM WM_START_CURRENTPOSITION}
  1181. //
  1182. // Flag to force overwrite of existing license backup
  1183. //
  1184.   WM_BACKUP_OVERWRITE       = LongWord($00000001);
  1185.   {$EXTERNALSYM WM_BACKUP_OVERWRITE}
  1186.   WM_RESTORE_INDIVIDUALIZE  = LongWord($00000002);
  1187.   {$EXTERNALSYM WM_RESTORE_INDIVIDUALIZE}
  1188. //
  1189. // Wave format ex type
  1190. //
  1191.   WAVE_FORMAT_DRM           = $0009;
  1192.   {$EXTERNALSYM WAVE_FORMAT_DRM}
  1193. //
  1194. // Sample type ids for Web Streams
  1195. //
  1196.   WEBSTREAM_SAMPLE_TYPE_FILE           = $1;
  1197.   {$EXTERNALSYM WEBSTREAM_SAMPLE_TYPE_FILE}
  1198.   WEBSTREAM_SAMPLE_TYPE_RENDER         = $2;
  1199.   {$EXTERNALSYM WEBSTREAM_SAMPLE_TYPE_RENDER}
  1200. //
  1201. // The flags that can be set on a sample (input or output).
  1202. //
  1203.   WM_SF_CLEANPOINT    = $1;
  1204.   {$EXTERNALSYM WM_SF_CLEANPOINT}
  1205.   WM_SF_DISCONTINUITY = $2;
  1206.   {$EXTERNALSYM WM_SF_DISCONTINUITY}
  1207.   WM_SF_DATALOSS      = $4;
  1208.   {$EXTERNALSYM WM_SF_DATALOSS}
  1209. //
  1210. // These flags might be set for a call to the IWMReaderAllocatorEx methods.
  1211. //
  1212.   WM_SFEX_NOTASYNCPOINT = $2;
  1213.   {$EXTERNALSYM WM_SFEX_NOTASYNCPOINT}
  1214.   WM_SFEX_DATALOSS      = $4;
  1215.   {$EXTERNALSYM WM_SFEX_DATALOSS}
  1216. //
  1217. // Status messages that the reader and index objects can
  1218. // pass in the OnStatus call.
  1219. //
  1220. type
  1221.   WMT_STATUS = (
  1222.     WMT_ERROR,
  1223.     WMT_OPENED,
  1224.     WMT_BUFFERING_START,
  1225.     WMT_BUFFERING_STOP,
  1226.     WMT_END_OF_FILE,
  1227. {$IFDEF COMPILER6_UP}
  1228.     WMT_EOF = 4, 
  1229. {$ENDIF}
  1230.     WMT_END_OF_SEGMENT,
  1231.     WMT_END_OF_STREAMING,
  1232.     WMT_LOCATING,
  1233.     WMT_CONNECTING,
  1234.     WMT_NO_RIGHTS,
  1235.     WMT_MISSING_CODEC,
  1236.     WMT_STARTED,
  1237.     WMT_STOPPED,
  1238.     WMT_CLOSED,
  1239.     WMT_STRIDING,
  1240.     WMT_TIMER,
  1241.     WMT_INDEX_PROGRESS,
  1242.     WMT_SAVEAS_START,
  1243.     WMT_SAVEAS_STOP,
  1244.     WMT_NEW_SOURCEFLAGS,
  1245.     WMT_NEW_METADATA,
  1246.     WMT_BACKUPRESTORE_BEGIN,
  1247.     WMT_SOURCE_SWITCH,
  1248.     WMT_ACQUIRE_LICENSE,
  1249.     WMT_INDIVIDUALIZE,
  1250.     WMT_NEEDS_INDIVIDUALIZATION,
  1251.     WMT_NO_RIGHTS_EX,
  1252.     WMT_BACKUPRESTORE_END,
  1253.     WMT_BACKUPRESTORE_CONNECTING,
  1254.     WMT_BACKUPRESTORE_DISCONNECTING,
  1255.     WMT_ERROR_WITHURL,
  1256.     WMT_RESTRICTED_LICENSE,
  1257.     WMT_CLIENT_CONNECT,
  1258.     WMT_CLIENT_DISCONNECT,
  1259.     WMT_NATIVE_OUTPUT_PROPS_CHANGED,
  1260.     WMT_RECONNECT_START,
  1261.     WMT_RECONNECT_END,
  1262.     WMT_CLIENT_CONNECT_EX,
  1263.     WMT_CLIENT_DISCONNECT_EX,
  1264.     WMT_SET_FEC_SPAN,
  1265.     WMT_PREROLL_READY,
  1266.     WMT_PREROLL_COMPLETE,
  1267.     WMT_CLIENT_PROPERTIES,
  1268.     WMT_LICENSEURL_SIGNATURE_STATE
  1269.   );
  1270.   {$EXTERNALSYM WMT_STATUS}
  1271.   TWMTStatus = WMT_STATUS;
  1272. {$IFNDEF COMPILER6_UP}
  1273. const
  1274.   WMT_EOF = WMT_END_OF_FILE;
  1275.   {$NODEFINE WMT_EOF}
  1276. {$ENDIF}
  1277. type
  1278.   WMT_RIGHTS = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1279.   {$EXTERNALSYM WMT_RIGHTS}
  1280.   const
  1281.     WMT_RIGHT_PLAYBACK                  = $00000001;
  1282.     {$EXTERNALSYM WMT_RIGHT_PLAYBACK}
  1283.     WMT_RIGHT_COPY_TO_NON_SDMI_DEVICE   = $00000002;
  1284.     {$EXTERNALSYM WMT_RIGHT_COPY_TO_NON_SDMI_DEVICE}
  1285.     WMT_RIGHT_COPY_TO_CD                = $00000008;
  1286.     {$EXTERNALSYM WMT_RIGHT_COPY_TO_CD}
  1287.     WMT_RIGHT_COPY_TO_SDMI_DEVICE       = $00000010;
  1288.     {$EXTERNALSYM WMT_RIGHT_COPY_TO_SDMI_DEVICE}
  1289.     WMT_RIGHT_ONE_TIME                  = $00000020;
  1290.     {$EXTERNALSYM WMT_RIGHT_ONE_TIME}
  1291.     WMT_RIGHT_SAVE_STREAM_PROTECTED     = $00000040;
  1292.     {$EXTERNALSYM WMT_RIGHT_SAVE_STREAM_PROTECTED}
  1293.     WMT_RIGHT_SDMI_TRIGGER              = $00010000;
  1294.     {$EXTERNALSYM WMT_RIGHT_SDMI_TRIGGER}
  1295.     WMT_RIGHT_SDMI_NOMORECOPIES         = $00020000;
  1296.     {$EXTERNALSYM WMT_RIGHT_SDMI_NOMORECOPIES}
  1297. //
  1298. // Stream selection statuses (stati?).
  1299. //
  1300. type
  1301.   PWMTStreamSelection = ^TWMTStreamSelection;
  1302.   WMT_STREAM_SELECTION = (
  1303.     WMT_OFF,
  1304.     WMT_CLEANPOINT_ONLY,
  1305.     WMT_ON
  1306.   );
  1307.   {$EXTERNALSYM WMT_STREAM_SELECTION}
  1308.   TWMTStreamSelection = WMT_STREAM_SELECTION;
  1309. //
  1310. // Image types (used with CBO)
  1311. //
  1312.   WMT_IMAGE_TYPE = (
  1313.     WMT_IT_NONE,
  1314.     WMT_IT_BITMAP,
  1315.     WMT_IT_JPEG,
  1316.     WMT_IT_GIF
  1317.   );
  1318.   {$EXTERNALSYM WMT_IMAGE_TYPE}
  1319.   TWMTImageType = WMT_IMAGE_TYPE;
  1320. //
  1321. // Attribute datatypes.
  1322. //
  1323.   WMT_ATTR_DATATYPE = (
  1324.     WMT_TYPE_DWORD,
  1325.     WMT_TYPE_STRING,
  1326.     WMT_TYPE_BINARY,
  1327.     WMT_TYPE_BOOL,
  1328.     WMT_TYPE_QWORD,
  1329.     WMT_TYPE_WORD,
  1330.     WMT_TYPE_GUID
  1331.   );
  1332.   {$EXTERNALSYM WMT_ATTR_DATATYPE}
  1333.   TWMTAttrDataType = WMT_ATTR_DATATYPE;
  1334. //
  1335. // Types of images that can be stored in the header of a Windows Media File.
  1336. //
  1337.   WMT_ATTR_IMAGETYPE = (
  1338. {$IFNDEF COMPILER6_UP}
  1339.     WMT_IMAGETYPE_INVALID_0,
  1340.     WMT_IMAGETYPE_BITMAP,
  1341. {$ELSE}
  1342.     WMT_IMAGETYPE_BITMAP = 1,
  1343. {$ENDIF}
  1344.     WMT_IMAGETYPE_JPEG,
  1345.     WMT_IMAGETYPE_GIF
  1346.   );
  1347.   {$EXTERNALSYM WMT_ATTR_IMAGETYPE}
  1348.   TWMTAttrImageType = WMT_ATTR_IMAGETYPE;
  1349. //
  1350. // Windows Media versions.
  1351. //
  1352.   WMT_VERSION = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1353.   {$EXTERNALSYM WMT_VERSION}
  1354.   const
  1355.     WMT_VER_4_0 = $00040000;
  1356.     {$EXTERNALSYM WMT_VER_4_0}
  1357.     WMT_VER_7_0 = $00070000;
  1358.     {$EXTERNALSYM WMT_VER_7_0}
  1359.     WMT_VER_8_0 = $00080000;
  1360.     {$EXTERNALSYM WMT_VER_8_0}
  1361.     WMT_VER_9_0 = $00090000;
  1362.     {$EXTERNALSYM WMT_VER_9_0}
  1363. //
  1364. // Storage formats.  These are the values returned when querying
  1365. // the WM/ContainerFormat attribute (g_wszWMContainerFormat).
  1366. //
  1367. type
  1368.   tagWMT_STORAGE_FORMAT = (
  1369.     WMT_Storage_Format_MP3,
  1370.     WMT_Storage_Format_V1
  1371.   );
  1372.   {$EXTERNALSYM tagWMT_STORAGE_FORMAT}
  1373.   WMT_STORAGE_FORMAT = tagWMT_STORAGE_FORMAT;
  1374.   {$EXTERNALSYM WMT_STORAGE_FORMAT}
  1375.   TWMTStorageFormat = tagWMT_STORAGE_FORMAT;
  1376.   tagWMT_DRMLA_TRUST = (
  1377.     WMT_DRMLA_UNTRUSTED,
  1378.     WMT_DRMLA_TRUSTED,
  1379.     WMT_DRMLA_TAMPERED
  1380.   );
  1381.   {$EXTERNALSYM tagWMT_DRMLA_TRUST}
  1382.   WMT_DRMLA_TRUST = tagWMT_DRMLA_TRUST;
  1383.   {$EXTERNALSYM WMT_DRMLA_TRUST}
  1384.   TWMTDRMLATrust = tagWMT_DRMLA_TRUST;
  1385. //
  1386. // Type of data communication protocol (reliable or unreliable)
  1387. //
  1388.   tagWMT_TRANSPORT_TYPE = (
  1389.    WMT_Transport_Type_Unreliable,
  1390.    WMT_Transport_Type_Reliable
  1391.   );
  1392.   {$EXTERNALSYM tagWMT_TRANSPORT_TYPE}
  1393.   WMT_TRANSPORT_TYPE = tagWMT_TRANSPORT_TYPE;
  1394.   {$EXTERNALSYM WMT_TRANSPORT_TYPE}
  1395.   TWMTTransportType = tagWMT_TRANSPORT_TYPE;
  1396. //
  1397. // Protocols that the network sink supports.
  1398. //
  1399.   WMT_NET_PROTOCOL = (
  1400.     WMT_PROTOCOL_HTTP
  1401.   );
  1402.   {$EXTERNALSYM WMT_NET_PROTOCOL}
  1403.   TWMTNetProtocol = WMT_NET_PROTOCOL;
  1404. //
  1405. // The reader supports a number of different types of playback, each with
  1406. // slightly different characteristics.
  1407. //
  1408.   WMT_PLAY_MODE = (
  1409.     WMT_PLAY_MODE_AUTOSELECT,
  1410.     WMT_PLAY_MODE_LOCAL,
  1411.     WMT_PLAY_MODE_DOWNLOAD,
  1412.     WMT_PLAY_MODE_STREAMING
  1413.   );
  1414.   {$EXTERNALSYM WMT_PLAY_MODE}
  1415.   TWMTPlayMode = WMT_PLAY_MODE;
  1416. //
  1417. // Network Proxy settings for the reader
  1418. //
  1419.   WMT_PROXY_SETTINGS = (
  1420.     WMT_PROXY_SETTING_NONE,
  1421.     WMT_PROXY_SETTING_MANUAL,
  1422.     WMT_PROXY_SETTING_AUTO,
  1423.     WMT_PROXY_SETTING_BROWSER,       // Only valid for HTTP
  1424.     WMT_PROXY_SETTING_MAX
  1425.   );
  1426.   {$EXTERNALSYM WMT_PROXY_SETTINGS}
  1427.   TWMTProxySettings = WMT_PROXY_SETTINGS;
  1428.   WMT_CODEC_INFO_TYPE = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1429.   {$EXTERNALSYM WMT_CODEC_INFO_TYPE}
  1430.   const
  1431.     WMT_CODECINFO_AUDIO = 0;            // codec info is a Word = wFormatTag
  1432.     {$EXTERNALSYM WMT_CODECINFO_AUDIO}
  1433.     WMT_CODECINFO_VIDEO = 1;            // codec info is a LongWord = biCompression
  1434.     {$EXTERNALSYM WMT_CODECINFO_VIDEO}
  1435.     WMT_CODECINFO_UNKNOWN = $FFFFFFFF;  // codec info is undefined
  1436.     {$EXTERNALSYM WMT_CODECINFO_UNKNOWN}
  1437. //
  1438. // These values can be passed in when setting the DeinterlaceMode
  1439. // setting on the writer
  1440. //
  1441.   WM_DM_NOTINTERLACED                          = LongWord(0);
  1442.   {$EXTERNALSYM WM_DM_NOTINTERLACED}
  1443.   WM_DM_DEINTERLACE_NORMAL                     = LongWord(1);
  1444.   {$EXTERNALSYM WM_DM_DEINTERLACE_NORMAL}
  1445.   WM_DM_DEINTERLACE_HALFSIZE                   = LongWord(2);
  1446.   {$EXTERNALSYM WM_DM_DEINTERLACE_HALFSIZE}
  1447.   WM_DM_DEINTERLACE_HALFSIZEDOUBLERATE         = LongWord(3);
  1448.   {$EXTERNALSYM WM_DM_DEINTERLACE_HALFSIZEDOUBLERATE}
  1449.   WM_DM_DEINTERLACE_INVERSETELECINE            = LongWord(4);
  1450.   {$EXTERNALSYM WM_DM_DEINTERLACE_INVERSETELECINE}
  1451.   WM_DM_DEINTERLACE_VERTICALHALFSIZEDOUBLERATE = LongWord(5);
  1452.   {$EXTERNALSYM WM_DM_DEINTERLACE_VERTICALHALFSIZEDOUBLERATE}
  1453. //
  1454. // These values can be passed to further configure the inverse
  1455. // telecine process
  1456. //
  1457.   WM_DM_IT_DISABLE_COHERENT_MODE              = LongWord(0);
  1458.   {$EXTERNALSYM WM_DM_IT_DISABLE_COHERENT_MODE}
  1459.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_AA_TOP      = LongWord(1);
  1460.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_AA_TOP}
  1461.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BB_TOP      = LongWord(2);
  1462.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BB_TOP}
  1463.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BC_TOP      = LongWord(3);
  1464.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BC_TOP}
  1465.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_CD_TOP      = LongWord(4);
  1466.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_CD_TOP}
  1467.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_DD_TOP      = LongWord(5);
  1468.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_DD_TOP}
  1469.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_AA_BOTTOM   = LongWord(6);
  1470.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_AA_BOTTOM}
  1471.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BB_BOTTOM   = LongWord(7);
  1472.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BB_BOTTOM}
  1473.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BC_BOTTOM   = LongWord(8);
  1474.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_BC_BOTTOM}
  1475.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_CD_BOTTOM   = LongWord(9);
  1476.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_CD_BOTTOM}
  1477.   WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_DD_BOTTOM   = LongWord(10);
  1478.   {$EXTERNALSYM WM_DM_IT_FIRST_FRAME_IN_CLIP_IS_DD_BOTTOM}
  1479. //
  1480. // Frame level access data structures
  1481. //
  1482. type
  1483.   tagWMT_OFFSET_FORMAT = (
  1484.     WMT_OFFSET_FORMAT_100NS,
  1485.     WMT_OFFSET_FORMAT_FRAME_NUMBERS,
  1486.     WMT_OFFSET_FORMAT_PLAYLIST_OFFSET,
  1487.     WMT_OFFSET_FORMAT_TIMECODE
  1488.   );
  1489.   {$EXTERNALSYM tagWMT_OFFSET_FORMAT}
  1490.   WMT_OFFSET_FORMAT = tagWMT_OFFSET_FORMAT;
  1491.   {$EXTERNALSYM WMT_OFFSET_FORMAT}
  1492.   TWMTOffsetFormat = tagWMT_OFFSET_FORMAT;
  1493. //
  1494. // Indexer type and index type
  1495. //
  1496.   tagWMT_INDEXER_TYPE = (
  1497.     WMT_IT_PRESENTATION_TIME,
  1498.     WMT_IT_FRAME_NUMBERS,
  1499.     WMT_IT_TIMECODE
  1500.   );
  1501.   {$EXTERNALSYM tagWMT_INDEXER_TYPE}
  1502.   WMT_INDEXER_TYPE = tagWMT_INDEXER_TYPE;
  1503.   {$EXTERNALSYM WMT_INDEXER_TYPE}
  1504.   TWMTIndexerType = tagWMT_INDEXER_TYPE;
  1505.   tagWMT_INDEX_TYPE = (
  1506.   {$IFNDEF COMPILER6_UP}
  1507.     WMT_IT_NEAREST_INVALID_0,
  1508.     WMT_IT_NEAREST_DATA_UNIT,
  1509.   {$ELSE}
  1510.     WMT_IT_NEAREST_DATA_UNIT = 1,
  1511.   {$ENDIF}
  1512.     WMT_IT_NEAREST_OBJECT,
  1513.     WMT_IT_NEAREST_CLEAN_POINT
  1514.   );
  1515.   {$EXTERNALSYM tagWMT_INDEX_TYPE}
  1516.   WMT_INDEX_TYPE = tagWMT_INDEX_TYPE;
  1517.   {$EXTERNALSYM WMT_INDEX_TYPE}
  1518.   TWMTIndexType = tagWMT_INDEX_TYPE;
  1519. //
  1520. // The types of input accepted by the file sink
  1521. //
  1522.   WMT_FILESINK_MODE = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1523.   {$EXTERNALSYM WMT_FILESINK_MODE}
  1524.   const
  1525.     WMT_FM_SINGLE_BUFFERS       = $00000001;
  1526.     {$EXTERNALSYM WMT_FM_SINGLE_BUFFERS}
  1527.     WMT_FM_FILESINK_DATA_UNITS  = $00000002;
  1528.     {$EXTERNALSYM WMT_FM_FILESINK_DATA_UNITS}
  1529.     WMT_FM_FILESINK_UNBUFFERED  = $00000004;
  1530.     {$EXTERNALSYM WMT_FM_FILESINK_UNBUFFERED}
  1531. //
  1532. // WMA Voice V9 supports several type of compression,
  1533. // profile settting are mapped to these constants
  1534. //
  1535. type
  1536.   tagWMT_MUSICSPEECH_CLASS_MODE = (
  1537.     WMT_MS_CLASS_MUSIC,
  1538.     WMT_MS_CLASS_SPEECH,
  1539.     WMT_MS_CLASS_MIXED
  1540.   );
  1541.   {$EXTERNALSYM tagWMT_MUSICSPEECH_CLASS_MODE}
  1542.   WMT_MUSICSPEECH_CLASS_MODE = tagWMT_MUSICSPEECH_CLASS_MODE;
  1543.   {$EXTERNALSYM WMT_MUSICSPEECH_CLASS_MODE}
  1544.   TWMTMusicSpeechClassMode = tagWMT_MUSICSPEECH_CLASS_MODE;
  1545.   tagWMT_WATERMARK_ENTRY_TYPE = (
  1546.   {$IFNDEF COMPILER6_UP}
  1547.     WMT_WMETYPE_INVALID_0,
  1548.     WMT_WMETYPE_AUDIO,
  1549.   {$ELSE}
  1550.     WMT_WMETYPE_AUDIO = 1,
  1551.   {$ENDIF}
  1552.     WMT_WMETYPE_VIDEO
  1553.   );
  1554.   {$EXTERNALSYM tagWMT_WATERMARK_ENTRY_TYPE}
  1555.   WMT_WATERMARK_ENTRY_TYPE = tagWMT_WATERMARK_ENTRY_TYPE;
  1556.   {$EXTERNALSYM WMT_WATERMARK_ENTRY_TYPE}
  1557.   TWMTWatermarkEntryType = tagWMT_WATERMARK_ENTRY_TYPE;
  1558. //
  1559. // Dynamic Range Control values for playback
  1560. //
  1561. const
  1562.   WM_PLAYBACK_DRC_HIGH    = 0;
  1563.   {$EXTERNALSYM WM_PLAYBACK_DRC_HIGH}
  1564.   WM_PLAYBACK_DRC_MEDIUM  = 1;
  1565.   {$EXTERNALSYM WM_PLAYBACK_DRC_MEDIUM}
  1566.   WM_PLAYBACK_DRC_LOW     = 2;
  1567.   {$EXTERNALSYM WM_PLAYBACK_DRC_LOW}
  1568. //
  1569. // Timecode frame rates.  These are meant to be used as the
  1570. // values for the stream-based frame rate metadata attribute.
  1571. // See the WM Format SDK docs for more details.
  1572. //
  1573.   WMT_TIMECODE_FRAMERATE_30      = 0;
  1574.   {$EXTERNALSYM WMT_TIMECODE_FRAMERATE_30}
  1575.   WMT_TIMECODE_FRAMERATE_30DROP  = 1;
  1576.   {$EXTERNALSYM WMT_TIMECODE_FRAMERATE_30DROP}
  1577.   WMT_TIMECODE_FRAMERATE_25      = 2;
  1578.   {$EXTERNALSYM WMT_TIMECODE_FRAMERATE_25}
  1579.   WMT_TIMECODE_FRAMERATE_24      = 3;
  1580.   {$EXTERNALSYM WMT_TIMECODE_FRAMERATE_24}
  1581. //
  1582. // Flags that can be specified in IWMCredentialCallback::AcquireCredentials()
  1583. //
  1584. type
  1585.   WMT_CREDENTIAL_FLAGS = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1586.   {$EXTERNALSYM WMT_CREDENTIAL_FLAGS}
  1587.   const
  1588.     WMT_CREDENTIAL_SAVE                 = $00000001;       // Save the credentials in a persistent manner
  1589.     {$EXTERNALSYM WMT_CREDENTIAL_SAVE}
  1590.     WMT_CREDENTIAL_DONT_CACHE           = $00000002;       // Don't cache the credentials in memory
  1591.     {$EXTERNALSYM WMT_CREDENTIAL_DONT_CACHE}
  1592.     WMT_CREDENTIAL_CLEAR_TEXT           = $00000004;       // Credentials will be sent in clear text
  1593.     {$EXTERNALSYM WMT_CREDENTIAL_CLEAR_TEXT}
  1594.     WMT_CREDENTIAL_PROXY                = $00000008;       // Credentials are for a proxy server
  1595.     {$EXTERNALSYM WMT_CREDENTIAL_PROXY}
  1596.     WMT_CREDENTIAL_ENCRYPT              = $00000010;       // Encryption supported/used (in request/response, respectively)
  1597.     {$EXTERNALSYM WMT_CREDENTIAL_ENCRYPT}
  1598. type
  1599.   WM_AETYPE = {$IFDEF TYPE_IDENTITY}type {$ENDIF} LongWord;
  1600.   {$EXTERNALSYM WM_AETYPE}
  1601.   const
  1602.     WM_AETYPE_INCLUDE   = $69;
  1603.     {$EXTERNALSYM WM_AETYPE_INCLUDE}
  1604.     WM_AETYPE_EXCLUDE   = $65;
  1605.     {$EXTERNALSYM WM_AETYPE_EXCLUDE}
  1606. ///////////////////////////////////////////////////////////////////////////////
  1607. //
  1608. // Structures used by the SDK.
  1609. //
  1610. ///////////////////////////////////////////////////////////////////////////////
  1611. //
  1612. // Stream prioritization struct
  1613. //
  1614. type
  1615.   PWMStreamPrioritizationRecord = ^TWMStreamPrioritizationRecord;
  1616.   _WMStreamPrioritizationRecord = packed record
  1617.     wStreamNumber: Word;
  1618.     fMandatory   : BOOL;
  1619.   end;
  1620.   {$EXTERNALSYM _WMStreamPrioritizationRecord}
  1621.   WM_STREAM_PRIORITY_RECORD = _WMStreamPrioritizationRecord;
  1622.   {$EXTERNALSYM WM_STREAM_PRIORITY_RECORD}
  1623.   TWMStreamPrioritizationRecord = _WMStreamPrioritizationRecord;
  1624. //
  1625. // Writer Statistics struct
  1626. //
  1627.   PWMWriterStatistics = ^TWMWriterStatistics;
  1628.   _WMWriterStatistics = packed record
  1629.     qwSampleCount        : Int64;
  1630.     qwByteCount          : Int64;
  1631.     qwDroppedSampleCount : Int64;
  1632.     qwDroppedByteCount   : Int64;
  1633.     dwCurrentBitrate     : LongWord;
  1634.     dwAverageBitrate     : LongWord;
  1635.     dwExpectedBitrate    : LongWord;
  1636.     //
  1637.     // Sample rates are given as 1000 * (samples / second).
  1638.     //
  1639.     dwCurrentSampleRate  : LongWord;
  1640.     dwAverageSampleRate  : LongWord;
  1641.     dwExpectedSampleRate : LongWord;
  1642.   end;
  1643.   {$EXTERNALSYM _WMWriterStatistics}
  1644.   WM_WRITER_STATISTICS = _WMWriterStatistics;
  1645.   {$EXTERNALSYM WM_WRITER_STATISTICS}
  1646.   TWMWriterStatistics = _WMWriterStatistics;
  1647. //
  1648. // Extended Writer Statistics
  1649. //
  1650.   PWMWriterStatisticsEx = ^TWMWriterStatisticsEx;
  1651.   _WMWriterStatisticsEx = packed record
  1652.     //
  1653.     // Bitrate that includes overhead
  1654.     //
  1655.     dwBitratePlusOverhead : LongWord;
  1656.     //
  1657.     // Sample rates are given as 1000 * (samples / second)
  1658.     //
  1659.     dwCurrentSampleDropRateInQueue       : LongWord;
  1660.     dwCurrentSampleDropRateInCodec       : LongWord;
  1661.     dwCurrentSampleDropRateInMultiplexer : LongWord;
  1662.     //
  1663.     // Cumulative sample drops
  1664.     //
  1665.     dwTotalSampleDropsInQueue       : LongWord;
  1666.     dwTotalSampleDropsInCodec       : LongWord;
  1667.     dwTotalSampleDropsInMultiplexer : LongWord;
  1668.   end;
  1669.   {$EXTERNALSYM _WMWriterStatisticsEx}
  1670.   WM_WRITER_STATISTICS_EX = _WMWriterStatisticsEx;
  1671.   {$EXTERNALSYM WM_WRITER_STATISTICS_EX}
  1672.   TWMWriterStatisticsEx = _WMWriterStatisticsEx;
  1673. //
  1674. // Reader Statistics struct
  1675. //
  1676.   PWMReaderStatistics = ^TWMReaderStatistics;
  1677.   _WMReaderStatistics = packed record
  1678.     cbSize            : LongWord;
  1679.     dwBandwidth       : LongWord;
  1680.     cPacketsReceived  : LongWord;
  1681.     cPacketsRecovered : LongWord;
  1682.     cPacketsLost      : LongWord;
  1683.     wQuality          : Word;
  1684.   end;
  1685.   {$EXTERNALSYM _WMReaderStatistics}
  1686.   WM_READER_STATISTICS = _WMReaderStatistics;
  1687.   {$EXTERNALSYM WM_READER_STATISTICS}
  1688.   TWMReaderStatistics = _WMReaderStatistics;
  1689. //
  1690. // Reader Client Info struct
  1691. //
  1692.   PWMReaderClientInfo = ^TWMReaderClientInfo;
  1693.   _WMReaderClientInfo = packed record
  1694.     cbSize              : LongWord;
  1695.     wszLang             : PWideChar; // 2-3 letter language code
  1696.     wszBrowserUserAgent : PWideChar; // Embedded browser's user-agent string
  1697.     wszBrowserWebPage   : PWideChar; // The web page that contains the plugin
  1698.     qwReserved          : Int64;     // Reserved
  1699.     pReserved           : PLongInt;  // Reserved
  1700.     wszHostExe          : PWideChar; // iexplore.exe, netscape.exe dshow.exe, etc
  1701.     qwHostVersion       : Int64;     // Version of the host application e.g.:4.70.12.15
  1702.     wszPlayerUserAgent  : PWideChar; // String identifying the player application, e.g. WMPlayer/9.0.0.0
  1703.   end;
  1704.   {$EXTERNALSYM _WMReaderClientInfo}
  1705.   WM_READER_CLIENTINFO = _WMReaderClientInfo;
  1706.   {$EXTERNALSYM WM_READER_CLIENTINFO}
  1707.   TWMReaderClientInfo = _WMReaderClientInfo;
  1708. //
  1709. // This structure is returned with the WMT_CLIENT_CONNECT and
  1710. // WMT_CLIENT_DISCONNECT status notifications.  It is also used
  1711. // by IWMClientConnections.
  1712. //
  1713.   PWMClientProperties = ^TWMClientProperties;
  1714.   _WMClientProperties = packed record
  1715.     dwIPAddress : LongWord;
  1716.     dwPort      : LongWord;
  1717.   end;
  1718.   {$EXTERNALSYM _WMClientProperties}
  1719.   WM_CLIENT_PROPERTIES = _WMClientProperties;
  1720.   {$EXTERNALSYM WM_CLIENT_PROPERTIES}
  1721.   TWMClientProperties = _WMClientProperties;
  1722. //
  1723. // This structure is returned with the WMT_CLIENT_CONNECT_EX, WMT_CLIENT_DISCONNECT_EX
  1724. // and WMT_CLIENT_PROPERTIES status notifications.
  1725. //
  1726.   PWMClientPropertiesEx = ^TWMClientPropertiesEx;
  1727.   _WMClientPropertiesEx = packed record
  1728.     cbSize        : LongWord;     // size of structure
  1729.     pwszIPAddress : PWideChar; // IP address in dot notation
  1730.     pwszPort      : PWideChar; // Client's port number
  1731.     pwszDNSName   : PWideChar; // DNS name of client, if known
  1732.   end;
  1733.   {$EXTERNALSYM _WMClientPropertiesEx}
  1734.   WM_CLIENT_PROPERTIES_EX = _WMClientPropertiesEx;
  1735.   {$EXTERNALSYM WM_CLIENT_PROPERTIES_EX}
  1736.   TWMClientPropertiesEx = _WMClientPropertiesEx;
  1737. //
  1738. // Inclusive port number range.
  1739. // Used by IWMReaderNetworkConfig.
  1740. //
  1741.   PWMPortNumberRange = ^TWMPortNumberRange;
  1742.   _WMPortNumberRange = packed record
  1743.     wPortBegin : Word;
  1744.     wPortEnd   : Word;
  1745.   end;
  1746.   {$EXTERNALSYM _WMPortNumberRange}
  1747.   WM_PORT_NUMBER_RANGE = _WMPortNumberRange;
  1748.   {$EXTERNALSYM WM_PORT_NUMBER_RANGE}
  1749.   TWMPortNumberRange = _WMPortNumberRange;
  1750. //
  1751. // For passing data units to the file sink
  1752. //
  1753.   PWMTBufferSegment = ^TWMTBufferSegment;
  1754.   _WMT_BUFFER_SEGMENT = packed record
  1755.     pBuffer  : INSSBuffer;
  1756.     cbOffset : LongWord;
  1757.     cbLength : LongWord;
  1758.   end;
  1759.   {$EXTERNALSYM _WMT_BUFFER_SEGMENT}
  1760.   WMT_BUFFER_SEGMENT = _WMT_BUFFER_SEGMENT;
  1761.   {$EXTERNALSYM WMT_BUFFER_SEGMENT}
  1762.   TWMTBufferSegment = _WMT_BUFFER_SEGMENT;
  1763.   PWMTPayloadFragment = ^TWMTPayloadFragment;
  1764.   _WMT_PAYLOAD_FRAGMENT = packed record
  1765.     dwPayloadIndex : LongWord;
  1766.     segmentData    : TWMTBufferSegment;
  1767.   end;
  1768.   {$EXTERNALSYM _WMT_PAYLOAD_FRAGMENT}
  1769.   WMT_PAYLOAD_FRAGMENT = _WMT_PAYLOAD_FRAGMENT;
  1770.   {$EXTERNALSYM WMT_PAYLOAD_FRAGMENT}
  1771.   TWMTPayloadFragment = _WMT_PAYLOAD_FRAGMENT;
  1772.   PWMTFileSinkDataUnit = ^TWMTFileSinkDataUnit;
  1773.   _WMT_FILESINK_DATA_UNIT = packed record
  1774.     packetHeaderBuffer    : TWMTBufferSegment;
  1775.     cPayloads             : LongWord;
  1776.     pPayloadHeaderBuffers : PWMTBufferSegment;
  1777.     cPayloadDataFragments : LongWord;
  1778.     pPayloadDataFragments : PWMTPayloadFragment;
  1779.   end;
  1780.   {$EXTERNALSYM _WMT_FILESINK_DATA_UNIT}
  1781.   WMT_FILESINK_DATA_UNIT = _WMT_FILESINK_DATA_UNIT;
  1782.   {$EXTERNALSYM WMT_FILESINK_DATA_UNIT}
  1783.   TWMTFileSinkDataUnit = _WMT_FILESINK_DATA_UNIT;
  1784.   PWMTWebStreamFormat = ^TWMTWebStreamFormat;
  1785.   _WMT_WEBSTREAM_FORMAT = packed record
  1786.    cbSize                  : Word; // Set to sizeof( WMT_WEBSTREAM_FORMAT )
  1787.    cbSampleHeaderFixedData : Word; // Length of the fixed part of the sample header should be
  1788.                                    // set to sizeof( WMT_WEBSTREAM_SAMPLE_HEADER )
  1789.    wVersion                : Word;
  1790.    wReserved               : Word; // Reserved. Should be set to 0.
  1791.   end;
  1792.   {$EXTERNALSYM _WMT_WEBSTREAM_FORMAT}
  1793.   WMT_WEBSTREAM_FORMAT = _WMT_WEBSTREAM_FORMAT;
  1794.   {$EXTERNALSYM WMT_WEBSTREAM_FORMAT}
  1795.   TWMTWebStreamFormat = WMT_WEBSTREAM_FORMAT;
  1796.   PWMTWebStreamSampleHeader = ^TWMTWebStreamSampleHeader;
  1797.   _WMT_WEBSTREAM_SAMPLE_HEADER = packed record
  1798.     cbLength    : Word;                 // Length of this header including string data
  1799.                                         // should be set to sizeof( WMT_WEBSTREAM_SAMPLE_HEADER ) +
  1800.                                         // wcslen( wszURL ) * sizeof( WCHAR )
  1801.     wPart       : Word;                 // Current part. From 0 to cTotalParts - 1
  1802.     cTotalParts : Word;                 // Total number of parts for this file must be at least 1.
  1803.     wSampleType : Word;                 // Sample type. Should be set to
  1804.                                         //     WEBSTREAM_SAMPLE_TYPE_FILE = 0x0001 or
  1805.                                         //     WEBSTREAM_SAMPLE_TYPE_RENDER = 0x0002
  1806.     wszURL      : array[0..0] of WCHAR; // Variable length string data containing file url
  1807.   end;
  1808.   {$EXTERNALSYM _WMT_WEBSTREAM_SAMPLE_HEADER}
  1809.   WMT_WEBSTREAM_SAMPLE_HEADER = _WMT_WEBSTREAM_SAMPLE_HEADER;
  1810.   {$EXTERNALSYM WMT_WEBSTREAM_SAMPLE_HEADER}
  1811.   TWMTWebStreamSampleHeader = _WMT_WEBSTREAM_SAMPLE_HEADER;
  1812.   PWMAddressAccessEntry = ^TWMAddressAccessEntry;
  1813.   _WMAddressAccessEntry = packed record
  1814.     dwIPAddress : LongWord;
  1815.     dwMask      : LongWord;
  1816.   end;
  1817.   {$EXTERNALSYM _WMAddressAccessEntry}
  1818.   WM_ADDRESS_ACCESSENTRY = _WMAddressAccessEntry;
  1819.   {$EXTERNALSYM WM_ADDRESS_ACCESSENTRY}
  1820.   TWMAddressAccessEntry = _WMAddressAccessEntry;
  1821. ///////////////////////////////////////////////////////////////////////////////
  1822. //
  1823. // Structures for complex metadata attributes
  1824. //
  1825. ///////////////////////////////////////////////////////////////////////////////
  1826.   PWMPicture = ^TWMPicture;
  1827.   _WMPicture = packed record
  1828.     pwszMIMEType    : PWideChar;
  1829.     bPictureType    : BYTE;
  1830.     pwszDescription : PWideChar;
  1831.     dwDataLen       : LongWord;
  1832.     pbData          : PBYTE;
  1833.   end;
  1834.   {$EXTERNALSYM _WMPicture}
  1835.   WM_PICTURE = _WMPicture;
  1836.   {$EXTERNALSYM WM_PICTURE}
  1837.   TWMPicture = _WMPicture;
  1838.   PWMSynchronisedLyrics = ^TWMSynchronisedLyrics;
  1839.   _WMSynchronisedLyrics = packed record
  1840.     bTimeStampFormat      : BYTE;
  1841.     bContentType          : BYTE;
  1842.     pwszContentDescriptor : PWideChar;
  1843.     dwLyricsLen           : LongWord;
  1844.     pbLyrics              : PBYTE;
  1845.   end;
  1846.   {$EXTERNALSYM _WMSynchronisedLyrics}
  1847.   WM_SYNCHRONISED_LYRICS = _WMSynchronisedLyrics;
  1848.   {$EXTERNALSYM WM_SYNCHRONISED_LYRICS}
  1849.   TWMSynchronisedLyrics = _WMSynchronisedLyrics;
  1850.   PWMUserWebURL = ^TWMUserWebURL;
  1851.   _WMUserWebURL = packed record
  1852.     pwszDescription : PWideChar;
  1853.     pwszURL         : PWideChar;
  1854.   end;
  1855.   {$EXTERNALSYM _WMUserWebURL}
  1856.   WM_USER_WEB_URL = _WMUserWebURL;
  1857.   {$EXTERNALSYM WM_USER_WEB_URL}
  1858.   TWMUserWebURL = _WMUserWebURL;
  1859.   PWMUserText = ^TWMUserText;
  1860.   _WMUserText = packed record
  1861.     pwszDescription : PWideChar;
  1862.     pwszText        : PWideChar;
  1863.   end;
  1864.   {$EXTERNALSYM _WMUserText}
  1865.   WM_USER_TEXT = _WMUserText;
  1866.   {$EXTERNALSYM WM_USER_TEXT}
  1867.   TWMUserText = _WMUserText;
  1868.   PWMLeakyBucketPair = ^TWMLeakyBucketPair;
  1869.   _WMLeakyBucketPair = packed record
  1870.     dwBitrate      : LongWord;
  1871.     msBufferWindow : LongWord;
  1872.   end;
  1873.   {$EXTERNALSYM _WMLeakyBucketPair}
  1874.   WM_LEAKY_BUCKET_PAIR = _WMLeakyBucketPair;
  1875.   {$EXTERNALSYM WM_LEAKY_BUCKET_PAIR}
  1876.   TWMLeakyBucketPair = _WMLeakyBucketPair;
  1877. ///////////////////////////////////////////////////////////////////////////////
  1878. //
  1879. // Structure needed for using GetDRMProperty.
  1880. //
  1881. ///////////////////////////////////////////////////////////////////////////////
  1882.   PWMLicenseStateData = ^TWMLicenseStateData;
  1883.   _WM_LICENSE_STATE_DATA = packed record
  1884.      dwSize      : LongWord; // Size of the entire structure.
  1885.      dwNumStates : LongWord; // Number of state data passed back in array of structure below
  1886.      stateData   : array[0..0] of TDRMLicenseStateData;
  1887.   end;
  1888.   {$EXTERNALSYM _WM_LICENSE_STATE_DATA}
  1889.   WM_LICENSE_STATE_DATA = _WM_LICENSE_STATE_DATA;
  1890.   {$EXTERNALSYM WM_LICENSE_STATE_DATA}
  1891.   TWMLicenseStateData = _WM_LICENSE_STATE_DATA;
  1892. ///////////////////////////////////////////////////////////////////////////////
  1893. // Watermark entry
  1894. ///////////////////////////////////////////////////////////////////////////////
  1895.   PWMTWatermarkEntry = ^TWMTWatermarkEntry;
  1896.   __WMT_WATERMARK_ENTRY = packed record
  1897.      wmetType        : TWMTWatermarkEntryType;
  1898.      clsid           : TGUID;
  1899.      cbDisplayName   : UINT;
  1900.      pwszDisplayName : PWideChar;
  1901.   end;
  1902.   {$EXTERNALSYM __WMT_WATERMARK_ENTRY}
  1903.   WMT_WATERMARK_ENTRY = __WMT_WATERMARK_ENTRY;
  1904.   {$EXTERNALSYM WMT_WATERMARK_ENTRY}
  1905.   TWMTWatermarkEntry = __WMT_WATERMARK_ENTRY;
  1906. ///////////////////////////////////////////////////////////////////////////////
  1907. // VideoImage structs
  1908. ///////////////////////////////////////////////////////////////////////////////
  1909. //
  1910. // dwControlFlags
  1911. //
  1912. const
  1913.   WMT_VIDEOIMAGE_SAMPLE_INPUT_FRAME               = 1; // sample has input frame
  1914.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_INPUT_FRAME}
  1915.   WMT_VIDEOIMAGE_SAMPLE_OUTPUT_FRAME              = 2; // sample produces output frame
  1916.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_OUTPUT_FRAME}
  1917.   WMT_VIDEOIMAGE_SAMPLE_USES_CURRENT_INPUT_FRAME  = 4;
  1918.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_USES_CURRENT_INPUT_FRAME}
  1919.   WMT_VIDEOIMAGE_SAMPLE_USES_PREVIOUS_INPUT_FRAME = 8;
  1920.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_USES_PREVIOUS_INPUT_FRAME}
  1921. //
  1922. // dwInputFlags
  1923. //
  1924.   WMT_VIDEOIMAGE_SAMPLE_MOTION       = 1; // acef used (includes resizing)
  1925.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_MOTION}
  1926.   WMT_VIDEOIMAGE_SAMPLE_ROTATION     = 2; // bd also used (not valid without acef)
  1927.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_ROTATION}
  1928.   WMT_VIDEOIMAGE_SAMPLE_BLENDING     = 4; // BlendCoef1 used
  1929.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_BLENDING}
  1930.   WMT_VIDEOIMAGE_SAMPLE_ADV_BLENDING = 8; // BlendCoef2 also used (not valid without BlendCoef1)
  1931.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE_ADV_BLENDING}
  1932.   WMT_VIDEOIMAGE_INTEGER_DENOMINATOR = 65536;
  1933.   {$EXTERNALSYM WMT_VIDEOIMAGE_INTEGER_DENOMINATOR}
  1934.   WMT_VIDEOIMAGE_MAGIC_NUMBER = $1d4a45f2;
  1935.   {$EXTERNALSYM WMT_VIDEOIMAGE_MAGIC_NUMBER}
  1936. type
  1937.   PWMTVideoImageSample = ^TWMTVideoImageSample;
  1938.   __WMT_VIDEOIMAGE_SAMPLE = packed record
  1939.     dwMagic        : LongWord;
  1940.     cbStruct       : ULONG; // size of structure; incudes dwMagic and cbStruct
  1941.     dwControlFlags : LongWord;
  1942.     //
  1943.     // most recent input frame
  1944.     //
  1945.     dwInputFlagsCur   : LongWord;
  1946.     lCurMotionXtoX    : LongInt; // a
  1947.     lCurMotionYtoX    : LongInt; // b
  1948.     lCurMotionXoffset : LongInt; // c
  1949.     lCurMotionXtoY    : LongInt; // d
  1950.     lCurMotionYtoY    : LongInt; // e
  1951.     lCurMotionYoffset : LongInt; // f
  1952.     lCurBlendCoef1    : LongInt;
  1953.     lCurBlendCoef2    : LongInt;
  1954.     //
  1955.     // second most recent input frame
  1956.     //
  1957.     dwInputFlagsPrev   : LongWord;
  1958.     lPrevMotionXtoX    : LongInt; // a
  1959.     lPrevMotionYtoX    : LongInt; // b
  1960.     lPrevMotionXoffset : LongInt; // c
  1961.     lPrevMotionXtoY    : LongInt; // d
  1962.     lPrevMotionYtoY    : LongInt; // e
  1963.     lPrevMotionYoffset : LongInt; // f
  1964.     lPrevBlendCoef1    : LongInt;
  1965.     lPrevBlendCoef2    : LongInt;
  1966.   end;
  1967.   {$EXTERNALSYM __WMT_VIDEOIMAGE_SAMPLE}
  1968.   WMT_VIDEOIMAGE_SAMPLE = __WMT_VIDEOIMAGE_SAMPLE;
  1969.   {$EXTERNALSYM WMT_VIDEOIMAGE_SAMPLE}
  1970.   TWMTVideoImageSample = __WMT_VIDEOIMAGE_SAMPLE;
  1971. ///////////////////////////////////////////////////////////////////////////////
  1972. //
  1973. // Media-type structures and GUIDs.
  1974. //
  1975. ///////////////////////////////////////////////////////////////////////////////
  1976. //
  1977. // We use DirectShow media types in this SDK. However, to avoid conflict with
  1978. // their names, we define our own version of the structure. This is exactly
  1979. // the same as an AM_MEDIA_TYPE!
  1980. //
  1981.   PWMMediaType = ^TWMMediaType;
  1982.   _WMMediaType = packed record
  1983.     majortype            : TGUID;
  1984.     subtype              : TGUID;
  1985.     bFixedSizeSamples    : BOOL;
  1986.     bTemporalCompression : BOOL;
  1987.     lSampleSize          : ULONG;
  1988.     formattype           : TGUID;
  1989.     pUnk                 : IUnknown;
  1990.     cbFormat             : ULONG;
  1991.     pbFormat             : PBYTE; // size_is(cbFormat)
  1992.   end;
  1993.   {$EXTERNALSYM _WMMediaType}
  1994.   WM_MEDIA_TYPE = _WMMediaType;
  1995.   {$EXTERNALSYM WM_MEDIA_TYPE}
  1996.   TWMMediaType = _WMMediaType;
  1997.   PWMVideoInfoHeader = ^TWMVideoInfoHeader;
  1998.   tagWMVIDEOINFOHEADER = packed record
  1999.     rcSource        : TRECT;    // The bit we really want to use.
  2000.     rcTarget        : TRECT;    // Where the video should go.
  2001.     dwBitRate       : LongWord; // Approximate bit data rate.
  2002.     dwBitErrorRate  : LongWord; // Bit error rate for this stream.
  2003.     AvgTimePerFrame : Int64;    // Average time per frame (100ns units).
  2004.     bmiHeader       : TBitmapInfoHeader;
  2005.   end;
  2006.   {$EXTERNALSYM tagWMVIDEOINFOHEADER}
  2007.   WMVIDEOINFOHEADER = tagWMVIDEOINFOHEADER;
  2008.   {$EXTERNALSYM WMVIDEOINFOHEADER}
  2009.   TWMVideoInfoHeader = tagWMVIDEOINFOHEADER;
  2010.   PWMVideoInfoHeader2 = ^TWMVideoInfoHeader2;
  2011.   tagWMVIDEOINFOHEADER2 = packed record
  2012.     rcSource           : TRECT;     // The bit we really want to use.
  2013.     rcTarget           : TRECT;     // Where the video should go.
  2014.     dwBitRate          : LongWord;  // Approximate bit data rate.
  2015.     dwBitErrorRate     : LongWord;  // Bit error rate for this stream.
  2016.     AvgTimePerFrame    : Int64;     // Average time per frame (100ns units).
  2017.     dwInterlaceFlags   : LongWord;  // Use AMINTERLACE_* defines. Reject connection if undefined bits are not 0.
  2018.     dwCopyProtectFlags : LongWord;  // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0.
  2019.     dwPictAspectRatioX : LongWord;  // X dimension of picture aspect ratio, e.g. 16 for 16x9 display.
  2020.     dwPictAspectRatioY : LongWord;  // Y dimension of picture aspect ratio, e.g.  9 for 16x9 display.
  2021.     dwReserved1        : LongWord;  // Must be 0; reject connection otherwise.
  2022.     dwReserved2        : LongWord;  // Must be 0; reject connection otherwise.
  2023.     bmiHeader          : TBitmapInfoHeader;
  2024.   end;
  2025.   {$EXTERNALSYM tagWMVIDEOINFOHEADER2}
  2026.   WMVIDEOINFOHEADER2 = tagWMVIDEOINFOHEADER2;
  2027.   {$EXTERNALSYM WMVIDEOINFOHEADER2}
  2028.   TWMVideoInfoHeader2 = tagWMVIDEOINFOHEADER2;
  2029.   PWMMPEG2VideoInfo = ^TWMMPEG2VideoInfo;
  2030.   tagWMMPEG2VIDEOINFO = packed record
  2031.     hdr              : TWMVideoInfoHeader2;     // Video info header2.
  2032.     dwStartTimeCode  : LongWord;                // Not used for DVD.
  2033.     cbSequenceHeader : LongWord;                // Is 0 for DVD (no sequence header).
  2034.     dwProfile        : LongWord;                // Use enum MPEG2Profile.
  2035.     dwLevel          : LongWord;                // Use enum MPEG2Level.
  2036.     dwFlags          : LongWord;                // Use AMMPEG2_* defines.  Reject connection if undefined bits are not 0.
  2037.     dwSequenceHeader : array[0..0] of LongWord; // Sequence header.
  2038.   end;
  2039.   {$EXTERNALSYM tagWMMPEG2VIDEOINFO}
  2040.   WMMPEG2VIDEOINFO = tagWMMPEG2VIDEOINFO;
  2041.   {$EXTERNALSYM WMMPEG2VIDEOINFO}
  2042.   TWMMPEG2VideoInfo = tagWMMPEG2VIDEOINFO;
  2043.   PWMScriptFormat = ^TWMScriptFormat;
  2044.   tagWMSCRIPTFORMAT = packed record
  2045.     scriptType: TGUID;
  2046.   end;
  2047.   {$EXTERNALSYM tagWMSCRIPTFORMAT}
  2048.   WMSCRIPTFORMAT = tagWMSCRIPTFORMAT;
  2049.   {$EXTERNALSYM WMSCRIPTFORMAT}
  2050.   TWMScriptFormat = tagWMSCRIPTFORMAT;
  2051. //
  2052. // This special GUID is used to create a subtype from an audio format tag, or
  2053. // video four-character code. Just fill in the first LongWord of the GUID with
  2054. // the appropriate value.
  2055. //
  2056. const
  2057.   WMMEDIASUBTYPE_Base             : TGUID = '{00000000-0000-0010-8000-00AA00389B71}';
  2058.   {$EXTERNALSYM WMMEDIASUBTYPE_Base}
  2059.   WMMEDIATYPE_Video               : TGUID = '{73646976-0000-0010-8000-00AA00389B71}'; // 'vids'
  2060.   {$EXTERNALSYM WMMEDIATYPE_Video}
  2061.   WMMEDIASUBTYPE_RGB1             : TGUID = '{e436eb78-524f-11ce-9f53-0020af0ba770}';
  2062.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB1}
  2063.   WMMEDIASUBTYPE_RGB4             : TGUID = '{e436eb79-524f-11ce-9f53-0020af0ba770}';
  2064.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB4}
  2065.   WMMEDIASUBTYPE_RGB8             : TGUID = '{e436eb7a-524f-11ce-9f53-0020af0ba770}';
  2066.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB8}
  2067.   WMMEDIASUBTYPE_RGB565           : TGUID = '{e436eb7b-524f-11ce-9f53-0020af0ba770}';
  2068.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB565}
  2069.   WMMEDIASUBTYPE_RGB555           : TGUID = '{e436eb7c-524f-11ce-9f53-0020af0ba770}';
  2070.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB555}
  2071.   WMMEDIASUBTYPE_RGB24            : TGUID = '{e436eb7d-524f-11ce-9f53-0020af0ba770}';
  2072.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB24}
  2073.   WMMEDIASUBTYPE_RGB32            : TGUID = '{e436eb7e-524f-11ce-9f53-0020af0ba770}';
  2074.   {$EXTERNALSYM WMMEDIASUBTYPE_RGB32}
  2075.   WMMEDIASUBTYPE_I420             : TGUID = '{30323449-0000-0010-8000-00AA00389B71}'; // 'YV12'
  2076.   {$EXTERNALSYM WMMEDIASUBTYPE_I420}
  2077.   WMMEDIASUBTYPE_IYUV             : TGUID = '{56555949-0000-0010-8000-00AA00389B71}'; // 'YV12'
  2078.   {$EXTERNALSYM WMMEDIASUBTYPE_IYUV}
  2079.   WMMEDIASUBTYPE_YV12             : TGUID = '{31313259-0000-0010-8000-00AA00389B71}'; // 'YV12'
  2080.   {$EXTERNALSYM WMMEDIASUBTYPE_YV12}
  2081.   WMMEDIASUBTYPE_YUY2             : TGUID = '{32595559-0000-0010-8000-00AA00389B71}'; // 'YUY2'
  2082.   {$EXTERNALSYM WMMEDIASUBTYPE_YUY2}
  2083.   WMMEDIASUBTYPE_UYVY             : TGUID = '{59565955-0000-0010-8000-00AA00389B71}'; // 'UYVY'
  2084.   {$EXTERNALSYM WMMEDIASUBTYPE_UYVY}
  2085.   WMMEDIASUBTYPE_YVYU             : TGUID = '{55595659-0000-0010-8000-00AA00389B71}'; // 'YVYU'
  2086.   {$EXTERNALSYM WMMEDIASUBTYPE_YVYU}
  2087.   WMMEDIASUBTYPE_YVU9             : TGUID = '{39555659-0000-0010-8000-00AA00389B71}'; // 'YVU9'
  2088.   {$EXTERNALSYM WMMEDIASUBTYPE_YVU9}
  2089.   WMMEDIASUBTYPE_VIDEOIMAGE       : TGUID = '{1d4a45f2-e5f6-4b44-8388-f0ae5c0e0c37}';
  2090.   {$EXTERNALSYM WMMEDIASUBTYPE_VIDEOIMAGE}
  2091.   WMMEDIASUBTYPE_MP43             : TGUID = '{3334504D-0000-0010-8000-00AA00389B71}';
  2092.   {$EXTERNALSYM WMMEDIASUBTYPE_MP43}
  2093.   WMMEDIASUBTYPE_MP4S             : TGUID = '{5334504D-0000-0010-8000-00AA00389B71}';
  2094.   {$EXTERNALSYM WMMEDIASUBTYPE_MP4S}
  2095.   WMMEDIASUBTYPE_WMV1             : TGUID = '{31564D57-0000-0010-8000-00AA00389B71}';
  2096.   {$EXTERNALSYM WMMEDIASUBTYPE_WMV1}
  2097.   WMMEDIASUBTYPE_WMV2             : TGUID = '{32564D57-0000-0010-8000-00AA00389B71}';
  2098.   {$EXTERNALSYM WMMEDIASUBTYPE_WMV2}
  2099.   WMMEDIASUBTYPE_MSS1             : TGUID = '{3153534D-0000-0010-8000-00AA00389B71}';
  2100.   {$EXTERNALSYM WMMEDIASUBTYPE_MSS1}
  2101.   WMMEDIASUBTYPE_MPEG2_VIDEO      : TGUID = '{e06d8026-db46-11cf-b4d1-00805f6cbbea}';
  2102.   {$EXTERNALSYM WMMEDIASUBTYPE_MPEG2_VIDEO}
  2103.   WMMEDIATYPE_Audio               : TGUID = '{73647561-0000-0010-8000-00AA00389B71}'; // 'auds'
  2104.   {$EXTERNALSYM WMMEDIATYPE_Audio}
  2105.   WMMEDIASUBTYPE_PCM              : TGUID = '{00000001-0000-0010-8000-00AA00389B71}';
  2106.   {$EXTERNALSYM WMMEDIASUBTYPE_PCM}
  2107.   WMMEDIASUBTYPE_DRM              : TGUID = '{00000009-0000-0010-8000-00AA00389B71}';
  2108.   {$EXTERNALSYM WMMEDIASUBTYPE_DRM}
  2109.   WMMEDIASUBTYPE_WMAudioV9        : TGUID = '{00000162-0000-0010-8000-00AA00389B71}';
  2110.   {$EXTERNALSYM WMMEDIASUBTYPE_WMAudioV9}
  2111.   WMMEDIASUBTYPE_WMAudio_Lossless : TGUID = '{00000163-0000-0010-8000-00AA00389B71}';
  2112.   {$EXTERNALSYM WMMEDIASUBTYPE_WMAudio_Lossless}
  2113.   WMMEDIASUBTYPE_MSS2             : TGUID = '{3253534D-0000-0010-8000-00AA00389B71}';
  2114.   {$EXTERNALSYM WMMEDIASUBTYPE_MSS2}
  2115.   WMMEDIASUBTYPE_WMSP1            : TGUID = '{0000000A-0000-0010-8000-00AA00389B71}';
  2116.   {$EXTERNALSYM WMMEDIASUBTYPE_WMSP1}
  2117.   WMMEDIASUBTYPE_WMV3             : TGUID = '{33564D57-0000-0010-8000-00AA00389B71}';
  2118.   {$EXTERNALSYM WMMEDIASUBTYPE_WMV3}
  2119.   WMMEDIASUBTYPE_WMVP             : TGUID = '{50564D57-0000-0010-8000-00AA00389B71}';
  2120.   {$EXTERNALSYM WMMEDIASUBTYPE_WMVP}
  2121. //
  2122. // WM Audio v2 and v7 are actually compatible bitstreams.
  2123. //
  2124.   WMMEDIASUBTYPE_WMAudioV8 : TGUID = '{00000161-0000-0010-8000-00AA00389B71}';
  2125.   {$EXTERNALSYM WMMEDIASUBTYPE_WMAudioV8}
  2126.   WMMEDIASUBTYPE_WMAudioV7 : TGUID = '{00000161-0000-0010-8000-00AA00389B71}';
  2127.   {$EXTERNALSYM WMMEDIASUBTYPE_WMAudioV7}
  2128.   WMMEDIASUBTYPE_WMAudioV2 : TGUID = '{00000161-0000-0010-8000-00AA00389B71}';
  2129.   {$EXTERNALSYM WMMEDIASUBTYPE_WMAudioV2}
  2130.   WMMEDIASUBTYPE_ACELPnet  : TGUID = '{00000130-0000-0010-8000-00AA00389B71}';
  2131.   {$EXTERNALSYM WMMEDIASUBTYPE_ACELPnet}
  2132.   WMMEDIASUBTYPE_MP3       : TGUID = '{00000050-0000-0010-8000-00AA00389B71}';
  2133.   {$EXTERNALSYM WMMEDIASUBTYPE_MP3}
  2134.   WMMEDIASUBTYPE_WebStream : TGUID = '{776257d4-c627-41cb-8f81-7ac7ff1c40cc}';
  2135.   {$EXTERNALSYM WMMEDIASUBTYPE_WebStream}
  2136.   WMMEDIATYPE_Script       : TGUID = '{73636d64-0000-0010-8000-00AA00389B71}'; // 'scmd'
  2137.   {$EXTERNALSYM WMMEDIATYPE_Script}
  2138.   WMMEDIATYPE_Image        : TGUID = '{34A50FD8-8AA5-4386-81FE-A0EFE0488E31}'; // 'imag'
  2139.   {$EXTERNALSYM WMMEDIATYPE_Image}
  2140.   WMMEDIATYPE_FileTransfer : TGUID = '{D9E47579-930E-4427-ADFC-AD80F290E470}'; // 'fxfr'
  2141.   {$EXTERNALSYM WMMEDIATYPE_FileTransfer}
  2142.   WMMEDIATYPE_Text         : TGUID = '{9BBA1EA7-5AB2-4829-BA57-0940209BCF3E}'; // 'text'
  2143.   {$EXTERNALSYM WMMEDIATYPE_Text}
  2144.   WMFORMAT_VideoInfo       : TGUID = '{05589f80-c356-11ce-bf01-00aa0055595a}';
  2145.   {$EXTERNALSYM WMFORMAT_VideoInfo}
  2146.   WMFORMAT_MPEG2Video      : TGUID = '{e06d80e3-db46-11cf-b4d1-00805f6cbbea}';
  2147.   {$EXTERNALSYM WMFORMAT_MPEG2Video}
  2148.   WMFORMAT_WaveFormatEx    : TGUID = '{05589f81-c356-11ce-bf01-00aa0055595a}';
  2149.   {$EXTERNALSYM WMFORMAT_WaveFormatEx}
  2150.   WMFORMAT_Script          : TGUID = '{5C8510F2-DEBE-4ca7-BBA5-F07A104F8DFF}';
  2151.   {$EXTERNALSYM WMFORMAT_Script}
  2152.   WMFORMAT_WebStream       : TGUID = '{da1e6b13-8359-4050-b398-388e965bf00c}';
  2153.   {$EXTERNALSYM WMFORMAT_WebStream}
  2154.   WMSCRIPTTYPE_TwoStrings  : TGUID = '{82f38a70-c29f-11d1-97ad-00a0c95ea850}';
  2155.   {$EXTERNALSYM WMSCRIPTTYPE_TwoStrings}
  2156. //////////////////////////////////////////////////////////////////////////////
  2157. //
  2158. // GUIDs for common buffer properties
  2159. //
  2160.   WM_SampleExtensionGUID_OutputCleanPoint : TGUID = '{f72a3c6f-6eb4-4ebc-b192-09ad9759e828}';
  2161.   {$EXTERNALSYM WM_SampleExtensionGUID_OutputCleanPoint}
  2162.   WM_SampleExtensionGUID_Timecode         : TGUID = '{399595ec-8667-4e2d-8fdb-98814ce76c1e}';
  2163.   {$EXTERNALSYM WM_SampleExtensionGUID_Timecode}
  2164. //
  2165. // This buffer property is used in conjunction with file transfer streams.
  2166. // It is the name of the file being transfered (in WCHARs).
  2167. //
  2168.   WM_SampleExtensionGUID_FileName          : TGUID = '{e165ec0e-19ed-45d7-b4a7-25cbd1e28e9b}';
  2169.   {$EXTERNALSYM WM_SampleExtensionGUID_FileName}
  2170.   WM_SampleExtensionGUID_ContentType       : TGUID = '{d590dc20-07bc-436c-9cf7-f3bbfbf1a4dc}';
  2171.   {$EXTERNALSYM WM_SampleExtensionGUID_ContentType}
  2172.   WM_SampleExtensionGUID_PixelAspectRatio  : TGUID = '{1b1ee554-f9ea-4bc8-821a-376b74e4c4b8}';
  2173.   {$EXTERNALSYM WM_SampleExtensionGUID_PixelAspectRatio}
  2174.   WM_SampleExtensionGUID_SampleDuration    : TGUID = '{c6bd9450-867f-4907-83a3-c77921b733ad}';
  2175.   {$EXTERNALSYM WM_SampleExtensionGUID_SampleDuration}
  2176. //
  2177. // Constants for use with the corresponding sample extension properties
  2178. //
  2179.   WM_SampleExtension_ContentType_Size      = 1;
  2180.   {$EXTERNALSYM WM_SampleExtension_ContentType_Size}
  2181.   WM_SampleExtension_PixelAspectRatio_Size = 2;
  2182.   {$EXTERNALSYM WM_SampleExtension_PixelAspectRatio_Size}
  2183.   WM_SampleExtension_Timecode_Size         = 14;
  2184.   {$EXTERNALSYM WM_SampleExtension_Timecode_Size}
  2185.   WM_SampleExtension_SampleDuration_Size   = 2;
  2186.   {$EXTERNALSYM WM_SampleExtension_SampleDuration_Size}
  2187. ///////////////////////////////////////////////////////////////////////////////
  2188. //
  2189. // Content Types to be used with WM_SampleExtensionGUID_ContentType
  2190. // on INSSBuffer3::SetProperty/GetProperty
  2191. //
  2192. ///////////////////////////////////////////////////////////////////////////////
  2193.   WM_CT_INTERLACED         = 128;
  2194.   {$EXTERNALSYM WM_CT_INTERLACED}
  2195.   WM_CT_BOTTOM_FIELD_FIRST = 32;
  2196.   {$EXTERNALSYM WM_CT_BOTTOM_FIELD_FIRST}
  2197.   WM_CT_TOP_FIELD_FIRST    = 64;
  2198.   {$EXTERNALSYM WM_CT_TOP_FIELD_FIRST}
  2199. ///////////////////////////////////////////////////////////////////////////////
  2200. //
  2201. // Timecode structures to be used with WM_SampleExtensionGUID_Timecode
  2202. // on INSSBuffer3::SetProperty/GetProperty.  The timecode LongWord
  2203. // contains the following timecode representation:
  2204. //
  2205. // BYTE  MSB             LSB
  2206. // ----------------------------------------------
  2207. // 1     Tens of hour    Hour
  2208. // 2     Tens of minute  Minute
  2209. // 3     Tens of second  Second
  2210. // 4     Tens of frame   Frame
  2211. //
  2212. ///////////////////////////////////////////////////////////////////////////////
  2213. type
  2214.   PWMTTimeCodeExtensionData = ^TWMTTimeCodeExtensionData;
  2215.   _WMT_TIMECODE_EXTENSION_DATA = packed record
  2216.     wRange     : Word;
  2217.     dwTimecode : LongWord;
  2218.     dwUserbits : LongWord;
  2219.     dwAmFlags  : LongWord;
  2220.   end;
  2221.   {$EXTERNALSYM _WMT_TIMECODE_EXTENSION_DATA}
  2222.   WMT_TIMECODE_EXTENSION_DATA = _WMT_TIMECODE_EXTENSION_DATA;
  2223.   {$EXTERNALSYM WMT_TIMECODE_EXTENSION_DATA}
  2224.   TWMTTimeCodeExtensionData = _WMT_TIMECODE_EXTENSION_DATA;
  2225. ///////////////////////////////////////////////////////////////////////////////
  2226. //
  2227. // IID GUIDs defined here.
  2228. //
  2229. ///////////////////////////////////////////////////////////////////////////////
  2230. const
  2231.   IID_IWMMediaProps             : TGUID = '{96406bce-2b2b-11d3-b36b-00c04f6108ff}';
  2232.   {$EXTERNALSYM IID_IWMMediaProps}
  2233.   IID_IWMVideoMediaProps        : TGUID = '{96406bcf-2b2b-11d3-b36b-00c04f6108ff}';
  2234.   {$EXTERNALSYM IID_IWMVideoMediaProps}
  2235.   IID_IWMWriter                 : TGUID = '{96406bd4-2b2b-11d3-b36b-00c04f6108ff}';
  2236.   {$EXTERNALSYM IID_IWMWriter}
  2237.   IID_IWMInputMediaProps        : TGUID = '{96406bd5-2b2b-11d3-b36b-00c04f6108ff}';
  2238.   {$EXTERNALSYM IID_IWMInputMediaProps}
  2239.   IID_IWMReader                 : TGUID = '{96406bd6-2b2b-11d3-b36b-00c04f6108ff}';
  2240.   {$EXTERNALSYM IID_IWMReader}
  2241.   IID_IWMSyncReader             : TGUID = '{9397f121-7705-4dc9-b049-98b698188414}';
  2242.   {$EXTERNALSYM IID_IWMSyncReader}
  2243.   IID_IWMSyncReader2            : TGUID = '{faed3d21-1b6b-4af7-8cb6-3e189bbc187b}';
  2244.   {$EXTERNALSYM IID_IWMSyncReader2}
  2245.   IID_IWMOutputMediaProps       : TGUID = '{96406bd7-2b2b-11d3-b36b-00c04f6108ff}';
  2246.   {$EXTERNALSYM IID_IWMOutputMediaProps}
  2247.   IID_IWMStatusCallback         : TGUID = '{6d7cdc70-9888-11d3-8edc-00c04f6109cf}';
  2248.   {$EXTERNALSYM IID_IWMStatusCallback}
  2249.   IID_IWMReaderCallback         : TGUID = '{96406bd8-2b2b-11d3-b36b-00c04f6108ff}';
  2250.   {$EXTERNALSYM IID_IWMReaderCallback}
  2251.   IID_IWMCredentialCallback     : TGUID = '{342e0eb7-e651-450c-975b-2ace2c90c48e}';
  2252.   {$EXTERNALSYM IID_IWMCredentialCallback}
  2253.   IID_IWMMetadataEditor         : TGUID = '{96406bd9-2b2b-11d3-b36b-00c04f6108ff}';
  2254.   {$EXTERNALSYM IID_IWMMetadataEditor}
  2255.   IID_IWMMetadataEditor2        : TGUID = '{203cffe3-2e18-4fdf-b59d-6e71530534cf}';
  2256.   {$EXTERNALSYM IID_IWMMetadataEditor2}
  2257.   IID_IWMDRMEditor              : TGUID = '{FF130EBC-A6C3-42A6-B401-C3382C3E08B3}';
  2258.   {$EXTERNALSYM IID_IWMDRMEditor}
  2259.   IID_IWMHeaderInfo             : TGUID = '{96406bda-2b2b-11d3-b36b-00c04f6108ff}';
  2260.   {$EXTERNALSYM IID_IWMHeaderInfo}
  2261.   IID_IWMHeaderInfo2            : TGUID = '{15cf9781-454e-482e-b393-85fae487a810}';
  2262.   {$EXTERNALSYM IID_IWMHeaderInfo2}
  2263.   IID_IWMHeaderInfo3            : TGUID = '{15CC68E3-27CC-4ecd-B222-3F5D02D80BD5}';
  2264.   {$EXTERNALSYM IID_IWMHeaderInfo3}
  2265.   IID_IWMProfileManager         : TGUID = '{d16679f2-6ca0-472d-8d31-2f5d55aee155}';
  2266.   {$EXTERNALSYM IID_IWMProfileManager}
  2267.   IID_IWMProfileManager2        : TGUID = '{7a924e51-73c1-494d-8019-23d37ed9b89a}';
  2268.   {$EXTERNALSYM IID_IWMProfileManager2}
  2269.   IID_IWMProfileManagerLanguage : TGUID = '{ba4dcc78-7ee0-4ab8-b27a-dbce8bc51454}';
  2270.   {$EXTERNALSYM IID_IWMProfileManagerLanguage}
  2271.   IID_IWMProfile                : TGUID = '{96406bdb-2b2b-11d3-b36b-00c04f6108ff}';
  2272.   {$EXTERNALSYM IID_IWMProfile}
  2273.   IID_IWMProfile2               : TGUID = '{07e72d33-d94e-4be7-8843-60ae5ff7e5f5}';
  2274.   {$EXTERNALSYM IID_IWMProfile2}
  2275.   IID_IWMProfile3               : TGUID = '{00ef96cc-a461-4546-8bcd-c9a28f0e06f5}';
  2276.   {$EXTERNALSYM IID_IWMProfile3}
  2277.   IID_IWMStreamConfig           : TGUID = '{96406bdc-2b2b-11d3-b36b-00c04f6108ff}';
  2278.   {$EXTERNALSYM IID_IWMStreamConfig}
  2279.   IID_IWMStreamConfig2          : TGUID = '{7688d8cb-fc0d-43bd-9459-5a8dec200cfa}';
  2280.   {$EXTERNALSYM IID_IWMStreamConfig2}
  2281.   IID_IWMStreamConfig3          : TGUID = '{cb164104-3aa9-45a7-9ac9-4daee131d6e1}';
  2282.   {$EXTERNALSYM IID_IWMStreamConfig3}
  2283.   IID_IWMStreamList             : TGUID = '{96406bdd-2b2b-11d3-b36b-00c04f6108ff}';
  2284.   {$EXTERNALSYM IID_IWMStreamList}
  2285.   IID_IWMMutualExclusion        : TGUID = '{96406bde-2b2b-11d3-b36b-00c04f6108ff}';
  2286.   {$EXTERNALSYM IID_IWMMutualExclusion}
  2287.   IID_IWMMutualExclusion2       : TGUID = '{0302b57d-89d1-4ba2-85c9-166f2c53eb91}';
  2288.   {$EXTERNALSYM IID_IWMMutualExclusion2}
  2289.   IID_IWMBandwidthSharing       : TGUID = '{ad694af1-f8d9-42f8-bc47-70311b0c4f9e}';
  2290.   {$EXTERNALSYM IID_IWMBandwidthSharing}
  2291.   IID_IWMStreamPrioritization   : TGUID = '{8c1c6090-f9a8-4748-8ec3-dd1108ba1e77}';
  2292.   {$EXTERNALSYM IID_IWMStreamPrioritization}
  2293.   IID_IWMWriterAdvanced         : TGUID = '{96406be3-2b2b-11d3-b36b-00c04f6108ff}';
  2294.   {$EXTERNALSYM IID_IWMWriterAdvanced}
  2295.   IID_IWMWriterAdvanced2        : TGUID = '{962dc1ec-c046-4db8-9cc7-26ceae500817}';
  2296.   {$EXTERNALSYM IID_IWMWriterAdvanced2}
  2297.   IID_IWMWriterAdvanced3        : TGUID = '{2cd6492d-7c37-4e76-9d3b-59261183a22e}';
  2298.   {$EXTERNALSYM IID_IWMWriterAdvanced3}
  2299.   IID_IWMWriterPreprocess       : TGUID = '{fc54a285-38c4-45b5-aa23-85b9f7cb424b}';
  2300.   {$EXTERNALSYM IID_IWMWriterPreprocess}
  2301.   IID_IWMWriterSink             : TGUID = '{96406be4-2b2b-11d3-b36b-00c04f6108ff}';
  2302.   {$EXTERNALSYM IID_IWMWriterSink}
  2303.   IID_IWMWriterFileSink         : TGUID = '{96406be5-2b2b-11d3-b36b-00c04f6108ff}';
  2304.   {$EXTERNALSYM IID_IWMWriterFileSink}
  2305.   IID_IWMWriterFileSink2        : TGUID = '{14282ba7-4aef-4205-8ce5-c229035a05bc}';
  2306.   {$EXTERNALSYM IID_IWMWriterFileSink2}
  2307.   IID_IWMWriterFileSink3        : TGUID = '{3fea4feb-2945-47a7-a1dd-c53a8fc4c45c}';
  2308.   {$EXTERNALSYM IID_IWMWriterFileSink3}
  2309.   IID_IWMWriterNetworkSink      : TGUID = '{96406be7-2b2b-11d3-b36b-00c04f6108ff}';
  2310.   {$EXTERNALSYM IID_IWMWriterNetworkSink}
  2311.   IID_IWMClientConnections      : TGUID = '{73c66010-a299-41df-b1f0-ccf03b09c1c6}';
  2312.   {$EXTERNALSYM IID_IWMClientConnections}
  2313.   IID_IWMClientConnections2     : TGUID = '{4091571e-4701-4593-bb3d-d5f5f0c74246}';
  2314.   {$EXTERNALSYM IID_IWMClientConnections2}
  2315.   IID_IWMReaderAdvanced         : TGUID = '{96406bea-2b2b-11d3-b36b-00c04f6108ff}';
  2316.   {$EXTERNALSYM IID_IWMReaderAdvanced}
  2317.   IID_IWMReaderAdvanced2        : TGUID = '{ae14a945-b90c-4d0d-9127-80d665f7d73e}';
  2318.   {$EXTERNALSYM IID_IWMReaderAdvanced2}
  2319.   IID_IWMReaderAdvanced3        : TGUID = '{5dc0674b-f04b-4a4e-9f2a-b1afde2c8100}';
  2320.   {$EXTERNALSYM IID_IWMReaderAdvanced3}
  2321.   IID_IWMReaderAdvanced4        : TGUID = '{945a76a2-12ae-4d48-bd3c-cd1d90399b85}';
  2322.   {$EXTERNALSYM IID_IWMReaderAdvanced4}
  2323.   IID_IWMDRMReader              : TGUID = '{d2827540-3ee7-432c-b14c-dc17f085d3b3}';
  2324.   {$EXTERNALSYM IID_IWMDRMReader}
  2325.   IID_IWMReaderCallbackAdvanced : TGUID = '{96406beb-2b2b-11d3-b36b-00c04f6108ff}';
  2326.   {$EXTERNALSYM IID_IWMReaderCallbackAdvanced}
  2327.   IID_IWMReaderNetworkConfig    : TGUID = '{96406bec-2b2b-11d3-b36b-00c04f6108ff}';
  2328.   {$EXTERNALSYM IID_IWMReaderNetworkConfig}
  2329.   IID_IWMReaderStreamClock      : TGUID = '{96406bed-2b2b-11d3-b36b-00c04f6108ff}';
  2330.   {$EXTERNALSYM IID_IWMReaderStreamClock}
  2331.   IID_IWMIndexer                : TGUID = '{6d7cdc71-9888-11d3-8edc-00c04f6109cf}';
  2332.   {$EXTERNALSYM IID_IWMIndexer}
  2333.   IID_IWMIndexer2               : TGUID = '{b70f1e42-6255-4df0-a6b9-02b212d9e2bb}';
  2334.   {$EXTERNALSYM IID_IWMIndexer2}
  2335.   IID_IWMReaderAllocatorEx      : TGUID = '{9f762fa7-a22e-428d-93c9-ac82f3aafe5a}';
  2336.   {$EXTERNALSYM IID_IWMReaderAllocatorEx}
  2337.   IID_IWMReaderTypeNegotiation  : TGUID = '{fdbe5592-81a1-41ea-93bd-735cad1adc05}';
  2338.   {$EXTERNALSYM IID_IWMReaderTypeNegotiation}
  2339.   IID_IWMLicenseBackup          : TGUID = '{05E5AC9F-3FB6-4508-BB43-A4067BA1EBE8}';
  2340.   {$EXTERNALSYM IID_IWMLicenseBackup}
  2341.   IID_IWMLicenseRestore         : TGUID = '{C70B6334-a22e-4efb-A245-15E65A004A13}';
  2342.   {$EXTERNALSYM IID_IWMLicenseRestore}
  2343.   IID_IWMBackupRestoreProps     : TGUID = '{3C8E0DA6-996F-4ff3-A1AF-4838F9377e2e}';
  2344.   {$EXTERNALSYM IID_IWMBackupRestoreProps}
  2345.   IID_IWMPacketSize             : TGUID = '{cdfb97ab-188f-40b3-b643-5b7903975c59}';
  2346.   {$EXTERNALSYM IID_IWMPacketSize}
  2347.   IID_IWMPacketSize2            : TGUID = '{8bfc2b9e-b646-4233-a877-1c6a079669dc}';
  2348.   {$EXTERNALSYM IID_IWMPacketSize2}
  2349.   IID_IWMRegisterCallback       : TGUID = '{cf4b1f99-4de2-4e49-a363-252740d99bc1}';
  2350.   {$EXTERNALSYM IID_IWMRegisterCallback}
  2351.   IID_IWMWriterPostView         : TGUID = '{81e20ce4-75ef-491a-8004-fc53c45bdc3e}';
  2352.   {$EXTERNALSYM IID_IWMWriterPostView}
  2353.   IID_IWMWriterPostViewCallback : TGUID = '{d9d6549d-a193-4f24-b308-03123d9b7f8d}';
  2354.   {$EXTERNALSYM IID_IWMWriterPostViewCallback}
  2355.   IID_IWMCodecInfo              : TGUID = '{a970f41e-34de-4a98-b3ba-e4b3ca7528f0}';
  2356.   {$EXTERNALSYM IID_IWMCodecInfo}
  2357.   IID_IWMCodecInfo2             : TGUID = '{aa65e273-b686-4056-91ec-dd768d4df710}';
  2358.   {$EXTERNALSYM IID_IWMCodecInfo2}
  2359.   IID_IWMCodecInfo3             : TGUID = '{7e51f487-4d93-4f98-8ab4-27d0565adc51}';
  2360.   {$EXTERNALSYM IID_IWMCodecInfo3}
  2361.   IID_IWMPropertyVault          : TGUID = '{72995A79-5090-42a4-9C8C-D9D0B6D34BE5}';
  2362.   {$EXTERNALSYM IID_IWMPropertyVault}
  2363.   IID_IWMIStreamProps           : TGUID = '{6816dad3-2b4b-4c8e-8149-874c3483a753}';
  2364.   {$EXTERNALSYM IID_IWMIStreamProps}
  2365.   IID_IWMLanguageList           : TGUID = '{df683f00-2d49-4d8e-92b7-fb19f6a0dc57}';
  2366.   {$EXTERNALSYM IID_IWMLanguageList}
  2367.   IID_IWMDRMWriter              : TGUID = '{d6ea5dd0-12a0-43f4-90ab-a3fd451e6a07}';
  2368.   {$EXTERNALSYM IID_IWMDRMWriter}
  2369.   IID_IWMWriterPushSink         : TGUID = '{dc10e6a5-072c-467d-bf57-6330a9dde12a}';
  2370.   {$EXTERNALSYM IID_IWMWriterPushSink}
  2371.   IID_IWMReaderNetworkConfig2   : TGUID = '{d979a853-042b-4050-8387-c939db22013f}';
  2372.   {$EXTERNALSYM IID_IWMReaderNetworkConfig2}
  2373.   IID_IWMWatermarkInfo          : TGUID = '{6f497062-f2e2-4624-8ea7-9dd40d81fc8d}';
  2374.   {$EXTERNALSYM IID_IWMWatermarkInfo}
  2375.   IID_IWMReaderAccelerator      : TGUID = '{bddc4d08-944d-4d52-a612-46c3fda07dd4}';
  2376.   {$EXTERNALSYM IID_IWMReaderAccelerator}
  2377.   IID_IWMReaderTimecode         : TGUID = '{f369e2f0-e081-4fe6-8450-b810b2f410d1}';
  2378.   {$EXTERNALSYM IID_IWMReaderTimecode}
  2379.   IID_IWMImageInfo              : TGUID = '{9f0aa3b6-7267-4d89-88f2-ba915aa5c4c6}';
  2380.   {$EXTERNALSYM IID_IWMImageInfo}
  2381.   IID_IWMAddressAccess          : TGUID = '{BB3C6389-1633-4e92-AF14-9F3173BA39D0}';
  2382.   {$EXTERNALSYM IID_IWMAddressAccess}
  2383.   IID_IWMAddressAccess2         : TGUID = '{65a83fc2-3e98-4d4d-81b5-2a742886b33d}';
  2384.   {$EXTERNALSYM IID_IWMAddressAccess2}
  2385. ///////////////////////////////////////////////////////////////////////////////
  2386. //
  2387. // Other GUIDs defined here
  2388. //
  2389. ///////////////////////////////////////////////////////////////////////////////
  2390.   CLSID_WMMUTEX_Language     : TGUID = '{D6E22A00-35DA-11D1-9034-00A0C90349BE}';
  2391.   {$EXTERNALSYM CLSID_WMMUTEX_Language}
  2392.   CLSID_WMMUTEX_Bitrate      : TGUID = '{D6E22A01-35DA-11D1-9034-00A0C90349BE}';
  2393.   {$EXTERNALSYM CLSID_WMMUTEX_Bitrate}
  2394.   CLSID_WMMUTEX_Presentation : TGUID = '{D6E22A02-35DA-11D1-9034-00A0C90349BE}';
  2395.   {$EXTERNALSYM CLSID_WMMUTEX_Presentation}
  2396.   CLSID_WMMUTEX_Unknown      : TGUID = '{D6E22A03-35DA-11D1-9034-00A0C90349BE}';
  2397.   {$EXTERNALSYM CLSID_WMMUTEX_Unknown}
  2398.   CLSID_WMBandwidthSharing_Exclusive : TGUID = '{af6060aa-5197-11d2-b6af-00c04fd908e9}';
  2399.   {$EXTERNALSYM CLSID_WMBandwidthSharing_Exclusive}
  2400.   CLSID_WMBandwidthSharing_Partial   : TGUID = '{af6060ab-5197-11d2-b6af-00c04fd908e9}';
  2401.   {$EXTERNALSYM CLSID_WMBandwidthSharing_Partial}
  2402.   WMT_DMOCATEGORY_AUDIO_WATERMARK : TGUID = '{B42CDE2B-6178-4a2c-A375-89DD3FD7F497}';
  2403.   {$EXTERNALSYM WMT_DMOCATEGORY_AUDIO_WATERMARK}
  2404.   WMT_DMOCATEGORY_VIDEO_WATERMARK : TGUID = '{E77797C6-18AF-4458-BBDD-492D3F78FC8F}';
  2405.   {$EXTERNALSYM WMT_DMOCATEGORY_VIDEO_WATERMARK}
  2406. ///////////////////////////////////////////////////////////////////////////////
  2407. //
  2408. // Max Video Streams / Bands
  2409. //
  2410. ///////////////////////////////////////////////////////////////////////////////
  2411.   WM_MAX_VIDEO_STREAMS           = $3f;
  2412.   {$EXTERNALSYM WM_MAX_VIDEO_STREAMS}
  2413.   WM_MAX_STREAMS                 = $3f;
  2414.   {$EXTERNALSYM WM_MAX_STREAMS}
  2415. ///////////////////////////////////////////////////////////////////////////////
  2416. //
  2417. // Creation functions.
  2418. //
  2419. // The SDK supports 3 major objects:
  2420. // - CLSID_WMWriter - For writing out WM content.
  2421. // - CLSID_WMReader - For playing back WM content.
  2422. // - CLSID_WMMetadataEditor - For getting and editing header metadata in WM
  2423. //   content.
  2424. //
  2425. ///////////////////////////////////////////////////////////////////////////////
  2426. ///////////////////////////////////////////////////////////////////////////////
  2427. //
  2428. // The following interfaces define the media types that this SDK supports.
  2429. // These media types are used by the writer, the reader, and the profile
  2430. // object, to identify the media-type specific properties of a media stream.
  2431. //
  2432. // The main media type is stored in the WM_MEDIA_TYPE structure. Some
  2433. // interesting (option) parameters may exist for particular stream types;
  2434. // in that case, an IWM<x>MediaProps interface can be used to get and set
  2435. // these additional parameters.
  2436. //
  2437. type
  2438.   {$HPPEMIT 'typedef System::DelphiInterface<IWMMediaProps> _di_IWMMediaProps;'}
  2439.   {$EXTERNALSYM IWMMediaProps}
  2440.   IWMMediaProps = interface(IUnknown)
  2441.   ['{96406BCE-2B2B-11d3-B36B-00C04F6108FF}']
  2442.   (*** IWMMediaProps methods ***)
  2443.     //
  2444.     // GetType is provided for convenience; it returns the same as the
  2445.     // majortype of the WM_MEDIA_TYPE.
  2446.     //
  2447.     function GetType(out pguidType: TGUID): HRESULT; stdcall;
  2448.     function GetMediaType(pType: PWMMediaType;
  2449.                           var pcbType: LongWord): HRESULT; stdcall;
  2450.     function SetMediaType(pType: PWMMediaType): HRESULT; stdcall;
  2451.   end;
  2452.   {$HPPEMIT 'typedef System::DelphiInterface<IWMVideoMediaProps> _di_IWMVideoMediaProps;'}
  2453.   {$EXTERNALSYM IWMVideoMediaProps}
  2454.   IWMVideoMediaProps = interface(IWMMediaProps)
  2455.   ['{96406BCF-2B2B-11d3-B36B-00C04F6108FF}']
  2456.   (*** IWMVideoMediaProps methods ***)
  2457.     function GetMaxKeyFrameSpacing(out pllTime: Int64): HRESULT; stdcall;
  2458.     function SetMaxKeyFrameSpacing(llTime: Int64): HRESULT; stdcall;
  2459.     function GetQuality(out pdwQuality: LongWord): HRESULT; stdcall;
  2460.     function SetQuality(dwQuality: LongWord): HRESULT; stdcall;
  2461.   end;
  2462. ///////////////////////////////////////////////////////////////////////////////
  2463. //
  2464. // The CLSID_WMWriter basic interfaces.
  2465. //
  2466. // Usage scenario is as follows:
  2467. // 1) SetProfile to define the configuration.
  2468. // 2) Set the outputs.
  2469. // 3) Call GetInputCount (which is valid after (1)), and GetInputProps for
  2470. //    each stream. Get the default input format, and change it if desired.
  2471. // 3.5) Call SetAttribute to add metadata to the header
  2472. // At this point, the writer has been configured.
  2473. // 4) Call WriteSample repeatedly, until done. (Note that the AllocateSample
  2474. //    call is just provided for convenience. You are welcome to pass in your
  2475. //    own samples.)
  2476. // 5) Call Flush to write out any buffered data, and update the header and
  2477. //    index.
  2478. //
  2479. ///////////////////////////////////////////////////////////////////////////////
  2480.   IWMProfile = interface;
  2481.   IWMInputMediaProps = interface;
  2482.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriter> _di_IWMWriter;'}
  2483.   {$EXTERNALSYM IWMWriter}
  2484.   IWMWriter = interface(IUnknown)
  2485.   ['{96406BD4-2B2B-11d3-B36B-00C04F6108FF}']
  2486.   (*** IWMWriter methods ***)
  2487.     // This interface QI's for IWMHeaderInfo, and IWMWriterAdvanced.
  2488.     //
  2489.     // There are 3 options for setting the profile on the writer. Note that
  2490.     // setting the profile means that the profile is copied into the writer.
  2491.     // Further editing of that profile object will have no effect, unless
  2492.     // SetProfile() is called again.
  2493.     //
  2494.     // Calling SetProfile() removes any previously set header attribute info
  2495.     //
  2496.     function SetProfileByID(const guidProfile: TGUID): HRESULT; stdcall;
  2497.     function SetProfile(pProfile: IWMProfile): HRESULT; stdcall;
  2498.     //
  2499.     // The easiest way to use the writer is just to write to file.
  2500.     //
  2501.     function SetOutputFilename(pwszFilename: PWideChar): HRESULT; stdcall;
  2502.     //
  2503.     // The user can enumerate through the various inputs, and get the input
  2504.     // format. Note that these are not ASF streams; one input stream may map
  2505.     // to multiple ASF streams in a MEB scenario.
  2506.     //
  2507.     // Manipulating the IWMInputMediaProps has no effect on the writer, unless
  2508.     // the user calls SetInputProps to configure the input.
  2509.     //
  2510.     function GetInputCount(out pcInputs: LongWord): HRESULT; stdcall;
  2511.     function GetInputProps(dwInputNum: LongWord; out ppInput: IWMInputMediaProps): HRESULT; stdcall;
  2512.     function SetInputProps(dwInputNum: LongWord; pInput: IWMInputMediaProps): HRESULT; stdcall;
  2513.     //
  2514.     // Used for determining all possible format types supported by this
  2515.     // input on the writer.
  2516.     //
  2517.     function GetInputFormatCount(dwInputNumber: LongWord; out pcFormats: LongWord): HRESULT; stdcall;
  2518.     function GetInputFormat(dwInputNumber, dwFormatNumber: LongWord;
  2519.        out pProps: IWMInputMediaProps): HRESULT; stdcall;
  2520.     //
  2521.     // You must call BeginWriting before sending any samples, and
  2522.     // you must call EndWriting when you're done sending samples.
  2523.     //
  2524.     function BeginWriting: HRESULT; stdcall;
  2525.     //
  2526.     // EndWriting flushes everything, updates indices and headers,
  2527.     // and closes the file.
  2528.     //
  2529.     function EndWriting: HRESULT; stdcall;
  2530.     //
  2531.     // Allocate a sample. This is optional; the user is welcome to allocate
  2532.     // their own buffer class.
  2533.     //
  2534.     function AllocateSample(dwSampleSize: LongWord; out ppSample: INSSBuffer): HRESULT; stdcall;
  2535.     function WriteSample(dwInputNum: LongWord; cnsSampleTime: Int64; dwFlags: LongWord;
  2536.       pSample: INSSBuffer): HRESULT; stdcall;
  2537.     //
  2538.     // Flush() will flush the writer, but leaves the writer prepared to run
  2539.     // again, when WriteSample() is called again.
  2540.     // Flush() also causes an updated header to be sent to the sink.
  2541.     //
  2542.     function Flush: HRESULT; stdcall;
  2543.   end;
  2544. //
  2545. // The writer can be QI'd for this interface, which provides helpers
  2546. // to generate DRM keys.
  2547. //
  2548.   {$HPPEMIT 'typedef System::DelphiInterface<IWMDRMWriter> _di_IWMDRMWriter;'}
  2549.   {$EXTERNALSYM IWMDRMWriter}
  2550.   IWMDRMWriter = interface(IUnknown)
  2551.   ['{d6ea5dd0-12a0-43f4-90ab-a3fd451e6a07}']
  2552.   (*** IWMDRMWriter methods ***)
  2553.     function GenerateKeySeed({out} pwszKeySeed: PWideChar; var pcwchLength: LongWord): HRESULT; stdcall;
  2554.     function GenerateKeyID({out} pwszKeyID: PWideChar; var pcwchLength: LongWord): HRESULT; stdcall;
  2555.     function GenerateSigningKeyPair({out} pwszPrivKey: PWideChar;
  2556.                                     var pcwchPrivKeyLength: LongWord;
  2557.                                     {out} pwszPubKey: PWideChar;
  2558.                                     var pcwchPubKeyLength: LongWord): HRESULT; stdcall;
  2559.     function SetDRMAttribute(wStreamNum: Word; pszName: PWideChar; Type_: TWMTAttrDataType;
  2560.       pValue: PBYTE; cbLength: Word): HRESULT; stdcall;
  2561.   end;
  2562.   {$HPPEMIT 'typedef System::DelphiInterface<IWMInputMediaProps> _di_IWMInputMediaProps;'}
  2563.   {$EXTERNALSYM IWMInputMediaProps}
  2564.   IWMInputMediaProps = interface(IWMMediaProps)
  2565.   ['{96406BD5-2B2B-11d3-B36B-00C04F6108FF}']
  2566.   (*** IWMInputMediaProps methods ***)
  2567.     function GetConnectionName({out} pwszName: PWideChar; var pcchName: Word): HRESULT; stdcall;
  2568.     function GetGroupName({out} pwszName: PWideChar; var pcchName: Word): HRESULT; stdcall;
  2569.   end;
  2570.   {$HPPEMIT 'typedef System::DelphiInterface<IWMPropertyVault> _di_IWMPropertyVault;'}
  2571.   {$EXTERNALSYM IWMPropertyVault}
  2572.   IWMPropertyVault = interface(IUnknown)
  2573.   ['{72995A79-5090-42a4-9C8C-D9D0B6D34BE5}']
  2574.   (*** IWMPropertyVault methods ***)
  2575.     function GetPropertyCount(out pdwCount: LongWord): HRESULT; stdcall;
  2576.     function GetPropertyByName(pszName: PWideChar; out pType: TWMTAttrDataType;
  2577.       {out} pValue: PBYTE;  var pdwSize: LongWord): HRESULT; stdcall;
  2578.     function SetProperty(pszName: PWideChar; pType: TWMTAttrDataType;
  2579.       pValue: PBYTE; dwSize: LongWord): HRESULT; stdcall;
  2580.     function GetPropertyByIndex(dwIndex: LongWord; {out} pszName: PWideChar;
  2581.       var pdwNameLen: LongWord; out pType: TWMTAttrDataType;
  2582.       {out} pValue: PBYTE; var pdwSize: LongWord): HRESULT; stdcall;
  2583.     function CopyPropertiesFrom(pIWMPropertyVault: IWMPropertyVault): HRESULT; stdcall;
  2584.     function Clear: HRESULT; stdcall;
  2585.   end;
  2586.   {$HPPEMIT 'typedef System::DelphiInterface<IWMIStreamProps> _di_IWMIStreamProps;'}
  2587.   {$EXTERNALSYM IWMIStreamProps}
  2588.   IWMIStreamProps = interface(IUnknown)
  2589.   ['{6816dad3-2b4b-4c8e-8149-874c3483a753}']
  2590.   (*** IWMIStreamProps methods ***)
  2591.     function GetProperty(pszName: PWideChar; out pType: TWMTAttrDataType;
  2592.       {out} pValue: PBYTE; var pdwSize: LongWord): HRESULT; stdcall;
  2593.   end;
  2594. ///////////////////////////////////////////////////////////////////////////////
  2595. //
  2596. // The CLSID_WMReader basic interfaces.
  2597. //
  2598. // Usage is as follows:
  2599. // 1) Call Open with a URL (possibly a local filename) and a user-supplied
  2600. //    callback. After open has completed, the file has been opened and parsed.
  2601. // 2) Call GetOutputCount, and GetOutputProps for each output. This
  2602. //    is valid after (1). This allows the user to get the output format for
  2603. //    each output.
  2604. // 3) Call Start. Status messages and samples will begin arriving in the
  2605. //    callback function.
  2606. // 4) Continue with any combination of Start/Stop/Pause, until finished.
  2607. //
  2608. ///////////////////////////////////////////////////////////////////////////////
  2609.   IWMReaderCallback = interface;
  2610.   IWMOutputMediaProps = interface;
  2611.   {$HPPEMIT 'typedef System::DelphiInterface<IWMReader> _di_IWMReader;'}
  2612.   {$EXTERNALSYM IWMReader}
  2613.   IWMReader = interface(IUnknown)
  2614.   ['{96406BD6-2B2B-11d3-B36B-00C04F6108FF}']
  2615.   (*** IWMReader methods ***)
  2616.     //
  2617.     // This interface QI's for IWMHeaderInfo, IWMProfile, IWMReaderAdvanced,
  2618.     // IWMReaderAdvanced2, and IWMReaderAdvanced3.
  2619.     //
  2620.     //
  2621.     // Open is an asynch call; it returns almost immediately (if the URL
  2622.     // is valid), and the user should wait for appropriate OnStatus calls to
  2623.     // be sent to the callback.
  2624.     //
  2625.     function Open(pwszURL: PWideChar; pCallback: IWMReaderCallback;
  2626.       pvContext: Pointer): HRESULT; stdcall;
  2627.     function Close: HRESULT; stdcall;
  2628.     //
  2629.     // The user can enumerate through the various outputs, and get the
  2630.     // output format for that data.
  2631.     //
  2632.     // Manipulating the IWMOutputMediaProps has no effect on the output, unless
  2633.     // the user also calls SetOutputProps.
  2634.     //
  2635.     function GetOutputCount(out pcOutputs: LongWord): HRESULT; stdcall;
  2636.     function GetOutputProps(dwOutputNum: LongWord; out ppOutput: IWMOutputMediaProps): HRESULT; stdcall;
  2637.     function SetOutputProps(dwOutputNum: LongWord; pOutput: IWMOutputMediaProps): HRESULT; stdcall;
  2638.     //
  2639.     // Used for determining all possible format types supported by this
  2640.     // output on the reader.
  2641.     //
  2642.     function GetOutputFormatCount(dwOutputNumber: LongWord; out pcFormats: LongWord): HRESULT; stdcall;
  2643.     function GetOutputFormat(dwOutputNumber, dwFormatNumber: LongWord;
  2644.       out ppProps: IWMOutputMediaProps): HRESULT; stdcall;
  2645.     //
  2646.     // If duration is 0, play to the end of the file.
  2647.     // If msStart is set to WM_START_CURRENTPOSITION then don't perform a seek
  2648.     // operation.  A good use for this is when you want to change the rate but
  2649.     // not the current file position.
  2650.     //
  2651.     // Note that any call to start while Paused will be treated as a seek.
  2652.     // Even calls to Start( WM_START_CURRENTPOSITION, ... ).  If your intention
  2653.     // is to seek (which will incur the buffering penalty from network files)
  2654.     // then you can go ahead and call Start.  However, if your intention was
  2655.     // to continue playing from where the user paused, you should call Resume
  2656.     // instead.
  2657.     //
  2658.     function Start(cnsStart, cnsDuration: Int64; fRate: Single; pvContext: Pointer): HRESULT; stdcall;
  2659.     function Stop: HRESULT; stdcall;
  2660.     function Pause: HRESULT; stdcall;
  2661.     function Resume: HRESULT; stdcall;
  2662.   end;
  2663.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSyncReader> _di_IWMSyncReader;'}
  2664.   {$EXTERNALSYM IWMSyncReader}
  2665.   IWMSyncReader = interface(IUnknown)
  2666.   ['{9397F121-7705-4dc9-B049-98B698188414}']
  2667.   (*** IWMSyncReader methods ***)
  2668.     //
  2669.     // This interface can be QI'ed for IWMProfile, IWMHeaderInfo and
  2670.     // IWMReaderTimecode interfaces
  2671.     //
  2672.     //
  2673.     // Open is an synchronous call. We do not support streaming at this time.
  2674.     // All open with http:// etc would fail. We do support MP3 or Windows
  2675.     // media files from both local file or UNC path.
  2676.     //
  2677.     function Open(pwszFilename: PWideChar): HRESULT; stdcall;
  2678.     function Close: HRESULT; stdcall;
  2679.     //
  2680.     // SetRange is basically a seek method, you can only set same range
  2681.     // for all streams. Use cnsDuration=0 to specify reading to end of file.
  2682.     //
  2683.     function SetRange(cnsStartTime, cnsDuration: Int64): HRESULT; stdcall;
  2684.     //
  2685.     // SetRangeByFrame is frame-based access, the file has to be frame
  2686.     // indexed to succeeded this call. If the call is successful, all
  2687.     // streams are synchronized to the same position based on time.
  2688.     // Also use cFramesToRead=0 to specify reading to end of file.
  2689.     //
  2690.     function SetRangeByFrame(wStreamNum: Word; qwFrameNumber, cFramesToRead: Int64 ): HRESULT; stdcall;
  2691.     //
  2692.     // If a valid stream number is specified, next sample from that stream
  2693.     // will be returned, pwStreamNum can be NULL in this case. Otherwise,
  2694.     // GetNextSample returns the next sample in time line (regardless of
  2695.     // which stream). The sample's stream number will be returned.
  2696.     // Time line is presentation time if no output setting is specified.
  2697.     // To get early delivery for some stream, use SetOutputSetting
  2698.     //
  2699.     function GetNextSample(wStreamNum: Word; out ppSample: INSSBuffer;
  2700.       out pcnsSampleTime: Int64; out pcnsDuration: Int64;
  2701.       out pdwFlags: LongWord; out pdwOutputNum: LongWord;
  2702.       out pwStreamNum: Word): HRESULT; stdcall;
  2703.     //
  2704.     // Stream selection methods are the same as asynchronous interface
  2705.     //
  2706.     function SetStreamsSelected(cStreamCount: Word; pwStreamNumbers: PWORD;
  2707.       pSelections: PWMTStreamSelection): HRESULT; stdcall;
  2708.     function GetStreamSelected(wStreamNum: Word; out pSelection: TWMTStreamSelection): HRESULT; stdcall;
  2709.     function SetReadStreamSamples(wStreamNum: Word; fCompressed: BOOL): HRESULT; stdcall;
  2710.     function GetReadStreamSamples(wStreamNum: Word; out pfCompressed: BOOL): HRESULT; stdcall;
  2711.     //
  2712.     // The following two methods are the same as the ones in
  2713.     // IWMReaderAdvanced2 interface. We don't support JustInTimeDecode
  2714.     // in this interface
  2715.     //
  2716.     function GetOutputSetting(dwOutputNum: LongWord; pszName: PWideChar;
  2717.       out pType: TWMTAttrDataType; {out} pValue: PBYTE;
  2718.       var pcbLength: Word): HRESULT; stdcall;
  2719.     //
  2720.     // Sets a named setting for a particular output
  2721.     //
  2722.     function SetOutputSetting(dwOutputNum: LongWord; pszName: PWideChar;
  2723.       Type_: TWMTAttrDataType; {in} pValue: PBYTE; cbLength: Word): HRESULT; stdcall;
  2724.     //
  2725.     // The following methods are important for receiving uncompressed samples,
  2726.     // they are identical to methods in asynchronous Reader interface.
  2727.     //
  2728.     function GetOutputCount(out pcOutputs: LongWord): HRESULT; stdcall;
  2729.     function GetOutputProps(dwOutputNum: LongWord; out ppOutput: IWMOutputMediaProps): HRESULT; stdcall;
  2730.     function SetOutputProps(dwOutputNum: LongWord; pOutput: IWMOutputMediaProps): HRESULT; stdcall;
  2731.     //
  2732.     // Used for determining all possible format types supported by this
  2733.     // output on the reader.
  2734.     //
  2735.     function GetOutputFormatCount(dwOutputNum: LongWord; out pcFormats: LongWord): HRESULT; stdcall;
  2736.     function GetOutputFormat(dwOutputNum, dwFormatNum: LongWord; out ppProps: IWMOutputMediaProps): HRESULT; stdcall;
  2737.     //
  2738.     // Methods provided to relate output numbers with stream numbers
  2739.     //
  2740.     function GetOutputNumberForStream(wStreamNum: Word; out pdwOutputNum: LongWord): HRESULT; stdcall;
  2741.     function GetStreamNumberForOutput(dwOutputNum: LongWord; out pwStreamNum: Word): HRESULT; stdcall;
  2742.     function GetMaxOutputSampleSize(dwOutput: LongWord; out pcbMax: LongWord): HRESULT; stdcall;
  2743.     function GetMaxStreamSampleSize(wStream: Word; out pcbMax: LongWord): HRESULT; stdcall;
  2744.     //
  2745.     // Same as IWMSyncReader::Open but takes an IStream interface pointer
  2746.     // instead of an file name to be opened. This method is typically
  2747.     // used for custom source.
  2748.     //
  2749.     function OpenStream(pStream: IStream): HRESULT; stdcall;
  2750.   end;
  2751.   IWMReaderAllocatorEx = interface;
  2752.   {$HPPEMIT 'typedef System::DelphiInterface<IWMSyncReader2> _di_IWMSyncReader2;'}
  2753.   {$EXTERNALSYM IWMSyncReader2}
  2754.   IWMSyncReader2 = interface(IWMSyncReader)
  2755.   ['{faed3d21-1b6b-4af7-8cb6-3e189bbc187b}']
  2756.   (*** IWMSyncReader2 methods ***)
  2757.     //
  2758.     // SetRangeByTimecode is timecode-based access, the file has to be timecode
  2759.     // indexed to succeeded this call. If the call is successful, all
  2760.     // streams are synchronized to the same position based on presentation
  2761.     // time.
  2762.     //
  2763.     function SetRangeByTimecode(wStreamNum: Word;
  2764.       var pStart, pEnd: TWMTTimeCodeExtensionData): HRESULT; stdcall;
  2765.     //
  2766.     // SetRangeByFrame is frame-based access, the file has to be frame
  2767.     // indexed to succeeded this call. If the call is successful, all
  2768.     // streams are synchronized to the same position based on time.
  2769.     // Also use cFramesToRead=0 to specify reading to end of file.
  2770.     //
  2771.     function SetRangeByFrameEx(wStreamNum: Word; qwFrameNumber, cFramesToRead: Int64;
  2772.       out pcnsStartTime: Int64): HRESULT; stdcall;
  2773.     //
  2774.     // The following four methods are for user buffer allocations
  2775.     //
  2776.     function SetAllocateForOutput(dwOutputNum: LongWord; pAllocator: IWMReaderAllocatorEx): HRESULT; stdcall;
  2777.     function GetAllocateForOutput(dwOutputNum: LongWord; out ppAllocator: IWMReaderAllocatorEx): HRESULT; stdcall;
  2778.     function SetAllocateForStream(wStreamNum: Word; pAllocator: IWMReaderAllocatorEx): HRESULT; stdcall;
  2779.     function GetAllocateForStream(dwSreamNum: Word; out ppAllocator: IWMReaderAllocatorEx): HRESULT; stdcall;
  2780.   end;
  2781.   {$HPPEMIT 'typedef System::DelphiInterface<IWMOutputMediaProps> _di_IWMOutputMediaProps;'}
  2782.   {$EXTERNALSYM IWMOutputMediaProps}
  2783.   IWMOutputMediaProps = interface(IWMMediaProps)
  2784.   ['{96406BD7-2B2B-11d3-B36B-00C04F6108FF}']
  2785.   (*** IWMOutputMediaProps methods ***)
  2786.     //
  2787.     // A Stream Group and type together uniquely identify each output. (The
  2788.     // type is on IWMMediaProps).
  2789.     //
  2790.     function GetStreamGroupName({out} pwszName: PWideChar; var pcchName: Word): HRESULT; stdcall;
  2791.     function GetConnectionName({out} pwszName: PWideChar; var pcchName: Word): HRESULT; stdcall;
  2792.   end;
  2793.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStatusCallback> _di_IWMStatusCallback;'}
  2794.   {$EXTERNALSYM IWMStatusCallback}
  2795.   IWMStatusCallback = interface(IUnknown)
  2796.   ['{6d7cdc70-9888-11d3-8edc-00c04f6109cf}']
  2797.   (*** IWMStatusCallback methods ***)
  2798.     // The contents of pValue depends on the Status.
  2799.     function OnStatus(Status: TWMTStatus; hr: HRESULT; dwType: TWMTAttrDataType;
  2800.       pValue: PBYTE; pvContext: Pointer): HRESULT; stdcall;
  2801.   end;
  2802.   {$HPPEMIT 'typedef System::DelphiInterface<IWMReaderCallback> _di_IWMReaderCallback;'}
  2803.   {$EXTERNALSYM IWMReaderCallback}
  2804.   IWMReaderCallback = interface(IWMStatusCallback)
  2805.   ['{96406BD8-2B2B-11d3-B36B-00C04F6108FF}']
  2806.   (*** IWMReaderCallback methods ***)
  2807.     // cnsSampleDuration will be 0 for most media types.
  2808.     function OnSample(dwOutputNum: LongWord; cnsSampleTime, cnsSampleDuration: Int64;
  2809.       dwFlags: LongWord; pSample: INSSBuffer; pvContext: Pointer): HRESULT; stdcall;
  2810.   end;
  2811.   {$HPPEMIT 'typedef System::DelphiInterface<IWMCredentialCallback> _di_IWMCredentialCallback;'}
  2812.   {$EXTERNALSYM IWMCredentialCallback}
  2813.   IWMCredentialCallback = interface(IUnknown)
  2814.   ['{342e0eb7-e651-450c-975b-2ace2c90c48e}']
  2815.   (*** IWMCredentialCallback methods ***)
  2816.     function AcquireCredentials(pwszRealm, pwszSite: PWideChar; {out} pwszUser: PWideChar;
  2817.       cchUser: LongWord; {out} pwszPassword: PWideChar; cchPassword: LongWord;
  2818.       hrStatus: HRESULT; out pdwFlags: LongWord): HRESULT; stdcall; // Combination of WMT_CREDENTIAL_FLAGS
  2819.   end;
  2820. ///////////////////////////////////////////////////////////////////////////////
  2821. //
  2822. // The CLSID_WMMetadataEditor basic interfaces.
  2823. //
  2824. // Usage:
  2825. // 1) Call Open with a filename.
  2826. // 2) QI for IWMHeaderInfo, and use that to get and set attributes as
  2827. //    needed.
  2828. // 3) Flush() will cause any changes to be written back to disk (if possible).
  2829. // 4) Close() closes the file without writing any changes to disk.
  2830. //
  2831. ///////////////////////////////////////////////////////////////////////////////
  2832.   {$HPPEMIT 'typedef System::DelphiInterface<IWMMetadataEditor> _di_IWMMetadataEditor;'}
  2833.   {$EXTERNALSYM IWMMetadataEditor}
  2834.   IWMMetadataEditor = interface(IUnknown)
  2835.   ['{96406BD9-2B2B-11d3-B36B-00C04F6108FF}']
  2836.   (*** IWMMetadataEditor methods ***)
  2837.     // QI this for IWMHeaderInfo to edit the header attributes.
  2838.     // Manage the file
  2839.     function Open(pwszFilename: PWideChar): HRESULT; stdcall;
  2840.     function Close: HRESULT; stdcall;
  2841.     function Flush: HRESULT; stdcall;
  2842.   end;
  2843.   {$HPPEMIT 'typedef System::DelphiInterface<IWMMetadataEditor2> _di_IWMMetadataEditor2;'}
  2844.   {$EXTERNALSYM IWMMetadataEditor2}
  2845.   IWMMetadataEditor2 = interface(IWMMetadataEditor)
  2846.   ['{203CFFE3-2E18-4fdf-B59D-6E71530534CF}']
  2847.   (*** IWMMetadataEditor2 methods ***)
  2848.     //
  2849.     // The flags to dwDesiredAccess and dwShareMode match the flags to
  2850.     // (the win32 API) CreateFile.
  2851.     //
  2852.     // Supported combinations are:
  2853.     //
  2854.     //   dwDesiredAccess               dwShareMode
  2855.     //   ----------------------------  -----------
  2856.     //   GENERIC_READ | GENERIC_WRITE  0
  2857.     //   GENERIC_READ | GENERIC_WRITE  FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE
  2858.     //   GENERIC_READ                  0
  2859.     //   GENERIC_READ                  FILE_SHARE_READ
  2860.     //   GENERIC_READ                  FILE_SHARE_DELETE
  2861.     //   GENERIC_READ                  FILE_SHARE_READ | FILE_SHARE_DELETE
  2862.     //
  2863.     function OpenEx(pwszFilename: PWideChar; dwDesiredAccess, dwShareMode: LongWord): HRESULT; stdcall;
  2864.   end;
  2865.   {$HPPEMIT 'typedef System::DelphiInterface<IWMDRMEditor> _di_IWMDRMEditor;'}
  2866.   {$EXTERNALSYM IWMDRMEditor}
  2867.   IWMDRMEditor = interface(IUnknown)
  2868.   ['{FF130EBC-A6C3-42A6-B401-C3382C3E08B3}']
  2869.   (*** IWMDRMEditor methods ***)
  2870.     // For accessing DRM properties from the metadata editor.
  2871.     function GetDRMProperty(pwstrName: PWideChar; out pdwType: TWMTAttrDataType;
  2872.       {out} pValue: PBYTE; var pcbLength: Word): HRESULT; stdcall;
  2873.   end;
  2874. ///////////////////////////////////////////////////////////////////////////////
  2875. //
  2876. // Below are utility interfaces used across all 3 of the main objects.
  2877. //
  2878. ///////////////////////////////////////////////////////////////////////////////
  2879. //
  2880. // The 3 main interface (IWMWriter, IWMReader, and
  2881. // IWMMetadataEditor) can be QI'd for this interface to get and set
  2882. // header attributes, and markers.
  2883. //
  2884.   {$HPPEMIT 'typedef System::DelphiInterface<IWMHeaderInfo> _di_IWMHeaderInfo;'}
  2885.   {$EXTERNALSYM IWMHeaderInfo}
  2886.   IWMHeaderInfo = interface(IUnknown)
  2887.   ['{96406BDA-2B2B-11d3-B36B-00C04F6108FF}']
  2888.   (*** IWMHeaderInfo methods ***)
  2889.     // For attributes, the stream number passed in means:
  2890.     // -1 (0xffff) to specifies "any or no stream".
  2891.     // 0 specifies "no stream".
  2892.     // Any other value indicates the stream number.
  2893.     //
  2894.     // Windows Media version 4 and earlier does not support per stream
  2895.     // attributes, so any stream number other than 0 will fail.
  2896.     //
  2897.     function GetAttributeCount(wStreamNum: Word; out pcAttributes: Word): HRESULT; stdcall;
  2898.     function GetAttributeByIndex(wIndex: Word; var pwStreamNum: Word;
  2899.       {out} pwszName: PWideChar; var pcchNameLen: Word;
  2900.       out pType: TWMTAttrDataType; {out} pValue: PBYTE;
  2901.       var pcbLength: Word): HRESULT; stdcall;
  2902.     function GetAttributeByName(var pwStreamNum: Word; pszName: PWideChar;
  2903.       out pType: TWMTAttrDataType; {out} pValue: PBYTE;
  2904.       var pcbLength: Word): HRESULT; stdcall;
  2905.     function SetAttribute(wStreamNum: Word; pszName: PWideChar;
  2906.       Type_: TWMTAttrDataType; {in} pValue: PBYTE;
  2907.       cbLength: Word): HRESULT; stdcall;
  2908.     // Marker methods.
  2909.     function GetMarkerCount(out pcMarkers: Word): HRESULT; stdcall;
  2910.     function GetMarker(wIndex: Word; {out} pwszMarkerName: PWideChar;
  2911.       var pcchMarkerNameLen: Word; out pcnsMarkerTime: Int64): HRESULT; stdcall;
  2912.     function AddMarker(pwszMarkerName: PWideChar; cnsMarkerTime: Int64): HRESULT; stdcall;
  2913.     function RemoveMarker(wIndex: Word): HRESULT; stdcall;
  2914.     // Script command methods.
  2915.     function GetScriptCount(out pcScripts: Word): HRESULT; stdcall;
  2916.     function GetScript(wIndex: Word; {out} pwszType: PWideChar;
  2917.       var pcchTypeLen: Word; {out} pwszCommand: PWideChar;
  2918.       var pcchCommandLen: Word; out pcnsScriptTime: Int64): HRESULT; stdcall;
  2919.     function AddScript(pwszType, pwszCommand: PWideChar;
  2920.       cnsScriptTime: Int64): HRESULT; stdcall;
  2921.     function RemoveScript(wIndex: Word): HRESULT; stdcall;
  2922.   end;
  2923. // The 3 main interface (IWMWriter, IWMReader, and
  2924. // IWMMetadataEditor) can be QI'd for this interface to get and set
  2925. // header attributes, and markers.
  2926.   {$HPPEMIT 'typedef System::DelphiInterface<IWMHeaderInfo2> _di_IWMHeaderInfo2;'}
  2927.   {$EXTERNALSYM IWMHeaderInfo2}
  2928.   IWMHeaderInfo2 = interface(IWMHeaderInfo)
  2929.   ['{15CF9781-454E-482e-B393-85FAE487A810}']
  2930.   (*** IWMHeaderInfo2 methods ***)
  2931.     function GetCodecInfoCount(out pcCodecInfos: LongWord): HRESULT; stdcall;
  2932.     function GetCodecInfo(wIndex: LongWord; var pcchName: Word;
  2933.       {out} pwszName: PWideChar; var pcchDescription: Word;
  2934.       {out} pwszDescription: PWideChar; out pCodecType: WMT_CODEC_INFO_TYPE;
  2935.       var pcbCodecInfo: Word; {out} pbCodecInfo: PBYTE): HRESULT; stdcall;
  2936.   end;
  2937. ///////////////////////////////////////////////////////////////////////////////
  2938. //
  2939. // IWMHeaderInfo3 - V9 metadata features. This interface extends IWMHeaderInfo
  2940. // functionality:
  2941. //  - allows >64k attributes;
  2942. //  - allows multiple attributes with the same name;
  2943. //  - works with attribute languages.
  2944. //
  2945. ///////////////////////////////////////////////////////////////////////////////
  2946.   {$HPPEMIT 'typedef System::DelphiInterface<IWMHeaderInfo3> _di_IWMHeaderInfo3;'}
  2947.   {$EXTERNALSYM IWMHeaderInfo3}
  2948.   IWMHeaderInfo3 = interface(IWMHeaderInfo2)
  2949.   ['{15CC68E3-27CC-4ecd-B222-3F5D02D80BD5}']
  2950.   (*** IWMHeaderInfo3 methods ***)
  2951.     function GetAttributeCountEx(wStreamNum: Word; out pcAttributes: Word): HRESULT; stdcall;
  2952.     function GetAttributeIndices(wStreamNum: Word; pwszName: PWideChar;
  2953.       pwLangIndex: PWORD; {out} pwIndices: PWORD; var pwCount: Word): HRESULT; stdcall;
  2954.    function GetAttributeByIndexEx(wStreamNum: Word; wIndex: Word; {out} pwszName: PWideChar;
  2955.      var  pwNameLen: Word; out  pType: TWMTAttrDataType; out  pwLangIndex: Word;
  2956.     {out} pValue: PBYTE; var pdwDataLength: LongWord): HRESULT; stdcall;
  2957.     function ModifyAttribute(wStreamNum: Word; wIndex: Word; Type_: TWMTAttrDataType;
  2958.       wLangIndex: Word; pValue: PBYTE; dwLength: LongWord): HRESULT; stdcall;
  2959.     function AddAttribute(wStreamNum: Word; pszName: PWideChar;
  2960.       out pwIndex: Word; Type_: TWMTAttrDataType; wLangIndex: Word;
  2961.       pValue: PBYTE; dwLength: LongWord): HRESULT; stdcall;
  2962.     function DeleteAttribute(wStreamNum, wIndex: Word): HRESULT; stdcall;
  2963.     function AddCodecInfo(pwszName: PWideChar; pwszDescription: PWideChar;
  2964.       codecType: WMT_CODEC_INFO_TYPE; cbCodecInfo: Word;
  2965.       pbCodecInfo: PBYTE): HRESULT; stdcall;
  2966.   end;
  2967. ///////////////////////////////////////////////////////////////////////////////
  2968. //
  2969. // The profile API. The intention is that most users don't touch the profile
  2970. // API, but just use pre-existing profiles.
  2971. //
  2972. // Profiles define authoring configurations, such as stream types, bitrates,
  2973. // etc.
  2974. //
  2975. ///////////////////////////////////////////////////////////////////////////////
  2976.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfileManager> _di_IWMProfileManager;'}
  2977.   {$EXTERNALSYM IWMProfileManager}
  2978.   IWMProfileManager = interface(IUnknown)
  2979.   ['{d16679f2-6ca0-472d-8d31-2f5d55aee155}']
  2980.   (*** IWMProfileManager methods ***)
  2981.     // Create a profile with nothing in it.
  2982.     function CreateEmptyProfile(dwVersion: WMT_VERSION; out ppProfile: IWMProfile): HRESULT; stdcall;
  2983.     // Load a system profile given its ID.
  2984.     function LoadProfileByID(const guidProfile: TGUID; out ppProfile: IWMProfile): HRESULT; stdcall;
  2985.     // Load a profile from a stored string.
  2986.     function LoadProfileByData(pwszProfile: PWideChar; out ppProfile: IWMProfile): HRESULT; stdcall;
  2987.     // Save profile specified by its string.
  2988.     function SaveProfile(pIWMProfile: IWMProfile; pwszProfile: PWideChar;
  2989.       var pdwLength: LongWord): HRESULT; stdcall;
  2990.     // Iterate through the system profiles.
  2991.     function GetSystemProfileCount(out pcProfiles: LongWord): HRESULT; stdcall;
  2992.     function LoadSystemProfile(dwProfileIndex: LongWord; out ppProfile: IWMProfile): HRESULT; stdcall;
  2993.   end;
  2994.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfileManager2> _di_IWMProfileManager2;'}
  2995.   {$EXTERNALSYM IWMProfileManager2}
  2996.   IWMProfileManager2 = interface(IWMProfileManager)
  2997.   ['{7A924E51-73C1-494d-8019-23D37ED9B89A}']
  2998.   (*** IWMProfileManager2 methods ***)
  2999.     // Set the version number of the system profiles that the profile manager
  3000.     // will enumerate. WMT_VER_4_0 is the default, for compatibility reasons,
  3001.     // so be sure to set this to the latest version if that is the desired
  3002.     // result.
  3003.     function GetSystemProfileVersion(out pdwVersion: WMT_VERSION): HRESULT; stdcall;
  3004.     function SetSystemProfileVersion(dwVersion: WMT_VERSION): HRESULT; stdcall;
  3005.   end;
  3006.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfileManagerLanguage> _di_IWMProfileManagerLanguage;'}
  3007.   {$EXTERNALSYM IWMProfileManagerLanguage}
  3008.   IWMProfileManagerLanguage = interface(IUnknown)
  3009.   ['{BA4DCC78-7EE0-4ab8-B27A-DBCE8BC51454}']
  3010.   (*** IWMProfileManagerLanguage methods ***)
  3011.     // Set the language ID that user prefers to use, it must be a valid
  3012.     // LANGID we support and the corresponding localized profile must
  3013.     // present. Or we'll use English as default
  3014.     function GetUserLanguageID(out wLangID: Word): HRESULT; stdcall;
  3015.     function SetUserLanguageID(wLangID: Word): HRESULT; stdcall;
  3016.   end;
  3017.   IWMStreamConfig = interface;
  3018.   IWMMutualExclusion = interface;
  3019.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfile> _di_IWMProfile;'}
  3020.   {$EXTERNALSYM IWMProfile}
  3021.   IWMProfile = interface(IUnknown)
  3022.   ['{96406BDB-2B2B-11d3-B36B-00C04F6108FF}']
  3023.   (*** IWMProfile methods ***)
  3024.     // By default, when the user creates a profile, it will use the latest
  3025.     // version of Windows Media. To create a backward-compatible profile,
  3026.     // call IWMProfileManager::CreateEmptyProfile with the appropriate version
  3027.     // number.
  3028.     function GetVersion(out pdwVersion: WMT_VERSION): HRESULT; stdcall;
  3029.     // Profiles have names and descriptions, for use when displaying lists
  3030.     // of profiles, etc.
  3031.     function GetName({out} pwszName: PWideChar; var pcchName: LongWord): HRESULT; stdcall;
  3032.     function SetName(pwszName: PWideChar): HRESULT; stdcall;
  3033.     function GetDescription({out} pwszDescription: PWideChar;
  3034.       var pcchDescription: LongWord): HRESULT; stdcall;
  3035.     function SetDescription(pwszDescription: PWideChar): HRESULT; stdcall;
  3036.     // Methods for enumerating the streams. Note that updating the
  3037.     // returned IWMStreamConfig has no effect on the profile until you
  3038.     // call ReconfigStream().
  3039.     function GetStreamCount(out pcStreams: LongWord): HRESULT; stdcall;
  3040.     function GetStream(dwStreamIndex: LongWord; out ppConfig: IWMStreamConfig): HRESULT; stdcall;
  3041.     function GetStreamByNumber(wStreamNum: Word; out ppConfig: IWMStreamConfig): HRESULT; stdcall;
  3042.     // Remove a stream.
  3043.     function RemoveStream(pConfig: IWMStreamConfig): HRESULT; stdcall;
  3044.     function RemoveStreamByNumber(wStreamNum: Word): HRESULT; stdcall;
  3045.     // Adding a stream copies the config into the profile.
  3046.     function AddStream(pConfig: IWMStreamConfig): HRESULT; stdcall;
  3047.     function ReconfigStream(pConfig: IWMStreamConfig): HRESULT; stdcall;
  3048.     // Create a new stream config object (avoiding the need to CoCreate).
  3049.     // This will still need to be added to the profile using the AddStream()
  3050.     // call (but only after it has been configured).
  3051.     function CreateNewStream(const guidStreamType: TGUID;
  3052.       out ppConfig: IWMStreamConfig): HRESULT; stdcall;
  3053.     // Mutual Exclusion. As above, only Add and Remove actual change the
  3054.     // profile.
  3055.     function GetMutualExclusionCount(out pcME: LongWord): HRESULT; stdcall;
  3056.     function GetMutualExclusion(dwMEIndex: LongWord; out ppME: IWMMutualExclusion): HRESULT; stdcall;
  3057.     function RemoveMutualExclusion(pME: IWMMutualExclusion): HRESULT; stdcall;
  3058.     function AddMutualExclusion(pME: IWMMutualExclusion): HRESULT; stdcall;
  3059.     function CreateNewMutualExclusion(out ppME: IWMMutualExclusion): HRESULT; stdcall;
  3060.   end;
  3061.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfile2> _di_IWMProfile2;'}
  3062.   {$EXTERNALSYM IWMProfile2}
  3063.   IWMProfile2 = interface(IWMProfile)
  3064.   ['{07E72D33-D94E-4be7-8843-60AE5FF7E5F5}']
  3065.   (*** IWMProfile2 methods ***)
  3066.     // Get/set this profile's unique identifier
  3067.     function GetProfileID(out pguidID: TGUID): HRESULT; stdcall;
  3068.   end;
  3069.   IWMBandwidthSharing = interface;
  3070.   IWMStreamPrioritization = interface;
  3071.   {$HPPEMIT 'typedef System::DelphiInterface<IWMProfile3> _di_IWMProfile3;'}
  3072.   {$EXTERNALSYM IWMProfile3}
  3073.   IWMProfile3 = interface(IWMProfile2)
  3074.   ['{00EF96CC-A461-4546-8BCD-C9A28F0E06F5}']
  3075.   (*** IWMProfile3 methods ***)
  3076.     // Get/set the storage format.  These calls have been deprecated.
  3077.     // Query the WM/ContainerFormat attribute instead.
  3078.     //
  3079.     function GetStorageFormat(out pnStorageFormat: TWMTStorageFormat): HRESULT; stdcall;
  3080.     function SetStorageFormat(nStorageFormat: TWMTStorageFormat): HRESULT; stdcall;
  3081.     //
  3082.     // Bandwidth sharing. Only Add and Remove actually change the
  3083.     // profile.
  3084.     //
  3085.     function GetBandwidthSharingCount(out pcBS: LongWord): HRESULT; stdcall;
  3086.     function GetBandwidthSharing(dwBSIndex: LongWord; out ppBS: IWMBandwidthSharing): HRESULT; stdcall;
  3087.     function RemoveBandwidthSharing(pBS: IWMBandwidthSharing): HRESULT; stdcall;
  3088.     function AddBandwidthSharing(pBS: IWMBandwidthSharing): HRESULT; stdcall;
  3089.     function CreateNewBandwidthSharing(out ppBS: IWMBandwidthSharing): HRESULT; stdcall;
  3090.     //
  3091.     // Stream prioritization.  Only Set and Remove actually
  3092.     // change the profile.
  3093.     // Note that there can be at most one such object.
  3094.     //
  3095.     function GetStreamPrioritization(out ppSP: IWMStreamPrioritization): HRESULT; stdcall;
  3096.     function SetStreamPrioritization(pSP: IWMStreamPrioritization): HRESULT; stdcall;
  3097.     function RemoveStreamPrioritization: HRESULT; stdcall;
  3098.     function CreateNewStreamPrioritization(out ppSP: IWMStreamPrioritization): HRESULT; stdcall;
  3099.     //
  3100.     // Get information about how the muxing will be done
  3101.     //
  3102.     function GetExpectedPacketCount(msDuration: Int64; out pcPackets: Int64): HRESULT; stdcall;
  3103.   end;
  3104. //
  3105. // IWMStreamConfig represents an ASF stream.
  3106. //
  3107.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStreamConfig> _di_IWMStreamConfig;'}
  3108.   {$EXTERNALSYM IWMStreamConfig}
  3109.   IWMStreamConfig = interface(IUnknown)
  3110.   ['{96406BDC-2B2B-11d3-B36B-00C04F6108FF}']
  3111.   (*** IWMStreamConfig methods ***)
  3112.     // This interface QI's for IWMMediaProps and one of it's inheritors.
  3113.     // (IWMVideoMediaProps, for instance).
  3114.     function GetStreamType(out pguidStreamType: TGUID): HRESULT; stdcall;
  3115.     function GetStreamNumber(out pwStreamNum: Word): HRESULT; stdcall;
  3116.     function SetStreamNumber(wStreamNum: Word): HRESULT; stdcall;
  3117.     function GetStreamName({out} pwszStreamName: PWideChar; var pcchStreamName: Word): HRESULT; stdcall;
  3118.     function SetStreamName(pwszStreamName: PWideChar): HRESULT; stdcall;
  3119.     function GetConnectionName({out} pwszInputName: PWideChar; var pcchInputName: Word): HRESULT; stdcall;
  3120.     function SetConnectionName(pwszInputName: PWideChar): HRESULT; stdcall;
  3121.     function GetBitrate(out pdwBitrate: LongWord): HRESULT; stdcall;
  3122.     function SetBitrate(pdwBitrate: LongWord): HRESULT; stdcall;
  3123.     //
  3124.     // A buffer window of -1 (0xffffffff) indicates that the buffer window
  3125.     // is unknown. On the writer side, this means the writer can use whatever
  3126.     // buffer window it chooses.
  3127.     //
  3128.     function GetBufferWindow(out pmsBufferWindow: LongWord): HRESULT; stdcall;
  3129.     function SetBufferWindow(msBufferWindow: LongWord): HRESULT; stdcall;
  3130.   end;
  3131.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStreamConfig2> _di_IWMStreamConfig2;'}
  3132.   {$EXTERNALSYM IWMStreamConfig2}
  3133.   IWMStreamConfig2 = interface(IWMStreamConfig)
  3134.   ['{7688D8CB-FC0D-43BD-9459-5A8DEC200CFA}']
  3135.   (*** IWMStreamConfig2 methods ***)
  3136.     // Get/set the type of data communication protocol (reliable or unreliable)
  3137.     function GetTransportType (out pnTransportType: TWMTTransportType): HRESULT; stdcall;
  3138.     function SetTransportType(nTransportType: TWMTTransportType): HRESULT; stdcall;
  3139.     //
  3140.     // Add/Get data unit extension systems (for attaching user-defined
  3141.     // data to samples in the output file)
  3142.     //
  3143.     function AddDataUnitExtension(const guidExtensionSystemID: TGUID;
  3144.       cbExtensionDataSize: Word; pbExtensionSystemInfo: PBYTE;
  3145.       cbExtensionSystemInfo: LongWord): HRESULT; stdcall;
  3146.     function GetDataUnitExtensionCount(out pcDataUnitExtensions: Word): HRESULT; stdcall;
  3147.     function GetDataUnitExtension(wDataUnitExtensionNumber: Word;
  3148.       out pguidExtensionSystemID: TGUID; out pcbExtensionDataSize: Word;
  3149.       {out} pbExtensionSystemInfo: PBYTE; var pcbExtensionSystemInfo: LongWord): HRESULT; stdcall;
  3150.     function RemoveAllDataUnitExtensions: HRESULT; stdcall;
  3151.   end;
  3152.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStreamConfig3> _di_IWMStreamConfig3;'}
  3153.   {$EXTERNALSYM IWMStreamConfig3}
  3154.   IWMStreamConfig3 = interface(IWMStreamConfig2)
  3155.   ['{CB164104-3AA9-45a7-9AC9-4DAEE131D6E1}']
  3156.   (*** IWMStreamConfig3 methods ***)
  3157.     // Get/set language info for this stream as an RFC1766 string.
  3158.     function GetLanguage({out} pwszLanguageString: PWideChar; var pcchLanguageStringLength: Word): HRESULT; stdcall;
  3159.     function SetLanguage(pwszLanguageString: PWideChar): HRESULT; stdcall;
  3160.   end;
  3161.   // Controls how big packets can get in an ASF file.
  3162.   {$HPPEMIT 'typedef System::DelphiInterface<IWMPacketSize> _di_IWMPacketSize;'}
  3163.   {$EXTERNALSYM IWMPacketSize}
  3164.   IWMPacketSize = interface(IUnknown)
  3165.   ['{CDFB97AB-188F-40b3-B643-5B7903975C59}']
  3166.   (*** IWMPacketSize methods ***)
  3167.     function GetMaxPacketSize(out pdwMaxPacketSize: LongWord): HRESULT; stdcall;
  3168.     function SetMaxPacketSize(dwMaxPacketSize: LongWord): HRESULT; stdcall;
  3169.   end;
  3170.   // Controls how small packets can get in an ASF file.
  3171.   {$HPPEMIT 'typedef System::DelphiInterface<IWMPacketSize2> _di_IWMPacketSize2;'}
  3172.   {$EXTERNALSYM IWMPacketSize2}
  3173.   IWMPacketSize2 = interface(IWMPacketSize)
  3174.   ['{8BFC2B9E-B646-4233-A877-1C6A079669DC}']
  3175.   (*** IWMPacketSize2 methods ***)
  3176.     function GetMinPacketSize(out pdwMinPacketSize: LongWord): HRESULT; stdcall;
  3177.     function SetMinPacketSize(dwMinPacketSize: LongWord): HRESULT; stdcall;
  3178.   end;
  3179.   // IWMStreamList is used for the various objects that define relationships
  3180.   // between streams.
  3181.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStreamList> _di_IWMStreamList;'}
  3182.   {$EXTERNALSYM IWMStreamList}
  3183.   IWMStreamList = interface(IUnknown)
  3184.   ['{96406BDD-2B2B-11d3-B36B-00C04F6108FF}']
  3185.   (*** IWMStreamList methods ***)
  3186.     function GetStreams({out} pwStreamNumArray: PWORD; var pcStreams: PWORD): HRESULT; stdcall;
  3187.     function AddStream(wStreamNum: Word): HRESULT; stdcall;
  3188.     function RemoveStream(wStreamNum: Word): HRESULT; stdcall;
  3189.   end;
  3190.   // IWMMutualExclusion specifies a group of streams, of which only one can
  3191.   // be played at once. These are used to do MEB (stream selection based on
  3192.   // bandwidth).
  3193.   {$HPPEMIT 'typedef System::DelphiInterface<IWMMutualExclusion> _di_IWMMutualExclusion;'}
  3194.   {$EXTERNALSYM IWMMutualExclusion}
  3195.   IWMMutualExclusion = interface(IWMStreamList)
  3196.   ['{96406BDE-2B2B-11d3-B36B-00C04F6108FF}']
  3197.   (*** IWMMutualExclusion methods ***)
  3198.     // The possible types of mutual exclusion are defined in the ASF
  3199.     // header.
  3200.     function GetType(out pguidType: TGUID): HRESULT; stdcall;
  3201.     function SetType(guidType: TGUID): HRESULT; stdcall;
  3202.   end;
  3203.   // IWMMutualExclusion2 extends IWMMutualExclusion to incorporate more advanced
  3204.   // mutual exclusion concepts.
  3205.   //
  3206.   {$HPPEMIT 'typedef System::DelphiInterface<IWMMutualExclusion2> _di_IWMMutualExclusion2;'}
  3207.   {$EXTERNALSYM IWMMutualExclusion2}
  3208.   IWMMutualExclusion2 = interface(IWMMutualExclusion)
  3209.   ['{0302B57D-89D1-4ba2-85C9-166F2C53EB91}']
  3210.   (*** IWMMutualExclusion2 methods ***)
  3211.     // Methods to get and set the name of the mutual exclusion.
  3212.     function GetName({out} pwszName: PWideChar; var pcchName: Word): HRESULT; stdcall;
  3213.     function SetName(pwszName: PWideChar): HRESULT; stdcall;
  3214.     // Methods to query and manipulate the records in the object.
  3215.     function GetRecordCount(out pwRecordCount: Word): HRESULT; stdcall;
  3216.     function AddRecord: HRESULT; stdcall;
  3217.     function RemoveRecord(wRecordNumber: Word ): HRESULT; stdcall;
  3218.     // Methods to get and set the name associated with a record.
  3219.     function GetRecordName(wRecordNumber: Word; {out} pwszRecordName: PWideChar;
  3220.       var pcchRecordName: Word): HRESULT; stdcall;
  3221.     function SetRecordName(wRecordNumber: Word; pwszRecordName: PWideChar): HRESULT; stdcall;
  3222.     // Methods to get and set the streams in a record.
  3223.     function GetStreamsForRecord(wRecordNumber: Word; {out} pwStreamNumArray: PWORD;
  3224.       var pcStreams: Word): HRESULT; stdcall;
  3225.     function AddStreamForRecord(wRecordNumber, wStreamNumber: Word): HRESULT; stdcall;
  3226.     function RemoveStreamForRecord(wRecordNumber, wStreamNumber: Word): HRESULT; stdcall;
  3227.   end;
  3228.   // IWMBandwidthSharing specifies a group of streams whose combined bitrate
  3229.   // and buffer size are not to exceed the parameters given to this interface,
  3230.   // even though the sum of their individual bitrates may be more.
  3231.   {$HPPEMIT 'typedef System::DelphiInterface<IWMBandwidthSharing> _di_IWMBandwidthSharing;'}
  3232.   {$EXTERNALSYM IWMBandwidthSharing}
  3233.   IWMBandwidthSharing = interface(IWMStreamList)
  3234.   ['{AD694AF1-F8D9-42F8-BC47-70311B0C4F9E}']
  3235.   (*** IWMBandwidthSharing methods ***)
  3236.     // The possible types of bandwidth are defined in the ASF
  3237.     // header.
  3238.     function GetType(out pguidType: TGUID): HRESULT; stdcall;
  3239.     function SetType(const guidType: TGUID): HRESULT; stdcall;
  3240.     // Methods to get and set properties of the combined streams.
  3241.     // Buffer windows are given in milliseconds
  3242.     function GetBandwidth(out pdwBitrate, pmsBufferWindow: LongWord): HRESULT; stdcall;
  3243.     function SetBandwidth(dwBitrate, msBufferWindow: LongWord): HRESULT; stdcall;
  3244.   end;
  3245.   // IWMStreamPrioritization specifies the author's intentions as to which
  3246.   // streams should or should not be dropped in response to various network
  3247.   // congestion situations.
  3248.   {$HPPEMIT 'typedef System::DelphiInterface<IWMStreamPrioritization> _di_IWMStreamPrioritization;'}
  3249.   {$EXTERNALSYM IWMStreamPrioritization}
  3250.   IWMStreamPrioritization = interface(IUnknown)
  3251.     ['{8C1C6090-F9A8-4748-8EC3-DD1108BA1E77}']
  3252.     (*** IWMStreamPrioritization methods ***)
  3253.     // Records in a stream prioritization object are given in order of
  3254.     // decreasing priority
  3255.     function GetPriorityRecords({out} pRecordArray: PWMStreamPrioritizationRecord; var cRecords: Word): HResult; stdcall;
  3256.     function SetPriorityRecords(pRecordArray: PWMStreamPrioritizationRecord; cRecords: Word): HResult; stdcall;
  3257.   end;
  3258. ///////////////////////////////////////////////////////////////////////////////
  3259. //
  3260. // Advanced features.
  3261. //
  3262. ///////////////////////////////////////////////////////////////////////////////
  3263.   IWMWriterSink = interface;
  3264.   // The writer can be QI'd for this interface, which provides advanced writing
  3265.   // functionality.
  3266.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterAdvanced> _di_IWMWriterAdvanced;'}
  3267.   {$EXTERNALSYM IWMWriterAdvanced}
  3268.   IWMWriterAdvanced = interface(IUnknown)
  3269.     ['{96406BE3-2B2B-11D3-B36B-00C04F6108FF}']
  3270.     (*** IWMWriterAdvanced methods ***)
  3271.     // Sinks are where the output ASF data goes.
  3272.     function GetSinkCount(out pcSinks: LongWord): HResult; stdcall;
  3273.     function GetSink(dwSinkNum: LongWord; out ppSink: IWMWriterSink): HResult; stdcall;
  3274.     function AddSink(pSink: IWMWriterSink): HResult; stdcall;
  3275.     function RemoveSink(pSink: IWMWriterSink): HResult; stdcall;
  3276.     // By default, the user provides samples to an input on the
  3277.     // IWMWriter interface, and the samples may be compressed, put
  3278.     // into a MEB stream, etc. However, the user can use this interface to
  3279.     // put the samples directly into the ASF, with no compression etc.
  3280.     function WriteStreamSample(wStreamNum: Word; cnsSampleTime: Int64;
  3281.                                msSampleSendTime: LongWord; cnsSampleDuration: Int64;
  3282.                                dwFlags: LongWord; pSample: INSSBuffer): HResult; stdcall;
  3283.     // The writer may be running in real-time. If so, it's interesting to
  3284.     // get the current time from the writer.
  3285.     function SetLiveSource(fIsLiveSource: BOOL): HResult; stdcall;
  3286.     function IsRealTime(out pfRealTime: BOOL): HResult; stdcall;
  3287.     function GetWriterTime(out pcnsCurrentTime: Int64): HResult; stdcall;
  3288.     // To get statistics, pass in a WM_WRITER_STATISTICS structure, which
  3289.     // will be filled out by the GetStatistics() call with the requested
  3290.     // stats.
  3291.     //
  3292.     // Pass in a stream number to get statistics for a specific stream, or
  3293.     // pass 0 to get statistics for the entire ASF file.
  3294.     function GetStatistics(wStreamNum: Word; out pStats: TWMWriterStatistics): HResult; stdcall;
  3295.     // Sync tolerance determines how far out of sync the inputs will be allowed
  3296.     // to get before samples are thrown away.  Default is 3000 ms.
  3297.     function SetSyncTolerance(msWindow: LongWord): HResult; stdcall;
  3298.     function GetSyncTolerance(out pmsWindow: LongWord): HResult; stdcall;
  3299.   end;
  3300.   // The writer can be QI'd for this interface, which provides advanced writing
  3301.   // functionality.
  3302.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterAdvanced2> _di_IWMWriterAdvanced2;'}
  3303.   {$EXTERNALSYM IWMWriterAdvanced2}
  3304.   IWMWriterAdvanced2 = interface(IWMWriterAdvanced)
  3305.     ['{962DC1EC-C046-4DB8-9CC7-26CEAE500817}']
  3306.     (*** IWMWriterAdvanced2 methods ***)
  3307.     // Retrieves a setting for a particular output by name
  3308.     function GetInputSetting(dwInputNum: LongWord; pszName: PWideChar;
  3309.        out pType: TWMTAttrDataType; {out} pValue: PByte; var pcbLength: Word): HResult; stdcall;
  3310.     // Sets a named setting for a particular input
  3311.     function SetInputSetting(dwInputNum: LongWord; pszName: PWideChar; Type_: TWMTAttrDataType;
  3312.       pValue: PByte; cbLength: Word): HResult; stdcall;
  3313.   end;
  3314.   // The writer can be QI'd for this interface, which provides advanced writing
  3315.   // functionality.
  3316.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterAdvanced3> _di_IWMWriterAdvanced3;'}
  3317.   {$EXTERNALSYM IWMWriterAdvanced3}
  3318.   IWMWriterAdvanced3 = interface(IWMWriterAdvanced2)
  3319.     ['{2CD6492D-7C37-4E76-9D3B-59261183A22E}']
  3320.     (*** IWMWriterAdvanced3 methods ***)
  3321.     // To get extended statistics, pass in a WM_WRITER_STATISTICS_EX structure, which
  3322.     // will be filled out by the GetStatisticsEx() call with the requested
  3323.     // stats.
  3324.     //
  3325.     // Pass in a stream number to get extended statistics for a specific stream, or
  3326.     // pass 0 to get extended statistics for the entire ASF file.
  3327.     function GetStatisticsEx(wStreamNum: Word; out pStats: TWMWriterStatisticsEx): HResult; stdcall;
  3328.     function SetNonBlocking: HResult; stdcall;
  3329.   end;
  3330.   // The writer can be QI'd for this interface, which provides multi-pass
  3331.   // encoding functionality.
  3332.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterPreprocess> _di_IWMWriterPreprocess;'}
  3333.   {$EXTERNALSYM IWMWriterPreprocess}
  3334.   IWMWriterPreprocess = interface(IUnknown)
  3335.     ['{FC54A285-38C4-45B5-AA23-85B9F7CB424B}']
  3336.     (*** IWMWriterPreprocess methods ***)
  3337.     function GetMaxPreprocessingPasses(dwInputNum: LongWord; dwFlags: LongWord;
  3338.       out pdwMaxNumPasses: LongWord): HResult; stdcall;
  3339.     function SetNumPreprocessingPasses(dwInputNum: LongWord; dwFlags: LongWord;
  3340.       dwNumPasses: LongWord): HResult; stdcall;
  3341.     function BeginPreprocessingPass(dwInputNum: LongWord; dwFlags: LongWord): HResult; stdcall;
  3342.     function PreprocessSample(dwInputNum: LongWord; cnsSampleTime: Int64; dwFlags: LongWord;
  3343.       pSample: INSSBuffer): HResult; stdcall;
  3344.     function EndPreprocessingPass(dwInputNum: LongWord; dwFlags: LongWord): HResult; stdcall;
  3345.   end;
  3346.   // This is the interface that receives uncompressed samples from the writer
  3347.   // to preview (well, postview) what the codec is doing.
  3348.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterPostViewCallback> _di_IWMWriterPostViewCallback;'}
  3349.   {$EXTERNALSYM IWMWriterPostViewCallback}
  3350.   IWMWriterPostViewCallback = interface(IWMStatusCallback)
  3351.     ['{D9D6549D-A193-4F24-B308-03123D9B7F8D}']
  3352.     (*** IWMWriterPostViewCallback methods ***)
  3353.     // cnsSampleDuration will be 0 for most media types.
  3354.     function OnPostViewSample(wStreamNumber: Word; cnsSampleTime: Int64;
  3355.                               cnsSampleDuration: Int64; dwFlags: LongWord;
  3356.                               pSample: INSSBuffer; pvContext: Pointer): HResult; stdcall;
  3357.     function AllocateForPostView(wStreamNum: Word; cbBuffer: LongWord; out ppBuffer: INSSBuffer;
  3358.                                  pvContext: Pointer): HResult; stdcall;
  3359.   end;
  3360.   // The writer can be QI'd for this interface, which provides advanced writing
  3361.   // functionality.
  3362.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterPostView> _di_IWMWriterPostView;'}
  3363.   {$EXTERNALSYM IWMWriterPostView}
  3364.   IWMWriterPostView = interface(IUnknown)
  3365.     ['{81E20CE4-75EF-491A-8004-FC53C45BDC3E}']
  3366.     (*** IWMWriterPostView methods ***)
  3367.     // Specify the callback to use for PostView
  3368.     function SetPostViewCallback(pCallback: IWMWriterPostViewCallback; pvContext: Pointer): HResult; stdcall;
  3369.     // Turns on delivery of postview samples for a given stream
  3370.     function SetReceivePostViewSamples(wStreamNum: Word; fReceivePostViewSamples: BOOL): HResult; stdcall;
  3371.     function GetReceivePostViewSamples(wStreamNum: Word; out pfReceivePostViewSamples: BOOL): HResult; stdcall;
  3372.     // The user can enumerate through the various outputs, and get the
  3373.     // output format for that data.
  3374.     //
  3375.     // Manipulating the IWMOutputMediaProps has no effect on the output, unless
  3376.     // the user also calls SetOutputProps.
  3377.     function GetPostViewProps(wStreamNumber: Word; out ppOutput: IWMMediaProps): HResult; stdcall;
  3378.     function SetPostViewProps(wStreamNumber: Word; pOutput: IWMMediaProps): HResult; stdcall;
  3379.     // Used for determining all possible format types supported by this
  3380.     // output on the reader.
  3381.     function GetPostViewFormatCount(wStreamNumber: Word; out pcFormats: LongWord): HResult; stdcall;
  3382.     function GetPostViewFormat(wStreamNumber: Word; dwFormatNumber: LongWord;
  3383.                                out ppProps: IWMMediaProps): HResult; stdcall;
  3384.     // The user can register himself to provide buffers for any of the outputs
  3385.     // (for instance, DDraw buffers). The actual allocation is on the
  3386.     // IWMReaderCallbackAdvanced interface.
  3387.     function SetAllocateForPostView(wStreamNumber: Word; fAllocate: BOOL): HResult; stdcall;
  3388.     function GetAllocateForPostView(wStreamNumber: Word; out pfAllocate: BOOL): HResult; stdcall;
  3389.   end;
  3390.   // This is the interface that receives raw ASF from the writer.
  3391.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterSink> _di_IWMWriterSink;'}
  3392.   {$EXTERNALSYM IWMWriterSink}
  3393.   IWMWriterSink = interface(IUnknown)
  3394.     ['{96406BE4-2B2B-11D3-B36B-00C04F6108FF}']
  3395.     (*** IWMWriterSink methods ***)
  3396.     function OnHeader(pHeader: INSSBuffer): HResult; stdcall;
  3397.     // Some sinks require that data be fed to them in real-time.
  3398.     function IsRealTime(out pfRealTime: BOOL): HResult; stdcall;
  3399.     function AllocateDataUnit(cbDataUnit: LongWord; out ppDataUnit: INSSBuffer): HResult; stdcall;
  3400.     function OnDataUnit(pDataUnit: INSSBuffer): HResult; stdcall;
  3401.     // This function is called when the writer is done sending data.
  3402.     function OnEndWriting: HResult; stdcall;
  3403.   end;
  3404.   {$HPPEMIT 'typedef System::DelphiInterface<IWMRegisterCallback> _di_IWMRegisterCallback;'}
  3405.   {$EXTERNALSYM IWMRegisterCallback}
  3406.   IWMRegisterCallback = interface(IUnknown)
  3407.     ['{CF4B1F99-4DE2-4E49-A363-252740D99BC1}']
  3408.     (*** IWMRegisterCallback methods ***)
  3409.     function Advise(pCallback: IWMStatusCallback; pvContext: Pointer): HResult; stdcall;
  3410.     function Unadvise(pCallback: IWMStatusCallback; pvContext: Pointer): HResult; stdcall;
  3411.   end;
  3412.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterFileSink> _di_IWMWriterFileSink;'}
  3413.   {$EXTERNALSYM IWMWriterFileSink}
  3414.   IWMWriterFileSink = interface(IWMWriterSink)
  3415.     ['{96406BE5-2B2B-11D3-B36B-00C04F6108FF}']
  3416.     (*** IWMWriterFileSink methods ***)
  3417.     function Open(pwszFilename: PWideChar): HResult; stdcall;
  3418.   end;
  3419.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterFileSink2> _di_IWMWriterFileSink2;'}
  3420.   {$EXTERNALSYM IWMWriterFileSink2}
  3421.   IWMWriterFileSink2 = interface(IWMWriterFileSink)
  3422.     ['{14282BA7-4AEF-4205-8CE5-C229035A05BC}']
  3423.     (*** IWMWriterFileSink2 methods ***)
  3424.     function Start(cnsStartTime: Int64): HResult; stdcall;
  3425.     function Stop(cnsStopTime: Int64): HResult; stdcall;
  3426.     function IsStopped(out pfStopped: BOOL): HResult; stdcall;
  3427.     function GetFileDuration(out pcnsDuration: Int64): HResult; stdcall;
  3428.     function GetFileSize(out pcbFile: Int64): HResult; stdcall;
  3429.     function Close: HResult; stdcall;
  3430.     function IsClosed(out pfClosed: BOOL): HResult; stdcall;
  3431.   end;
  3432.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterFileSink3> _di_IWMWriterFileSink3;'}
  3433.   {$EXTERNALSYM IWMWriterFileSink3}
  3434.   IWMWriterFileSink3 = interface(IWMWriterFileSink2)
  3435.     ['{3FEA4FEB-2945-47A7-A1DD-C53A8FC4C45C}']
  3436.     (*** IWMWriterFileSink3 methods ***)
  3437.     function SetAutoIndexing(fDoAutoIndexing: BOOL): HResult; stdcall;
  3438.     function GetAutoIndexing(out pfAutoIndexing: BOOL): HResult; stdcall;
  3439.     function SetControlStream(wStreamNumber: Word; fShouldControlStartAndStop: BOOL): HResult; stdcall;
  3440.     function GetMode(out pdwFileSinkMode: LongWord): HResult; stdcall;
  3441.     function OnDataUnitEx(pFileSinkDataUnit: PWMTFileSinkDataUnit): HResult; stdcall;
  3442.     function SetUnbufferedIO(fUnbufferedIO: BOOL; fRestrictMemUsage: BOOL): HResult; stdcall;
  3443.     function GetUnbufferedIO(out pfUnbufferedIO: BOOL): HResult; stdcall;
  3444.     function CompleteOperations: HResult; stdcall;
  3445.   end;
  3446.   {$HPPEMIT 'typedef System::DelphiInterface<IWMWriterNetworkSink> _di_IWMWriterNetworkSink;'}
  3447.   {$EXTERNALSYM IWMWriterNetworkSink}
  3448.   IWMWriterNetworkSink = interface(IWMWriterSink)
  3449.     ['{96406BE7-2B2B-11D3-B36B-00C04F6108FF}']
  3450.     (*** IWMWriterNetworkSink methods ***)
  3451.     // Determine the maximum number of clients that can connect to this sink.
  3452.     // Default is 5.
  3453.     function SetMaximumClients(dwMaxClients: LongWord): HResult; stdcall;
  3454.     function GetMaximumClients(out pdwMaxClients: LongWord): HResult; stdcall;
  3455.     // The network protocol that the network sink will use.
  3456.     function SetNetworkProtocol(protocol: TWMTNetProtocol): HResult; stdcall;
  3457.     function GetNetworkProtocol(out pProtocol: TWMTNetProtocol): HResult; stdcall;
  3458.     // Find out the name of the URL on which we're broadcasting
  3459.     function GetHostURL({out} pwszURL: PWideChar; var pcchURL: LongWord): HResult; stdcall;
  3460.     // The method claims the network port number. Close the sink to release
  3461.     // the port.
  3462.     //
  3463.     // Specify 0 for the port number and the sink will select a port for
  3464.     // the user.
  3465.     function Open(var pdwPortNum: LongWord): HResult; stdcall;
  3466.     // Disconnect all connected clients.
  3467.     function Disconnect: HResult; stdcall;
  3468.     // Close and release the open port.
  3469.     function Close: HResult; stdcall;
  3470.   end;
  3471.   {$HPPEMIT 'typedef System::DelphiInterface<IWMClientConnections> _di_IWMClientConnections;'}
  3472.   {$EXTERNALSYM IWMClientConnections}
  3473.   IWMClientConnections = interface(IUnknown)
  3474.     ['{73C66010-A299-41DF-B1F0-CCF03B09C1C6}']
  3475.     (*** IWMClientConnections methods ***)
  3476.     // Determine the number of connected clients
  3477.     function GetClientCount(out pcClients: LongWord): HResult; stdcall;
  3478.     // Get information about a connected client
  3479.     function GetClientProperties(dwClientNum: LongWord; out pClientProperties: TWMClientProperties): HResult; stdcall;
  3480.   end;
  3481.   {$HPPEMIT 'typedef System::DelphiInterface<IWMClientConnections2> _di_IWMClientConnections2;'}
  3482.   {$EXTERNALSYM IWMClientConnections2}
  3483.   IWMClientConnections2 = interface(IWMClientConnections)
  3484.     ['{4091571E-4701-4593-BB3D-D5F5F0C74246}']
  3485.     (*** IWMClientConnections2 methods ***)
  3486.     // Get information about a connected client
  3487.     function GetClientInfo(dwClientNum: LongWord; {out} pwszNetworkAddress: PWideChar;
  3488.       var pcchNetworkAddress: LongWord; {out} pwszPort: PWideChar;
  3489.       var pcchPort: LongWord; {out} pwszDNSName: PWideChar;
  3490.       var pcchDNSName: LongWord): HResult; stdcall;
  3491.   end;
  3492. // The reader can be QI'd for this interface for advanced functionality.
  3493.   {$HPPEMIT 'typedef System::DelphiInterface<IWMReaderAdvanced> _di_IWMReaderAdvanced;'}
  3494.   {$EXTERNALSYM IWMReaderAdvanced}
  3495.   IWMReaderAdvanced = interface(IUnknown)
  3496.     ['{96406BEA-2B2B-11D3-B36B-00C04F6108FF}']
  3497.     (*** IWMReaderAdvanced methods ***)
  3498.     // The user may want to drive the clock himself, particularly if he wants
  3499.     // to source from a file faster-than-realtime. This call may fail if the
  3500.     // current source does not support user-driven clocks.
  3501.     //
  3502.     // The proper way for a user to drive the clock is for the user to call
  3503.     // DeliverTime, and then wait for the OnTime call on
  3504.     // IWMReaderCallbackAdvanced to reach the time he specified.
  3505.     function SetUserProvidedClock(fUserClock: BOOL): HResult; stdcall;