Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2689 lines
99 KiB

  1. //============================================================================
  2. //
  3. // Microsoft Windows Media Technology
  4. // Copyright (C) Microsoft Corporation, 1999 - 2001. All Rights Reserved.
  5. //
  6. // File: wmsdkidl.idl
  7. //
  8. // Description:
  9. //
  10. //============================================================================
  11. cpp_quote( "//=========================================================================" )
  12. cpp_quote( "//" )
  13. cpp_quote( "// Microsoft Windows Media Technologies" )
  14. cpp_quote( "// Copyright (C) Microsoft Corporation, 1999 - 2001. All Rights Reserved." )
  15. cpp_quote( "//" )
  16. cpp_quote( "//=========================================================================" )
  17. ///////////////////////////////////////////////////////////////////////////////
  18. //
  19. // Enumerations and constants used by the SDK.
  20. //
  21. ///////////////////////////////////////////////////////////////////////////////
  22. //////////////////////////////////////////////////////////////////////////////
  23. //
  24. // Imports, typedefs and forward declarations
  25. //
  26. import "oaidl.idl";
  27. import "wmsbuffer.idl";
  28. import "drmexternals.idl";
  29. typedef unsigned __int64 QWORD;
  30. //
  31. // Here's a list of all the interfaces we define in this file:
  32. //
  33. interface IWMMediaProps;
  34. interface IWMVideoMediaProps;
  35. interface IWMWriter;
  36. interface IWMInputMediaProps;
  37. interface IWMReader;
  38. interface IWMOutputMediaProps;
  39. interface IWMReaderCallback;
  40. interface IWMMetadataEditor;
  41. interface IWMMetadataEditor2;
  42. interface IWMHeaderInfo;
  43. interface IWMProfile;
  44. interface IWMProfileManager;
  45. interface IWMStreamConfig;
  46. interface IWMStreamList;
  47. interface IWMMutualExclusion;
  48. interface IWMPacketSize;
  49. interface IWMWriterAdvanced;
  50. interface IWMWriterAdvanced2;
  51. interface IWMWriterSink;
  52. interface IWMWriterFileSink;
  53. interface IWMWriterNetworkSink;
  54. interface IWMReaderAdvanced;
  55. interface IWMReaderAdvanced2;
  56. interface IWMReaderAdvanced3;
  57. interface IWMReaderCallbackAdvanced;
  58. interface IWMDRMReader;
  59. interface IWMReaderNetworkConfig;
  60. interface IWMLicenseBackup;
  61. interface IWMLicenseRestore;
  62. interface IWMBackupRestoreProps;
  63. interface IWMCodecInfo;
  64. interface IWMCodecInfo2;
  65. ///////////////////////////////////////////////////////////////////////////////
  66. //
  67. // Attributes
  68. //
  69. ///////////////////////////////////////////////////////////////////////////////
  70. cpp_quote( "////////////////////////////////////////////////////////////////" )
  71. cpp_quote( "//" )
  72. cpp_quote( "// These are the special case attributes that give information " )
  73. cpp_quote( "// about the Windows Media file." )
  74. cpp_quote( "//" )
  75. cpp_quote( "static const DWORD g_dwWMSpecialAttributes = 15;" )
  76. cpp_quote( "static const WCHAR *g_wszWMDuration = L\"Duration\";" )
  77. cpp_quote( "static const WCHAR *g_wszWMBitrate = L\"Bitrate\";" )
  78. cpp_quote( "static const WCHAR *g_wszWMSeekable = L\"Seekable\";" )
  79. cpp_quote( "static const WCHAR *g_wszWMStridable = L\"Stridable\";" )
  80. cpp_quote( "static const WCHAR *g_wszWMBroadcast = L\"Broadcast\";" )
  81. cpp_quote( "static const WCHAR *g_wszWMProtected = L\"Is_Protected\";" )
  82. cpp_quote( "static const WCHAR *g_wszWMTrusted = L\"Is_Trusted\";" )
  83. cpp_quote( "static const WCHAR *g_wszWMSignature_Name = L\"Signature_Name\";" )
  84. cpp_quote( "static const WCHAR *g_wszWMHasAudio = L\"HasAudio\";" )
  85. cpp_quote( "static const WCHAR *g_wszWMHasImage = L\"HasImage\";" )
  86. cpp_quote( "static const WCHAR *g_wszWMHasScript = L\"HasScript\";" )
  87. cpp_quote( "static const WCHAR *g_wszWMHasVideo = L\"HasVideo\";" )
  88. cpp_quote( "static const WCHAR *g_wszWMCurrentBitrate = L\"CurrentBitrate\";" )
  89. cpp_quote( "static const WCHAR *g_wszWMOptimalBitrate = L\"OptimalBitrate\";" )
  90. cpp_quote( "static const WCHAR *g_wszWMHasAttachedImages = L\"HasAttachedImages\";" )
  91. cpp_quote( "" )
  92. cpp_quote( "////////////////////////////////////////////////////////////////" )
  93. cpp_quote( "//" )
  94. cpp_quote( "// The content description object supports 5 basic attributes." )
  95. cpp_quote( "//" )
  96. cpp_quote( "static const DWORD g_dwWMContentAttributes = 5;" )
  97. cpp_quote( "static const WCHAR *g_wszWMTitle = L\"Title\";" )
  98. cpp_quote( "static const WCHAR *g_wszWMAuthor = L\"Author\";" )
  99. cpp_quote( "static const WCHAR *g_wszWMDescription = L\"Description\";" )
  100. cpp_quote( "static const WCHAR *g_wszWMRating = L\"Rating\";" )
  101. cpp_quote( "static const WCHAR *g_wszWMCopyright = L\"Copyright\";" )
  102. cpp_quote( "" )
  103. cpp_quote( "////////////////////////////////////////////////////////////////" )
  104. cpp_quote( "//" )
  105. cpp_quote( "// These attributes are used to set DRM properties." )
  106. cpp_quote( "//" )
  107. cpp_quote( "static const WCHAR *g_wszWMUse_DRM = L\"Use_DRM\";" )
  108. cpp_quote( "static const WCHAR *g_wszWMDRM_Flags = L\"DRM_Flags\";" )
  109. cpp_quote( "static const WCHAR *g_wszWMDRM_Level = L\"DRM_Level\";" )
  110. cpp_quote( "" )
  111. cpp_quote( "////////////////////////////////////////////////////////////////" )
  112. cpp_quote( "//" )
  113. cpp_quote( "// These are the additional attributes defined in the WM attribute" )
  114. cpp_quote( "// namespace that give information about the content." )
  115. cpp_quote( "//" )
  116. cpp_quote( "static const WCHAR *g_wszWMAlbumTitle = L\"WM/AlbumTitle\";" )
  117. cpp_quote( "static const WCHAR *g_wszWMTrack = L\"WM/Track\";" )
  118. cpp_quote( "static const WCHAR *g_wszWMPromotionURL = L\"WM/PromotionURL\";" )
  119. cpp_quote( "static const WCHAR *g_wszWMAlbumCoverURL = L\"WM/AlbumCoverURL\";" )
  120. cpp_quote( "static const WCHAR *g_wszWMGenre = L\"WM/Genre\";" )
  121. cpp_quote( "static const WCHAR *g_wszWMYear = L\"WM/Year\";" )
  122. cpp_quote( "static const WCHAR *g_wszWMGenreID = L\"WM/GenreID\";" )
  123. cpp_quote( "static const WCHAR *g_wszWMMCDI = L\"WM/MCDI\";" )
  124. cpp_quote( "static const WCHAR *g_wszWMComposer = L\"WM/Composer\";" )
  125. cpp_quote( "static const WCHAR *g_wszWMLyrics = L\"WM/Lyrics\";" )
  126. cpp_quote( "static const WCHAR *g_wszWMTrackNumber = L\"WM/TrackNumber\";" )
  127. cpp_quote( "static const WCHAR *g_wszWMToolName = L\"WM/ToolName\";" )
  128. cpp_quote( "static const WCHAR *g_wszWMToolVersion = L\"WM/ToolVersion\";" )
  129. cpp_quote( "" )
  130. cpp_quote( "////////////////////////////////////////////////////////////////" )
  131. cpp_quote( "//" )
  132. cpp_quote( "// These optional attributes may be used to give information " )
  133. cpp_quote( "// about the branding of the content." )
  134. cpp_quote( "//" )
  135. cpp_quote( "static const WCHAR *g_wszWMBannerImageType = L\"BannerImageType\";" )
  136. cpp_quote( "static const WCHAR *g_wszWMBannerImageData = L\"BannerImageData\";" )
  137. cpp_quote( "static const WCHAR *g_wszWMBannerImageURL = L\"BannerImageURL\";" )
  138. cpp_quote( "static const WCHAR *g_wszWMCopyrightURL = L\"CopyrightURL\";" )
  139. cpp_quote( "////////////////////////////////////////////////////////////////" )
  140. cpp_quote( "//" )
  141. cpp_quote( "// The NSC file supports the following attributes." )
  142. cpp_quote( "//" )
  143. cpp_quote( "static const DWORD g_dwWMNSCAttributes = 5;" )
  144. cpp_quote( "static const WCHAR *g_wszWMNSCName = L\"NSC_Name\";" )
  145. cpp_quote( "static const WCHAR *g_wszWMNSCAddress = L\"NSC_Address\";" )
  146. cpp_quote( "static const WCHAR *g_wszWMNSCPhone = L\"NSC_Phone\";" )
  147. cpp_quote( "static const WCHAR *g_wszWMNSCEmail = L\"NSC_Email\";" )
  148. cpp_quote( "static const WCHAR *g_wszWMNSCDescription = L\"NSC_Description\";" )
  149. cpp_quote( "" )
  150. ///////////////////////////////////////////////////////////////////////////////
  151. cpp_quote( "////////////////////////////////////////////////////////////////" )
  152. cpp_quote( "//" )
  153. cpp_quote( "// These are setting names for use in Get/SetOutputSetting" )
  154. cpp_quote( "//" )
  155. cpp_quote( "static const WCHAR *g_wszEarlyDataDelivery = L\"EarlyDataDelivery\";" )
  156. cpp_quote( "static const WCHAR *g_wszJustInTimeDecode = L\"JustInTimeDecode\";" )
  157. cpp_quote( "static const WCHAR *g_wszSingleOutputBuffer = L\"SingleOutputBuffer\";" )
  158. cpp_quote( "static const WCHAR *g_wszSoftwareScaling = L\"SoftwareScaling\";" )
  159. cpp_quote( "static const WCHAR *g_wszDeliverOnReceive = L\"DeliverOnReceive\";" )
  160. cpp_quote( "static const WCHAR *g_wszScrambledAudio = L\"ScrambledAudio\";" )
  161. cpp_quote( "" )
  162. ///////////////////////////////////////////////////////////////////////////////
  163. cpp_quote( "////////////////////////////////////////////////////////////////" )
  164. cpp_quote( "//" )
  165. cpp_quote( "// These are setting names for use in Get/SetInputSetting" )
  166. cpp_quote( "//" )
  167. cpp_quote( "static const WCHAR *g_wszDeinterlaceMode = L\"DeinterlaceMode\";" )
  168. cpp_quote( "" )
  169. cpp_quote( "////////////////////////////////////////////////////////////////" )
  170. cpp_quote( "//" )
  171. cpp_quote( "// All known IWMPropertyVault property names" )
  172. cpp_quote( "//" )
  173. cpp_quote( "static const WCHAR *g_wszOriginalSourceFormatTag = L\"_SOURCEFORMATTAG\";" )
  174. cpp_quote( "" )
  175. ///////////////////////////////////////////////////////////////////////////////
  176. ///////////////////////////////////////////////////////////////////////////////
  177. //
  178. // Enumerations and flags used by the SDK.
  179. //
  180. ///////////////////////////////////////////////////////////////////////////////
  181. cpp_quote( "////////////////////////////////////////////////////////////////" )
  182. cpp_quote( "//" )
  183. cpp_quote( "// Flags that can be passed into the Start method of IWMReader" )
  184. cpp_quote( "//" )
  185. cpp_quote( "#define WM_START_CURRENTPOSITION ( ( QWORD )-1 )" )
  186. cpp_quote( "" )
  187. //
  188. // Flag to force overwrite of existing license backup
  189. //
  190. cpp_quote( "#define WM_BACKUP_OVERWRITE ((DWORD) 0x00000001)" )
  191. cpp_quote( "#define WM_RESTORE_INDIVIDUALIZE ((DWORD) 0x00000002)" )
  192. //
  193. // Wave format ex type
  194. //
  195. cpp_quote( "#define WAVE_FORMAT_DRM 0x0009" )
  196. //
  197. // The flags that can be set on a sample (input or output).
  198. //
  199. enum
  200. {
  201. WM_SF_CLEANPOINT = 0x1,
  202. WM_SF_DISCONTINUITY = 0x2,
  203. WM_SF_DATALOSS = 0x4,
  204. };
  205. //
  206. // These flags might be set for a call to the IWMReaderAllocatorEx methods.
  207. //
  208. enum
  209. {
  210. WM_SFEX_NOTASYNCPOINT = 0x2,
  211. WM_SFEX_DATALOSS = 0x4,
  212. };
  213. //
  214. // Status messages that the reader and index objects can
  215. // pass in the OnStatus call.
  216. //
  217. typedef enum WMT_STATUS
  218. {
  219. WMT_ERROR = 0,
  220. WMT_OPENED = 1,
  221. WMT_BUFFERING_START = 2,
  222. WMT_BUFFERING_STOP = 3,
  223. WMT_EOF = 4,
  224. WMT_END_OF_FILE = 4,
  225. WMT_END_OF_SEGMENT = 5,
  226. WMT_END_OF_STREAMING = 6,
  227. WMT_LOCATING = 7,
  228. WMT_CONNECTING = 8,
  229. WMT_NO_RIGHTS = 9,
  230. WMT_MISSING_CODEC = 10,
  231. WMT_STARTED = 11,
  232. WMT_STOPPED = 12,
  233. WMT_CLOSED = 13,
  234. WMT_STRIDING = 14,
  235. WMT_TIMER = 15,
  236. WMT_INDEX_PROGRESS = 16,
  237. WMT_SAVEAS_START = 17,
  238. WMT_SAVEAS_STOP = 18,
  239. WMT_NEW_SOURCEFLAGS = 19,
  240. WMT_NEW_METADATA = 20,
  241. WMT_BACKUPRESTORE_BEGIN = 21,
  242. WMT_SOURCE_SWITCH = 22,
  243. WMT_ACQUIRE_LICENSE = 23,
  244. WMT_INDIVIDUALIZE = 24,
  245. WMT_NEEDS_INDIVIDUALIZATION = 25,
  246. WMT_NO_RIGHTS_EX = 26,
  247. WMT_BACKUPRESTORE_END = 27,
  248. WMT_BACKUPRESTORE_CONNECTING = 28,
  249. WMT_BACKUPRESTORE_DISCONNECTING = 29,
  250. WMT_ERROR_WITHURL = 30,
  251. WMT_RESTRICTED_LICENSE = 31,
  252. WMT_CLIENT_CONNECT = 32,
  253. WMT_CLIENT_DISCONNECT = 33
  254. } WMT_STATUS;
  255. typedef enum WMT_RIGHTS
  256. {
  257. WMT_RIGHT_PLAYBACK = 0x00000001,
  258. WMT_RIGHT_COPY_TO_NON_SDMI_DEVICE = 0x00000002,
  259. WMT_RIGHT_COPY_TO_CD = 0x00000008,
  260. WMT_RIGHT_COPY_TO_SDMI_DEVICE = 0x00000010,
  261. WMT_RIGHT_ONE_TIME = 0x00000020,
  262. WMT_RIGHT_SDMI_TRIGGER = 0x00010000,
  263. WMT_RIGHT_SDMI_NOMORECOPIES = 0x00020000
  264. } WMT_RIGHTS;
  265. //
  266. // Stream selection statuses (stati?).
  267. //
  268. typedef enum WMT_STREAM_SELECTION
  269. {
  270. WMT_OFF = 0,
  271. WMT_CLEANPOINT_ONLY = 1,
  272. WMT_ON = 2,
  273. } WMT_STREAM_SELECTION;
  274. //
  275. // Attribute datatypes.
  276. //
  277. typedef enum WMT_ATTR_DATATYPE
  278. {
  279. WMT_TYPE_DWORD = 0,
  280. WMT_TYPE_STRING = 1,
  281. WMT_TYPE_BINARY = 2,
  282. WMT_TYPE_BOOL = 3,
  283. WMT_TYPE_QWORD = 4,
  284. WMT_TYPE_WORD = 5,
  285. WMT_TYPE_GUID = 6,
  286. } WMT_ATTR_DATATYPE;
  287. //
  288. // Types of images that can be stored in the header of a Windows Media File.
  289. //
  290. typedef enum WMT_ATTR_IMAGETYPE
  291. {
  292. WMT_IMAGETYPE_BITMAP = 1,
  293. WMT_IMAGETYPE_JPEG = 2,
  294. WMT_IMAGETYPE_GIF = 3,
  295. } WMT_ATTR_IMAGETYPE;
  296. //
  297. // Windows Media versions.
  298. //
  299. typedef enum WMT_VERSION
  300. {
  301. WMT_VER_4_0 = 0x00040000,
  302. WMT_VER_7_0 = 0x00070000,
  303. } WMT_VERSION;
  304. //
  305. // Protocols that the network sink supports.
  306. //
  307. typedef enum WMT_NET_PROTOCOL
  308. {
  309. WMT_PROTOCOL_HTTP = 0,
  310. } WMT_NET_PROTOCOL;
  311. //
  312. // The reader supports a number of different types of playback, each with
  313. // slightly different characteristics.
  314. //
  315. typedef enum WMT_PLAY_MODE
  316. {
  317. WMT_PLAY_MODE_AUTOSELECT = 0,
  318. WMT_PLAY_MODE_LOCAL = 1,
  319. WMT_PLAY_MODE_DOWNLOAD = 2,
  320. WMT_PLAY_MODE_STREAMING = 3,
  321. } WMT_PLAY_MODE;
  322. //
  323. // Network Proxy settings for the reader
  324. //
  325. typedef enum WMT_PROXY_SETTINGS
  326. {
  327. WMT_PROXY_SETTING_NONE = 0,
  328. WMT_PROXY_SETTING_MANUAL = 1,
  329. WMT_PROXY_SETTING_AUTO = 2,
  330. WMT_PROXY_SETTING_BROWSER = 3, // Only valid for HTTP
  331. } WMT_PROXY_SETTINGS;
  332. typedef enum WMT_CODEC_INFO_TYPE
  333. {
  334. WMT_CODECINFO_AUDIO = 0, // codec info is a word = wFormatTag
  335. WMT_CODECINFO_VIDEO = 1, // codec info is a dword = biCompression
  336. WMT_CODECINFO_UNKNOWN = 0xFFFFFFFF, // codec info is undefined
  337. } WMT_CODEC_INFO_TYPE;
  338. //
  339. // These values can be passed in when setting the DeinterlaceMode
  340. // setting on the writer
  341. //
  342. enum
  343. {
  344. WM_DM_NOTINTERLACED = 0,
  345. WM_DM_DEINTERLACE_NORMAL = 1,
  346. WM_DM_DEINTERLACE_HALFSIZE = 2,
  347. WM_DM_DEINTERLACE_HALFSIZEDOUBLERATE = 3,
  348. WM_DM_DEINTERLACE_INVERSETELECINE = 4,
  349. WM_DM_DEINTERLACE_VERTICALHALFSIZEDOUBLERATE = 5,
  350. };
  351. //
  352. // Frame level access data structures - not supported in this version
  353. //
  354. typedef enum tagWMT_OFFSET_FORMAT
  355. {
  356. WMT_OFFSET_FORMAT_100NS,
  357. WMT_OFFSET_FORMAT_SMPTE,
  358. WMT_OFFSET_FORMAT_FRAME_NUMBERS,
  359. WMT_OFFSET_FORMAT_PLAYLIST_OFFSET
  360. } WMT_OFFSET_FORMAT;
  361. ///////////////////////////////////////////////////////////////////////////////
  362. //
  363. // Structures used by the SDK.
  364. //
  365. ///////////////////////////////////////////////////////////////////////////////
  366. //
  367. // Writer Statistics struct
  368. //
  369. typedef struct _WMWriterStatistics
  370. {
  371. QWORD qwSampleCount;
  372. QWORD qwByteCount;
  373. QWORD qwDroppedSampleCount;
  374. QWORD qwDroppedByteCount;
  375. DWORD dwCurrentBitrate;
  376. DWORD dwAverageBitrate;
  377. DWORD dwExpectedBitrate;
  378. //
  379. // Sample rates are given as 1000 * (samples / second).
  380. //
  381. DWORD dwCurrentSampleRate;
  382. DWORD dwAverageSampleRate;
  383. DWORD dwExpectedSampleRate;
  384. } WM_WRITER_STATISTICS;
  385. //
  386. // Reader Statistics struct
  387. //
  388. typedef struct _WMReaderStatistics
  389. {
  390. DWORD cbSize;
  391. DWORD dwBandwidth;
  392. DWORD cPacketsReceived;
  393. DWORD cPacketsRecovered;
  394. DWORD cPacketsLost;
  395. WORD wQuality;
  396. } WM_READER_STATISTICS;
  397. //
  398. // Reader Client Info struct
  399. //
  400. typedef struct _WMReaderClientInfo
  401. {
  402. DWORD cbSize;
  403. WCHAR *wszLang; // 2-3 letter language code
  404. WCHAR *wszBrowserUserAgent; // Embedded browser's user-agent string
  405. WCHAR *wszBrowserWebPage; // The web page that contains the plugin
  406. QWORD qwReserved; // Reserved
  407. LPARAM *pReserved; // Reserved
  408. WCHAR *wszHostExe; // iexplore.exe, netscape.exe dshow.exe, etc
  409. QWORD qwHostVersion; // Version of the host application e.g.:4.70.12.15
  410. } WM_READER_CLIENTINFO;
  411. typedef struct _WMClientProperties
  412. {
  413. DWORD dwIPAddress;
  414. DWORD dwPort;
  415. } WM_CLIENT_PROPERTIES;
  416. //
  417. // Inclusive port number range.
  418. // Used by IWMReaderNetworkConfig.
  419. //
  420. typedef struct _WMPortNumberRange
  421. {
  422. WORD wPortBegin;
  423. WORD wPortEnd;
  424. } WM_PORT_NUMBER_RANGE;
  425. ///////////////////////////////////////////////////////////////////////////////
  426. //
  427. // Structure needed for using GetDRMProperty.
  428. //
  429. ///////////////////////////////////////////////////////////////////////////////
  430. typedef struct _WM_LICENSE_STATE_DATA
  431. {
  432. DWORD dwSize; // Size of the entire structure.
  433. DWORD dwNumStates; // Number of state data passed back in array of structure below
  434. DRM_LICENSE_STATE_DATA stateData[1];
  435. } WM_LICENSE_STATE_DATA;
  436. ///////////////////////////////////////////////////////////////////////////////
  437. //
  438. // Media-type structures and GUIDs.
  439. //
  440. ///////////////////////////////////////////////////////////////////////////////
  441. //
  442. // We use DirectShow media types in this SDK. However, to avoid conflict with
  443. // their names, we define our own version of the structure. This is exactly
  444. // the same as an AM_MEDIA_TYPE!
  445. //
  446. typedef struct _WMMediaType
  447. {
  448. GUID majortype;
  449. GUID subtype;
  450. BOOL bFixedSizeSamples;
  451. BOOL bTemporalCompression;
  452. ULONG lSampleSize;
  453. GUID formattype;
  454. IUnknown *pUnk;
  455. ULONG cbFormat;
  456. [size_is(cbFormat)] BYTE *pbFormat;
  457. } WM_MEDIA_TYPE;
  458. cpp_quote( "typedef struct tagWMVIDEOINFOHEADER" )
  459. cpp_quote( "{" )
  460. cpp_quote( " //" )
  461. cpp_quote( " // The bit we really want to use." )
  462. cpp_quote( " //" )
  463. cpp_quote( " RECT rcSource;" )
  464. cpp_quote( "" )
  465. cpp_quote( " //" )
  466. cpp_quote( " // Where the video should go." )
  467. cpp_quote( " //" )
  468. cpp_quote( " RECT rcTarget;" )
  469. cpp_quote( "" )
  470. cpp_quote( " //" )
  471. cpp_quote( " // Approximate bit data rate." )
  472. cpp_quote( " //" )
  473. cpp_quote( " DWORD dwBitRate;" )
  474. cpp_quote( "" )
  475. cpp_quote( " //" )
  476. cpp_quote( " // Bit error rate for this stream." )
  477. cpp_quote( " //" )
  478. cpp_quote( " DWORD dwBitErrorRate;" )
  479. cpp_quote( "" )
  480. cpp_quote( " //" )
  481. cpp_quote( " // Average time per frame (100ns units)." )
  482. cpp_quote( " //" )
  483. cpp_quote( " LONGLONG AvgTimePerFrame;" )
  484. cpp_quote( "" )
  485. cpp_quote( " BITMAPINFOHEADER bmiHeader;" )
  486. cpp_quote( "} WMVIDEOINFOHEADER;" )
  487. cpp_quote( "typedef struct tagWMSCRIPTFORMAT" )
  488. cpp_quote( "{" )
  489. cpp_quote( " GUID scriptType; ")
  490. cpp_quote( "} WMSCRIPTFORMAT;" )
  491. //
  492. // This special GUID is used to create a subtype from an audio format tag, or
  493. // video four-character code. Just fill in the first DWORD of the GUID with
  494. // the appropriate value.
  495. //
  496. cpp_quote( "// 00000000-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_Base " )
  497. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_Base, " )
  498. cpp_quote( "0x00000000, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  499. cpp_quote( "// 73646976-0000-0010-8000-00AA00389B71 'vids' == WMMEDIATYPE_Video " )
  500. cpp_quote( "EXTERN_GUID(WMMEDIATYPE_Video, " )
  501. cpp_quote( "0x73646976, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  502. cpp_quote( "// e436eb78-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB1 " )
  503. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB1, " )
  504. cpp_quote( "0xe436eb78, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  505. cpp_quote( "// e436eb79-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB4 " )
  506. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB4, " )
  507. cpp_quote( "0xe436eb79, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  508. cpp_quote( "// e436eb7a-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB8 " )
  509. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB8, " )
  510. cpp_quote( "0xe436eb7a, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  511. cpp_quote( "// e436eb7b-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB565 " )
  512. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB565, " )
  513. cpp_quote( "0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  514. cpp_quote( "// e436eb7c-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB555 " )
  515. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB555, " )
  516. cpp_quote( "0xe436eb7c, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  517. cpp_quote( "// e436eb7d-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB24 " )
  518. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB24, " )
  519. cpp_quote( "0xe436eb7d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  520. cpp_quote( "// e436eb7e-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB32 " )
  521. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_RGB32, " )
  522. cpp_quote( "0xe436eb7e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); " )
  523. cpp_quote( "// 30323449-0000-0010-8000-00AA00389B71 'YV12' == MEDIASUBTYPE_I420 " )
  524. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_I420, " )
  525. cpp_quote( "0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  526. cpp_quote( "// 56555949-0000-0010-8000-00AA00389B71 'YV12' == MEDIASUBTYPE_IYUV " )
  527. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_IYUV, " )
  528. cpp_quote( "0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  529. cpp_quote( "// 31313259-0000-0010-8000-00AA00389B71 'YV12' == MEDIASUBTYPE_YV12 " )
  530. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_YV12, " )
  531. cpp_quote( "0x32315659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  532. cpp_quote( "// 32595559-0000-0010-8000-00AA00389B71 'YUY2' == MEDIASUBTYPE_YUY2 " )
  533. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_YUY2, " )
  534. cpp_quote( "0x32595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  535. cpp_quote( "// 59565955-0000-0010-8000-00AA00389B71 'UYVY' == MEDIASUBTYPE_UYVY " )
  536. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_UYVY, " )
  537. cpp_quote( "0x59565955, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  538. cpp_quote( "// 55595659-0000-0010-8000-00AA00389B71 'YVYU' == MEDIASUBTYPE_YVYU " )
  539. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_YVYU, " )
  540. cpp_quote( "0x55595659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  541. cpp_quote( "// 39555659-0000-0010-8000-00AA00389B71 'YVU9' == MEDIASUBTYPE_YVU9 " )
  542. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_YVU9, " )
  543. cpp_quote( "0x39555659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  544. cpp_quote( "// 3334504D-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_MP43 " )
  545. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_MP43, " )
  546. cpp_quote( "0x3334504D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  547. cpp_quote( "// 5334504D-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_MP4S " )
  548. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_MP4S, " )
  549. cpp_quote( "0x5334504D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  550. cpp_quote( "// 31564D57-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_WMV1 " )
  551. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_WMV1, " )
  552. cpp_quote( "0x31564D57, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  553. cpp_quote( "// 32564D57-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_WMV2 " )
  554. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_WMV2, " )
  555. cpp_quote( "0x32564D57, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  556. cpp_quote( "// 3153534D-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_MSS1 " )
  557. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_MSS1, " )
  558. cpp_quote( "0x3153534D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  559. cpp_quote( "// 73647561-0000-0010-8000-00AA00389B71 'auds' == WMMEDIATYPE_Audio " )
  560. cpp_quote( "EXTERN_GUID(WMMEDIATYPE_Audio, " )
  561. cpp_quote( "0x73647561, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  562. cpp_quote( "// 00000001-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_PCM " )
  563. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_PCM, " )
  564. cpp_quote( "0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  565. cpp_quote( "// 00000009-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_DRM " )
  566. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_DRM, " )
  567. cpp_quote( "0x00000009, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  568. //
  569. // WM Audio v2 and v7 are actually compatible bitstreams.
  570. //
  571. cpp_quote( "// 00000161-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_WMAudioV7 " )
  572. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV7, " )
  573. cpp_quote( "0x00000161, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  574. cpp_quote( "// 00000161-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_WMAudioV2 " )
  575. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_WMAudioV2, " )
  576. cpp_quote( "0x00000161, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  577. cpp_quote( "// 00000130-0000-0010-8000-00AA00389B71 WMMEDIASUBTYPE_ACELPnet " )
  578. cpp_quote( "EXTERN_GUID(WMMEDIASUBTYPE_ACELPnet, " )
  579. cpp_quote( "0x00000130, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71); " )
  580. cpp_quote( "// 73636d64-0000-0010-8000-00AA00389B71 'scmd' == MEDIATYPE_Script " )
  581. cpp_quote( "EXTERN_GUID(WMMEDIATYPE_Script, " )
  582. cpp_quote( "0x73636d64, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); " )
  583. cpp_quote( "// 34A50FD8-8AA5-4386-81FE-A0EFE0488E31 WMMEDIATYPE_Image " )
  584. cpp_quote( "EXTERN_GUID(WMMEDIATYPE_Image, " )
  585. cpp_quote( "0x34a50fd8, 0x8aa5, 0x4386, 0x81, 0xfe, 0xa0, 0xef, 0xe0, 0x48, 0x8e, 0x31); " )
  586. cpp_quote( "// 05589f80-c356-11ce-bf01-00aa0055595a WMFORMAT_VideoInfo " )
  587. cpp_quote( "EXTERN_GUID(WMFORMAT_VideoInfo, " )
  588. cpp_quote( "0x05589f80, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a); " )
  589. cpp_quote( "// 05589f81-c356-11ce-bf01-00aa0055595a WMFORMAT_WaveFormatEx " )
  590. cpp_quote( "EXTERN_GUID(WMFORMAT_WaveFormatEx, " )
  591. cpp_quote( "0x05589f81, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a); " )
  592. cpp_quote( "// 5C8510F2-DEBE-4ca7-BBA5-F07A104F8DFF WMFORMAT_Script " )
  593. cpp_quote( "EXTERN_GUID(WMFORMAT_Script, " )
  594. cpp_quote( "0x5c8510f2, 0xdebe, 0x4ca7, 0xbb, 0xa5, 0xf0, 0x7a, 0x10, 0x4f, 0x8d, 0xff); " )
  595. cpp_quote( "// 82f38a70-c29f-11d1-97ad-00a0c95ea850 WMSCRIPTTYPE_TwoStrings " )
  596. cpp_quote( "EXTERN_GUID( WMSCRIPTTYPE_TwoStrings, " )
  597. cpp_quote( "0x82f38a70,0xc29f,0x11d1,0x97,0xad,0x00,0xa0,0xc9,0x5e,0xa8,0x50); " )
  598. ///////////////////////////////////////////////////////////////////////////////
  599. //
  600. // IID GUIDs defined here.
  601. //
  602. ///////////////////////////////////////////////////////////////////////////////
  603. cpp_quote( "EXTERN_GUID( IID_IWMMediaProps, 0x96406bce,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  604. cpp_quote( "EXTERN_GUID( IID_IWMVideoMediaProps, 0x96406bcf,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  605. cpp_quote( "EXTERN_GUID( IID_IWMWriter, 0x96406bd4,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  606. cpp_quote( "EXTERN_GUID( IID_IWMInputMediaProps, 0x96406bd5,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  607. cpp_quote( "EXTERN_GUID( IID_IWMReader, 0x96406bd6,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  608. cpp_quote( "EXTERN_GUID( IID_IWMOutputMediaProps, 0x96406bd7,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  609. cpp_quote( "EXTERN_GUID( IID_IWMStatusCallback, 0x6d7cdc70,0x9888,0x11d3,0x8e,0xdc,0x00,0xc0,0x4f,0x61,0x09,0xcf );" )
  610. cpp_quote( "EXTERN_GUID( IID_IWMReaderCallback, 0x96406bd8,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  611. cpp_quote( "EXTERN_GUID( IID_IWMCredentialCallback, 0x342e0eb7,0xe651,0x450c,0x97,0x5b,0x2a,0xce,0x2c,0x90,0xc4,0x8e );" )
  612. cpp_quote( "EXTERN_GUID( IID_IWMMetadataEditor, 0x96406bd9,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  613. cpp_quote( "EXTERN_GUID( IID_IWMMetadataEditor2, 0x203cffe3,0x2e18,0x4fdf,0xb5,0x9d,0x6e,0x71,0x53,0x05,0x34,0xcf );" )
  614. cpp_quote( "EXTERN_GUID( IID_IWMHeaderInfo, 0x96406bda,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  615. cpp_quote( "EXTERN_GUID( IID_IWMHeaderInfo2, 0x15cf9781,0x454e,0x482e,0xb3,0x93,0x85,0xfa,0xe4,0x87,0xa8,0x10 );" )
  616. cpp_quote( "EXTERN_GUID( IID_IWMProfileManager, 0xd16679f2,0x6ca0,0x472d,0x8d,0x31,0x2f,0x5d,0x55,0xae,0xe1,0x55 );" )
  617. cpp_quote( "EXTERN_GUID( IID_IWMProfileManager2, 0x7a924e51,0x73c1,0x494d,0x80,0x19,0x23,0xd3,0x7e,0xd9,0xb8,0x9a );" )
  618. cpp_quote( "EXTERN_GUID( IID_IWMProfile, 0x96406bdb,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  619. cpp_quote( "EXTERN_GUID( IID_IWMProfile2, 0x07e72d33,0xd94e,0x4be7,0x88,0x43,0x60,0xae,0x5f,0xf7,0xe5,0xf5 );" )
  620. cpp_quote( "EXTERN_GUID( IID_IWMStreamConfig, 0x96406bdc,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  621. cpp_quote( "EXTERN_GUID( IID_IWMStreamList, 0x96406bdd,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  622. cpp_quote( "EXTERN_GUID( IID_IWMMutualExclusion, 0x96406bde,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  623. cpp_quote( "EXTERN_GUID( IID_IWMWriterAdvanced, 0x96406be3,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  624. cpp_quote( "EXTERN_GUID( IID_IWMWriterAdvanced2, 0x962dc1ec,0xc046,0x4db8,0x9c,0xc7,0x26,0xce,0xae,0x50,0x08,0x17 );" )
  625. cpp_quote( "EXTERN_GUID( IID_IWMWriterSink, 0x96406be4,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  626. cpp_quote( "EXTERN_GUID( IID_IWMWriterFileSink, 0x96406be5,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  627. cpp_quote( "EXTERN_GUID( IID_IWMWriterFileSink2, 0x14282ba7,0x4aef,0x4205,0x8c,0xe5,0xc2,0x29,0x03,0x5a,0x05,0xbc );" )
  628. cpp_quote( "EXTERN_GUID( IID_IWMWriterNetworkSink, 0x96406be7,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  629. cpp_quote( "EXTERN_GUID( IID_IWMClientConnections, 0x73c66010,0xa299,0x41df,0xb1,0xf0,0xcc,0xf0,0x3b,0x09,0xc1,0xc6 );" )
  630. cpp_quote( "EXTERN_GUID( IID_IWMReaderAdvanced, 0x96406bea,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  631. cpp_quote( "EXTERN_GUID( IID_IWMReaderAdvanced2, 0xae14a945,0xb90c,0x4d0d,0x91,0x27,0x80,0xd6,0x65,0xf7,0xd7,0x3e );" )
  632. cpp_quote( "EXTERN_GUID( IID_IWMReaderAdvanced3, 0x5dc0674b,0xf04b,0x4a4e,0x9f,0x2a,0xb1,0xaf,0xde,0x2c,0x81,0x00 );" )
  633. cpp_quote( "EXTERN_GUID( IID_IWMDRMReader, 0xd2827540,0x3ee7,0x432c,0xb1,0x4c,0xdc,0x17,0xf0,0x85,0xd3,0xb3 );" )
  634. cpp_quote( "EXTERN_GUID( IID_IWMReaderCallbackAdvanced, 0x96406beb,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  635. cpp_quote( "EXTERN_GUID( IID_IWMReaderNetworkConfig,0x96406bec,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  636. cpp_quote( "EXTERN_GUID( IID_IWMReaderStreamClock, 0x96406bed,0x2b2b,0x11d3,0xb3,0x6b,0x00,0xc0,0x4f,0x61,0x08,0xff );" )
  637. cpp_quote( "EXTERN_GUID( IID_IWMIndexer, 0x6d7cdc71,0x9888,0x11d3,0x8e,0xdc,0x00,0xc0,0x4f,0x61,0x09,0xcf );" )
  638. cpp_quote( "EXTERN_GUID( IID_IWMReaderAllocatorEx, 0x9f762fa7,0xa22e,0x428d,0x93,0xc9,0xac,0x82,0xf3,0xaa,0xfe,0x5a );" )
  639. cpp_quote( "EXTERN_GUID( IID_IWMReaderTypeNegotiation, 0xfdbe5592,0x81a1,0x41ea,0x93,0xbd,0x73,0x5c,0xad,0x1a,0xdc,0x5 );" )
  640. cpp_quote( "EXTERN_GUID( IID_IWMLicenseBackup, 0x05E5AC9F,0x3FB6,0x4508,0xBB,0x43,0xA4,0x06,0x7B,0xA1,0xEB,0xE8);")
  641. cpp_quote( "EXTERN_GUID( IID_IWMLicenseRestore, 0xC70B6334,0xa22e,0x4efb,0xA2,0x45,0x15,0xE6,0x5A,0x00,0x4A,0x13);")
  642. cpp_quote( "EXTERN_GUID( IID_IWMBackupRestoreProps, 0x3C8E0DA6,0x996F,0x4ff3,0xA1,0xAF,0x48,0x38,0xF9,0x37,0x7e,0x2e);")
  643. cpp_quote( "EXTERN_GUID( IID_IWMPacketSize, 0xcdfb97ab,0x188f,0x40b3,0xb6,0x43,0x5b,0x79,0x03,0x97,0x5c,0x59);")
  644. cpp_quote( "EXTERN_GUID( IID_IWMRegisterCallback, 0xcf4b1f99,0x4de2,0x4e49,0xa3,0x63,0x25,0x27,0x40,0xd9,0x9b,0xc1);")
  645. cpp_quote( "EXTERN_GUID( IID_IWMWriterPostView, 0x81e20ce4,0x75ef,0x491a,0x80,0x04,0xfc,0x53,0xc4,0x5b,0xdc,0x3e);")
  646. cpp_quote( "EXTERN_GUID( IID_IWMWriterPostViewCallback, 0xd9d6549d,0xa193,0x4f24,0xb3,0x08,0x03,0x12,0x3d,0x9b,0x7f,0x8d);")
  647. cpp_quote( "EXTERN_GUID( IID_IWMCodecInfo, 0xa970f41e,0x34de,0x4a98,0xb3,0xba,0xe4,0xb3,0xca,0x75,0x28,0xf0);")
  648. cpp_quote( "EXTERN_GUID( IID_IWMCodecInfo2, 0xaa65e273,0xb686,0x4056,0x91,0xec,0xdd,0x76,0x8d,0x4d,0xf7,0x10);")
  649. cpp_quote( "EXTERN_GUID( IID_IWMPropertyVault, 0x72995A79,0x5090,0x42a4,0x9C,0x8C,0xD9,0xD0,0xB6,0xD3,0x4B,0xE5 );" )
  650. ///////////////////////////////////////////////////////////////////////////////
  651. //
  652. // Other GUIDs defined here
  653. //
  654. ///////////////////////////////////////////////////////////////////////////////
  655. cpp_quote( "EXTERN_GUID( CLSID_WMMUTEX_Bitrate, 0xD6E22A01,0x35DA,0x11D1,0x90,0x34,0x00,0xA0,0xC9,0x03,0x49,0xBE );" )
  656. ///////////////////////////////////////////////////////////////////////////////
  657. //
  658. // Max Video Streams / Bands
  659. //
  660. ///////////////////////////////////////////////////////////////////////////////
  661. cpp_quote( "#define WM_MAX_VIDEO_STREAMS 0x00c" )
  662. ///////////////////////////////////////////////////////////////////////////////
  663. //
  664. // Creation functions.
  665. //
  666. // The SDK supports 3 major objects:
  667. // - CLSID_WMWriter - For writing out WM content.
  668. // - CLSID_WMReader - For playing back WM content.
  669. // - CLSID_WMMetadataEditor - For getting and editing header metadata in WM
  670. // content.
  671. //
  672. ///////////////////////////////////////////////////////////////////////////////
  673. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateCertificate( IUnknown** pUnkCert );" )
  674. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateWriter( IUnknown* pUnkCert, IWMWriter **ppWriter );" )
  675. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateReader( IUnknown* pUnkCert, DWORD dwRights, IWMReader **ppReader );" )
  676. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateEditor( IWMMetadataEditor **ppEditor );" )
  677. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateIndexer( IWMIndexer **ppIndexer );" )
  678. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateBackupRestorer( IUnknown *pCallback, IWMLicenseBackup **ppBackup );" )
  679. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateProfileManager( IWMProfileManager **ppProfileManager );" )
  680. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateWriterFileSink( IWMWriterFileSink **ppSink );" )
  681. cpp_quote( "HRESULT STDMETHODCALLTYPE WMCreateWriterNetworkSink( IWMWriterNetworkSink **ppSink );" )
  682. ///////////////////////////////////////////////////////////////////////////////
  683. //
  684. // The following interfaces define the media types that this SDK supports.
  685. // These media types are used by the writer, the reader, and the profile
  686. // object, to identify the media-type specific properties of a media stream.
  687. //
  688. // The main media type is stored in the WM_MEDIA_TYPE structure. Some
  689. // interesting (option) parameters may exist for particular stream types;
  690. // in that case, an IWM<x>MediaProps interface can be used to get and set
  691. // these additional parameters.
  692. //
  693. ///////////////////////////////////////////////////////////////////////////////
  694. [
  695. object,
  696. uuid( 96406BCE-2B2B-11d3-B36B-00C04F6108FF ),
  697. helpstring( "IWMMediaProps Interface"),
  698. pointer_default(unique),
  699. local
  700. ]
  701. interface IWMMediaProps : IUnknown
  702. {
  703. //
  704. // GetType is provided for convenience; it returns the same as the
  705. // majortype of the WM_MEDIA_TYPE.
  706. //
  707. HRESULT GetType( [out] GUID *pguidType );
  708. HRESULT GetMediaType( [out] WM_MEDIA_TYPE *pType,
  709. [in, out] DWORD *pcbType );
  710. HRESULT SetMediaType( [in] WM_MEDIA_TYPE *pType );
  711. };
  712. ///////////////////////////////////////////////////////////////////////////////
  713. [
  714. object,
  715. uuid( 96406BCF-2B2B-11d3-B36B-00C04F6108FF ),
  716. helpstring( "IWMVideoMediaProps Interface"),
  717. pointer_default(unique),
  718. local
  719. ]
  720. interface IWMVideoMediaProps : IWMMediaProps
  721. {
  722. HRESULT GetMaxKeyFrameSpacing( [out] LONGLONG *pllTime );
  723. HRESULT SetMaxKeyFrameSpacing( [in] LONGLONG llTime );
  724. HRESULT GetQuality( [out] DWORD *pdwQuality );
  725. HRESULT SetQuality( [in] DWORD dwQuality );
  726. };
  727. ///////////////////////////////////////////////////////////////////////////////
  728. //
  729. // The CLSID_WMWriter basic interfaces.
  730. //
  731. // Usage scenario is as follows:
  732. // 1) SetProfile to define the configuration.
  733. // 2) Set the outputs.
  734. // 3) Call GetInputCount (which is valid after (1)), and GetInputProps for
  735. // each stream. Get the default input format, and change it if desired.
  736. // 3.5) Call SetAttribute to add metadata to the header
  737. // At this point, the writer has been configured.
  738. // 4) Call WriteSample repeatedly, until done. (Note that the AllocateSample
  739. // call is just provided for convenience. You are welcome to pass in your
  740. // own samples.)
  741. // 5) Call Flush to write out any buffered data, and update the header and
  742. // index.
  743. //
  744. ///////////////////////////////////////////////////////////////////////////////
  745. ///////////////////////////////////////////////////////////////////////////////
  746. [
  747. object,
  748. uuid( 96406BD4-2B2B-11d3-B36B-00C04F6108FF ),
  749. helpstring( "IWMWriter Interface"),
  750. pointer_default(unique),
  751. local
  752. ]
  753. interface IWMWriter : IUnknown
  754. {
  755. // This interface QI's for IWMHeaderInfo, and IWMWriterAdvanced.
  756. //
  757. // There are 3 options for setting the profile on the writer. Note that
  758. // setting the profile means that the profile is copied into the writer.
  759. // Further editing of that profile object will have no effect, unless
  760. // SetProfile() is called again.
  761. //
  762. // Calling SetProfile() removes any previously set header attribute info
  763. //
  764. HRESULT SetProfileByID( [in] REFGUID guidProfile );
  765. HRESULT SetProfile( [in] IWMProfile *pProfile );
  766. //
  767. // The easiest way to use the writer is just to write to file.
  768. //
  769. HRESULT SetOutputFilename( [in] const WCHAR *pwszFilename );
  770. //
  771. // The user can enumerate through the various inputs, and get the input
  772. // format. Note that these are not ASF streams; one input stream may map
  773. // to multiple ASF streams in a MEB scenario.
  774. //
  775. // Manipulating the IWMInputMediaProps has no effect on the writer, unless
  776. // the user calls SetInputProps to configure the input.
  777. //
  778. HRESULT GetInputCount( [out] DWORD *pcInputs );
  779. HRESULT GetInputProps( [in] DWORD dwInputNum,
  780. [out] IWMInputMediaProps **ppInput );
  781. HRESULT SetInputProps( [in] DWORD dwInputNum,
  782. [in] IWMInputMediaProps *pInput );
  783. //
  784. // Used for determining all possible format types supported by this
  785. // input on the writer.
  786. //
  787. HRESULT GetInputFormatCount( [in] DWORD dwInputNumber,
  788. [out] DWORD *pcFormats );
  789. HRESULT GetInputFormat( [in] DWORD dwInputNumber,
  790. [in] DWORD dwFormatNumber,
  791. [out] IWMInputMediaProps** pProps );
  792. //
  793. // You must call BeginWriting before sending any samples, and
  794. // you must call EndWriting when you're done sending samples.
  795. //
  796. HRESULT BeginWriting();
  797. //
  798. // EndWriting flushes everything, updates indices and headers,
  799. // and closes the file.
  800. //
  801. HRESULT EndWriting();
  802. //
  803. // Allocate a sample. This is optional; the user is welcome to allocate
  804. // their own buffer class.
  805. //
  806. HRESULT AllocateSample( [in] DWORD dwSampleSize,
  807. [out] INSSBuffer **ppSample );
  808. HRESULT WriteSample( [in] DWORD dwInputNum,
  809. [in] QWORD cnsSampleTime,
  810. [in] DWORD dwFlags,
  811. [in] INSSBuffer *pSample );
  812. //
  813. // Flush() will flush the writer, but leaves the writer prepared to run
  814. // again, when WriteSample() is called again.
  815. // Flush() also causes an updated header to be sent to the sink.
  816. //
  817. HRESULT Flush();
  818. };
  819. ///////////////////////////////////////////////////////////////////////////////
  820. [
  821. object,
  822. uuid( 96406BD5-2B2B-11d3-B36B-00C04F6108FF ),
  823. helpstring( "IWMInputMediaProps Interface"),
  824. pointer_default(unique),
  825. local
  826. ]
  827. interface IWMInputMediaProps : IWMMediaProps
  828. {
  829. HRESULT GetConnectionName( [out] WCHAR *pwszName,
  830. [in, out] WORD *pcchName );
  831. HRESULT GetGroupName( [out] WCHAR *pwszName,
  832. [in, out] WORD *pcchName );
  833. };
  834. ///////////////////////////////////////////////////////////////////////////////
  835. [
  836. object,
  837. uuid( 72995A79-5090-42a4-9C8C-D9D0B6D34BE5 ),
  838. helpstring( "IWMPropertyVault Interface"),
  839. pointer_default(unique),
  840. local
  841. ]
  842. interface IWMPropertyVault : IUnknown
  843. {
  844. HRESULT GetPropertyCount(
  845. [in] DWORD *pdwCount );
  846. HRESULT GetPropertyByName(
  847. [in] LPCWSTR pszName,
  848. [out] WMT_ATTR_DATATYPE *pType,
  849. [out] BYTE *pValue,
  850. [in,out] DWORD *pdwSize );
  851. HRESULT SetProperty(
  852. [in] LPCWSTR pszName,
  853. [in] WMT_ATTR_DATATYPE pType,
  854. [in] BYTE *pValue,
  855. [in] DWORD dwSize );
  856. HRESULT GetPropertyByIndex(
  857. [in] DWORD dwIndex,
  858. [out] LPWSTR pszName,
  859. [in, out] DWORD *pdwNameLen,
  860. [out] WMT_ATTR_DATATYPE *pType,
  861. [out] BYTE *pValue,
  862. [in,out] DWORD *pdwSize );
  863. HRESULT CopyPropertiesFrom(
  864. [in] IWMPropertyVault *pIWMPropertyVault );
  865. HRESULT Clear();
  866. };
  867. ///////////////////////////////////////////////////////////////////////////////
  868. //
  869. // The CLSID_WMReader basic interfaces.
  870. //
  871. // Usage is as follows:
  872. // 1) Call Open with a URL (possibly a local filename) and a user-supplied
  873. // callback. After open has completed, the file has been opened and parsed.
  874. // 2) Call GetOutputCount, and GetOutputProps for each output. This
  875. // is valid after (1). This allows the user to get the output format for
  876. // each output.
  877. // 3) Call Start. Status messages and samples will begin arriving in the
  878. // callback function.
  879. // 4) Continue with any combination of Start/Stop/Pause/Seek/SetRate, until
  880. // finished.
  881. //
  882. ///////////////////////////////////////////////////////////////////////////////
  883. ///////////////////////////////////////////////////////////////////////////////
  884. [
  885. object,
  886. uuid( 96406BD6-2B2B-11d3-B36B-00C04F6108FF ),
  887. helpstring( "IWMReader Interface"),
  888. pointer_default(unique),
  889. local
  890. ]
  891. interface IWMReader : IUnknown
  892. {
  893. //
  894. // This interface QI's for IWMHeaderInfo, IWMProfile, IWMReaderAdvanced,
  895. // IWMReaderAdvanced2, and IWMReaderAdvanced3.
  896. //
  897. //
  898. // Open is an asynch call; it returns almost immediately (if the URL
  899. // is valid), and the user should wait for appropriate OnStatus calls to
  900. // be sent to the callback.
  901. //
  902. HRESULT Open( [in] const WCHAR *pwszURL,
  903. [in] IWMReaderCallback *pCallback,
  904. [in] void *pvContext );
  905. HRESULT Close();
  906. //
  907. // The user can enumerate through the various outputs, and get the
  908. // output format for that data.
  909. //
  910. // Manipulating the IWMOutputMediaProps has no effect on the output, unless
  911. // the user also calls SetOutputProps.
  912. //
  913. HRESULT GetOutputCount( [out] DWORD *pcOutputs );
  914. HRESULT GetOutputProps( [in] DWORD dwOutputNum,
  915. [out] IWMOutputMediaProps **ppOutput );
  916. HRESULT SetOutputProps( [in] DWORD dwOutputNum,
  917. [in] IWMOutputMediaProps *pOutput );
  918. //
  919. // Used for determining all possible format types supported by this
  920. // output on the reader.
  921. //
  922. HRESULT GetOutputFormatCount( [in] DWORD dwOutputNumber,
  923. [out] DWORD *pcFormats );
  924. HRESULT GetOutputFormat( [in] DWORD dwOutputNumber,
  925. [in] DWORD dwFormatNumber,
  926. [out] IWMOutputMediaProps** ppProps );
  927. //
  928. // If duration is 0, play to the end of the file.
  929. // If msStart is set to WM_START_CURRENTPOSITION then don't perform a seek
  930. // operation. A good use for this is when you want to change the rate but
  931. // not the current file position.
  932. //
  933. // Note that any call to start while Paused will be treated as a seek.
  934. // Even calls to Start( WM_START_CURRENTPOSITION, ... ). If your intention
  935. // is to seek (which will incur the buffering penalty from network files)
  936. // then you can go ahead and call Start. However, if your intention was
  937. // to continue playing from where the user paused, you should call Resume
  938. // instead.
  939. //
  940. HRESULT Start( [in] QWORD cnsStart,
  941. [in] QWORD cnsDuration,
  942. [in] float fRate,
  943. [in] void *pvContext );
  944. HRESULT Stop();
  945. HRESULT Pause();
  946. HRESULT Resume();
  947. };
  948. ///////////////////////////////////////////////////////////////////////////////
  949. [
  950. object,
  951. uuid( 96406BD7-2B2B-11d3-B36B-00C04F6108FF ),
  952. helpstring( "IWMOutputMediaProps Interface"),
  953. pointer_default(unique),
  954. local
  955. ]
  956. interface IWMOutputMediaProps : IWMMediaProps
  957. {
  958. //
  959. // A Stream Group and type together uniquely identify each output. (The
  960. // type is on IWMMediaProps).
  961. //
  962. HRESULT GetStreamGroupName( [out] WCHAR *pwszName,
  963. [in, out] WORD *pcchName );
  964. HRESULT GetConnectionName( [out] WCHAR *pwszName,
  965. [in, out] WORD *pcchName );
  966. };
  967. ///////////////////////////////////////////////////////////////////////////////
  968. [
  969. object,
  970. uuid( 6d7cdc70-9888-11d3-8edc-00c04f6109cf ),
  971. helpstring( "IWMStatusCallback Interface"),
  972. pointer_default(unique),
  973. local
  974. ]
  975. interface IWMStatusCallback : IUnknown
  976. {
  977. //
  978. // The contents of pValue depends on the Status.
  979. //
  980. HRESULT OnStatus( [in] WMT_STATUS Status,
  981. [in] HRESULT hr,
  982. [in] WMT_ATTR_DATATYPE dwType,
  983. [in] BYTE *pValue,
  984. [in] void *pvContext );
  985. };
  986. ///////////////////////////////////////////////////////////////////////////////
  987. [
  988. object,
  989. uuid( 96406BD8-2B2B-11d3-B36B-00C04F6108FF ),
  990. helpstring( "IWMReaderCallback Interface"),
  991. pointer_default(unique),
  992. local
  993. ]
  994. interface IWMReaderCallback : IWMStatusCallback
  995. {
  996. //
  997. // cnsSampleDuration will be 0 for most media types.
  998. //
  999. HRESULT OnSample( [in] DWORD dwOutputNum,
  1000. [in] QWORD cnsSampleTime,
  1001. [in] QWORD cnsSampleDuration,
  1002. [in] DWORD dwFlags,
  1003. [in] INSSBuffer *pSample,
  1004. [in] void *pvContext );
  1005. };
  1006. ///////////////////////////////////////////////////////////////////////////////
  1007. [
  1008. object,
  1009. uuid( 342e0eb7-e651-450c-975b-2ace2c90c48e ),
  1010. helpstring( "IWMCredentialCallback Interface"),
  1011. pointer_default(unique),
  1012. local
  1013. ]
  1014. interface IWMCredentialCallback : IUnknown
  1015. {
  1016. HRESULT AcquireCredentials( [in] WCHAR *pwszRealm,
  1017. [in] WCHAR *pwszSite,
  1018. [in, out, size_is( cchUser )] WCHAR *pwszUser,
  1019. [in] DWORD cchUser,
  1020. [in, out, size_is( cchPassword )] WCHAR *pwszPassword,
  1021. [in] DWORD cchPassword,
  1022. [in] HRESULT hrStatus,
  1023. [in, out] DWORD *pdwFlags );
  1024. };
  1025. ///////////////////////////////////////////////////////////////////////////////
  1026. //
  1027. // The CLSID_WMMetadataEditor basic interfaces.
  1028. //
  1029. // Usage:
  1030. // 1) Call Open with a filename.
  1031. // 2) QI for IWMHeaderInfo, and use that to get and set attributes as
  1032. // needed.
  1033. // 3) Flush() will cause any changes to be written back to disk (if possible).
  1034. // 4) Close() closes the file without writing any changes to disk.
  1035. //
  1036. ///////////////////////////////////////////////////////////////////////////////
  1037. ///////////////////////////////////////////////////////////////////////////////
  1038. [
  1039. object,
  1040. uuid( 96406BD9-2B2B-11d3-B36B-00C04F6108FF ),
  1041. helpstring( "IWMMetadataEditor Interface"),
  1042. pointer_default(unique),
  1043. local
  1044. ]
  1045. interface IWMMetadataEditor : IUnknown
  1046. {
  1047. // QI this for IWMHeaderInfo to edit the header attributes.
  1048. //
  1049. // Manage the file
  1050. //
  1051. HRESULT Open( [in] const WCHAR *pwszFilename );
  1052. HRESULT Close();
  1053. HRESULT Flush();
  1054. };
  1055. ///////////////////////////////////////////////////////////////////////////////
  1056. [
  1057. object,
  1058. uuid( 203CFFE3-2E18-4fdf-B59D-6E71530534CF ),
  1059. helpstring( "IWMMetadataEditor2 Interface" ),
  1060. pointer_default(unique),
  1061. local
  1062. ]
  1063. interface IWMMetadataEditor2 : IWMMetadataEditor
  1064. {
  1065. //
  1066. // The flags to dwDesiredAccess and dwShareMode match the flags to
  1067. // (the win32 API) CreateFile.
  1068. //
  1069. // Supported modes are:
  1070. // GENERIC_READ | GENERIC_WRITE, 0
  1071. // GENERIC_READ, 0 or
  1072. // FILE_SHARE_READ or
  1073. // FILE_SHARE_DELETE or
  1074. // FILE_SHARE_READ | FILE_SHARE_DELETE
  1075. //
  1076. HRESULT OpenEx( [in] const WCHAR *pwszFilename,
  1077. [in] DWORD dwDesiredAccess,
  1078. [in] DWORD dwShareMode );
  1079. };
  1080. ///////////////////////////////////////////////////////////////////////////////
  1081. //
  1082. // Below are utility interfaces used across all 3 of the main objects.
  1083. //
  1084. ///////////////////////////////////////////////////////////////////////////////
  1085. ///////////////////////////////////////////////////////////////////////////////
  1086. [
  1087. object,
  1088. uuid( 96406BDA-2B2B-11d3-B36B-00C04F6108FF ),
  1089. helpstring( "IWMHeaderInfo Interface"),
  1090. pointer_default(unique),
  1091. local
  1092. ]
  1093. //
  1094. // The 3 main interface (IWMWriter, IWMReader, and
  1095. // IWMMetadataEditor) can be QI'd for this interface to get and set
  1096. // header attributes, and markers.
  1097. //
  1098. interface IWMHeaderInfo : IUnknown
  1099. {
  1100. //
  1101. // For attributes, the stream number passed in means:
  1102. // -1 (0xffff) to specifies "any or no stream".
  1103. // 0 specifies "no stream".
  1104. // Any other value indicates the stream number.
  1105. //
  1106. // Windows Media version 4 and earlier does not support per stream
  1107. // attributes, so any stream number other than 0 will fail.
  1108. //
  1109. HRESULT GetAttributeCount( [in] WORD wStreamNum,
  1110. [out] WORD *pcAttributes );
  1111. HRESULT GetAttributeByIndex( [in] WORD wIndex,
  1112. [in, out] WORD *pwStreamNum,
  1113. [out] WCHAR *pwszName,
  1114. [in,out] WORD *pcchNameLen,
  1115. [out] WMT_ATTR_DATATYPE *pType,
  1116. [out] BYTE *pValue,
  1117. [in,out] WORD *pcbLength );
  1118. HRESULT GetAttributeByName( [in, out] WORD *pwStreamNum,
  1119. [in] LPCWSTR pszName,
  1120. [out] WMT_ATTR_DATATYPE *pType,
  1121. [out] BYTE *pValue,
  1122. [in,out] WORD *pcbLength );
  1123. HRESULT SetAttribute( [in] WORD wStreamNum,
  1124. [in] LPCWSTR pszName,
  1125. [in] WMT_ATTR_DATATYPE Type,
  1126. [in] const BYTE *pValue,
  1127. [in] WORD cbLength );
  1128. //
  1129. // Marker methods.
  1130. //
  1131. HRESULT GetMarkerCount( [out] WORD *pcMarkers );
  1132. HRESULT GetMarker( [in] WORD wIndex,
  1133. [out] WCHAR *pwszMarkerName,
  1134. [in, out] WORD *pcchMarkerNameLen,
  1135. [out] QWORD *pcnsMarkerTime );
  1136. HRESULT AddMarker( [in] WCHAR *pwszMarkerName,
  1137. [in] QWORD cnsMarkerTime );
  1138. HRESULT RemoveMarker( [in] WORD wIndex );
  1139. //
  1140. // Script command methods.
  1141. //
  1142. HRESULT GetScriptCount( [out] WORD *pcScripts );
  1143. HRESULT GetScript( [in] WORD wIndex,
  1144. [out] WCHAR *pwszType,
  1145. [in, out] WORD *pcchTypeLen,
  1146. [out] WCHAR *pwszCommand,
  1147. [in, out] WORD *pcchCommandLen,
  1148. [out] QWORD *pcnsScriptTime );
  1149. HRESULT AddScript( [in] WCHAR *pwszType,
  1150. [in] WCHAR *pwszCommand,
  1151. [in] QWORD cnsScriptTime );
  1152. HRESULT RemoveScript( [in] WORD wIndex );
  1153. };
  1154. ///////////////////////////////////////////////////////////////////////////////
  1155. [
  1156. object,
  1157. uuid( 15CF9781-454E-482e-B393-85FAE487A810 ),
  1158. helpstring( "IWMHeaderInfo Interface"),
  1159. pointer_default(unique),
  1160. local
  1161. ]
  1162. //
  1163. // The 3 main interface (IWMWriter, IWMReader, and
  1164. // IWMMetadataEditor) can be QI'd for this interface to get and set
  1165. // header attributes, and markers.
  1166. //
  1167. interface IWMHeaderInfo2 : IWMHeaderInfo
  1168. {
  1169. HRESULT GetCodecInfoCount( [out] DWORD* pcCodecInfos );
  1170. HRESULT GetCodecInfo( [in] DWORD wIndex,
  1171. [in,out] WORD* pcchName,
  1172. [out] WCHAR* pwszName,
  1173. [in,out] WORD* pcchDescription,
  1174. [out] WCHAR* pwszDescription,
  1175. [out] WMT_CODEC_INFO_TYPE* pCodecType,
  1176. [in,out] WORD* pcbCodecInfo,
  1177. [out] BYTE* pbCodecInfo );
  1178. };
  1179. ///////////////////////////////////////////////////////////////////////////////
  1180. //
  1181. // The profile API. The intention is that most users don't touch the profile
  1182. // API, but just use pre-existing profiles.
  1183. //
  1184. // Profiles define authoring configurations, such as stream types, bitrates,
  1185. // etc.
  1186. //
  1187. ///////////////////////////////////////////////////////////////////////////////
  1188. [
  1189. object,
  1190. uuid( d16679f2-6ca0-472d-8d31-2f5d55aee155 ),
  1191. helpstring( "IWMProfileManager Interface"),
  1192. pointer_default(unique),
  1193. local
  1194. ]
  1195. interface IWMProfileManager : IUnknown
  1196. {
  1197. //
  1198. // Create a profile with nothing in it.
  1199. //
  1200. HRESULT CreateEmptyProfile( [in] WMT_VERSION dwVersion,
  1201. [out] IWMProfile **ppProfile );
  1202. //
  1203. // Load a system profile given its ID.
  1204. //
  1205. HRESULT LoadProfileByID( [in] REFGUID guidProfile,
  1206. [out] IWMProfile **ppProfile );
  1207. //
  1208. // Load a profile from a stored string.
  1209. //
  1210. HRESULT LoadProfileByData( [in] const WCHAR *pwszProfile,
  1211. [out] IWMProfile **ppProfile );
  1212. //
  1213. // Save profile specified by its string.
  1214. //
  1215. HRESULT SaveProfile( [in] IWMProfile *pIWMProfile, [in] WCHAR *pwszProfile, [in, out] DWORD *pdwLength );
  1216. //
  1217. // Iterate through the system profiles.
  1218. //
  1219. HRESULT GetSystemProfileCount( [out] DWORD *pcProfiles );
  1220. HRESULT LoadSystemProfile( [in] DWORD dwProfileIndex,
  1221. [out] IWMProfile **ppProfile );
  1222. };
  1223. ///////////////////////////////////////////////////////////////////////////////
  1224. [
  1225. object,
  1226. uuid( 7A924E51-73C1-494d-8019-23D37ED9B89A ),
  1227. helpstring( "IWMProfileManager2 Interface"),
  1228. pointer_default(unique),
  1229. local
  1230. ]
  1231. interface IWMProfileManager2 : IWMProfileManager
  1232. {
  1233. //
  1234. // Set the version number of the system profiles that the profile manager
  1235. // will enumerate. WMT_VER_4_0 is the default, for compatibility reasons,
  1236. // so be sure to set this to the latest version if that is the desired
  1237. // result.
  1238. //
  1239. HRESULT GetSystemProfileVersion( WMT_VERSION *pdwVersion );
  1240. HRESULT SetSystemProfileVersion( WMT_VERSION dwVersion );
  1241. };
  1242. ///////////////////////////////////////////////////////////////////////////////
  1243. [
  1244. object,
  1245. uuid( 96406BDB-2B2B-11d3-B36B-00C04F6108FF ),
  1246. helpstring( "IWMProfile Interface"),
  1247. pointer_default(unique),
  1248. local
  1249. ]
  1250. interface IWMProfile : IUnknown
  1251. {
  1252. //
  1253. // By default, when the user creates a profile, it will use the latest
  1254. // version of Windows Media. To create a backward-compatible profile,
  1255. // call IWMProfileManager::CreateEmptyProfile with the appropriate version
  1256. // number.
  1257. //
  1258. HRESULT GetVersion( [out] WMT_VERSION *pdwVersion );
  1259. //
  1260. // Profiles have names and descriptions, for use when displaying lists
  1261. // of profiles, etc.
  1262. //
  1263. HRESULT GetName( [out] WCHAR *pwszName,
  1264. [in, out] DWORD *pcchName );
  1265. HRESULT SetName( [in] const WCHAR *pwszName );
  1266. HRESULT GetDescription( [out] WCHAR *pwszDescription,
  1267. [in, out] DWORD *pcchName );
  1268. HRESULT SetDescription( [in] const WCHAR *pwszDescription );
  1269. //
  1270. // Methods for enumerating the streams. Note that updating the
  1271. // returned IWMStreamConfig has no effect on the profile until you
  1272. // call ReconfigStream().
  1273. //
  1274. HRESULT GetStreamCount( [out] DWORD *pcStreams );
  1275. HRESULT GetStream( [in] DWORD dwStreamIndex,
  1276. [out] IWMStreamConfig **ppConfig );
  1277. HRESULT GetStreamByNumber( [in] WORD wStreamNum,
  1278. [out] IWMStreamConfig **ppConfig );
  1279. //
  1280. // Remove a stream.
  1281. //
  1282. HRESULT RemoveStream( [in] IWMStreamConfig *pConfig );
  1283. HRESULT RemoveStreamByNumber( [in] WORD wStreamNum );
  1284. //
  1285. // Adding a stream copies the config into the profile.
  1286. //
  1287. HRESULT AddStream( [in] IWMStreamConfig *pConfig );
  1288. HRESULT ReconfigStream( [in] IWMStreamConfig *pConfig );
  1289. //
  1290. // Create a new stream config object (avoiding the need to CoCreate).
  1291. // This will still need to be added to the profile using the AddStream()
  1292. // call (but only after it has been configured).
  1293. //
  1294. HRESULT CreateNewStream( [in] REFGUID guidStreamType,
  1295. [out] IWMStreamConfig **ppConfig );
  1296. //
  1297. // Mutual Exclusion. As above, only Add and Remove actual change the
  1298. // profile.
  1299. //
  1300. HRESULT GetMutualExclusionCount( [out] DWORD *pcME );
  1301. HRESULT GetMutualExclusion( [in] DWORD dwMEIndex,
  1302. [out] IWMMutualExclusion **ppME );
  1303. HRESULT RemoveMutualExclusion( [in] IWMMutualExclusion *pME );
  1304. HRESULT AddMutualExclusion( [in] IWMMutualExclusion *pME );
  1305. HRESULT CreateNewMutualExclusion( [out] IWMMutualExclusion **ppME );
  1306. };
  1307. ///////////////////////////////////////////////////////////////////////////////
  1308. [
  1309. object,
  1310. uuid( 07E72D33-D94E-4be7-8843-60AE5FF7E5F5 ),
  1311. helpstring( "IWMProfile2 Interface"),
  1312. pointer_default(unique),
  1313. local
  1314. ]
  1315. interface IWMProfile2 : IWMProfile
  1316. {
  1317. //
  1318. // Get/set this profile's unique identifier
  1319. //
  1320. HRESULT GetProfileID( [out] GUID* pguidID );
  1321. };
  1322. ///////////////////////////////////////////////////////////////////////////////
  1323. [
  1324. object,
  1325. uuid( 96406BDC-2B2B-11d3-B36B-00C04F6108FF ),
  1326. helpstring( "IWMStreamConfig Interface"),
  1327. pointer_default(unique),
  1328. local
  1329. ]
  1330. //
  1331. // IWMStreamConfig represents an ASF stream.
  1332. //
  1333. interface IWMStreamConfig : IUnknown
  1334. {
  1335. // This interface QI's for IWMMediaProps and one of it's inheritors.
  1336. // (IWMVideoMediaProps, for instance).
  1337. HRESULT GetStreamType( [out] GUID *pguidStreamType );
  1338. HRESULT GetStreamNumber( [out] WORD *pwStreamNum );
  1339. HRESULT SetStreamNumber( [in] WORD wStreamNum );
  1340. HRESULT GetStreamName( [out] WCHAR *pwszStreamName,
  1341. [in, out] WORD *pcchStreamName );
  1342. HRESULT SetStreamName( [in] WCHAR *pwszStreamName );
  1343. HRESULT GetConnectionName( [out] WCHAR *pwszInputName,
  1344. [in, out] WORD *pcchInputName );
  1345. HRESULT SetConnectionName( [in] WCHAR *pwszInputName );
  1346. HRESULT GetBitrate( [out] DWORD *pdwBitrate );
  1347. HRESULT SetBitrate( [in] DWORD pdwBitrate );
  1348. //
  1349. // A buffer window of -1 (0xffffffff) indicates that the buffer window
  1350. // is unknown. On the writer side, this means the writer can use whatever
  1351. // buffer window it chooses.
  1352. //
  1353. HRESULT GetBufferWindow( [out] DWORD *pmsBufferWindow );
  1354. HRESULT SetBufferWindow( [in] DWORD msBufferWindow );
  1355. };
  1356. ///////////////////////////////////////////////////////////////////////////////
  1357. [
  1358. object,
  1359. uuid( CDFB97AB-188F-40b3-B643-5B7903975C59 ),
  1360. helpstring( "IWMPacketSize Interface"),
  1361. pointer_default(unique),
  1362. local
  1363. ]
  1364. //
  1365. // Controls how big packets can get in an ASF file.
  1366. //
  1367. interface IWMPacketSize : IUnknown
  1368. {
  1369. HRESULT GetMaxPacketSize( [out] DWORD *pdwMaxPacketSize );
  1370. HRESULT SetMaxPacketSize( [in] DWORD dwMaxPacketSize );
  1371. };
  1372. ///////////////////////////////////////////////////////////////////////////////
  1373. [
  1374. object,
  1375. uuid( 96406BDD-2B2B-11d3-B36B-00C04F6108FF ),
  1376. helpstring( "IWMStreamList Interface"),
  1377. pointer_default(unique),
  1378. local
  1379. ]
  1380. //
  1381. // IWMStreamList is used for the various objects that define relationships
  1382. // between streams.
  1383. //
  1384. interface IWMStreamList : IUnknown
  1385. {
  1386. HRESULT GetStreams( [out] WORD *pwStreamNumArray,
  1387. [in, out] WORD *pcStreams );
  1388. HRESULT AddStream( [in] WORD wStreamNum );
  1389. HRESULT RemoveStream( [in] WORD wStreamNum );
  1390. };
  1391. ///////////////////////////////////////////////////////////////////////////////
  1392. [
  1393. object,
  1394. uuid( 96406BDE-2B2B-11d3-B36B-00C04F6108FF ),
  1395. helpstring( "IWMMutualExclusion Interface"),
  1396. pointer_default(unique),
  1397. local
  1398. ]
  1399. //
  1400. // IWMMutualExclusion specifies a group of streams, of which only one can
  1401. // be played at once. These are used to do MEB (stream selection based on
  1402. // bandwidth).
  1403. //
  1404. interface IWMMutualExclusion : IWMStreamList
  1405. {
  1406. //
  1407. // The possible types of mutual exclusion are defined in the ASF
  1408. // header.
  1409. //
  1410. HRESULT GetType( [out] GUID *pguidType );
  1411. HRESULT SetType( [in] REFGUID guidType );
  1412. };
  1413. ///////////////////////////////////////////////////////////////////////////////
  1414. //
  1415. // Advanced features.
  1416. //
  1417. ///////////////////////////////////////////////////////////////////////////////
  1418. ///////////////////////////////////////////////////////////////////////////////
  1419. [
  1420. object,
  1421. uuid( 96406BE3-2B2B-11d3-B36B-00C04F6108FF ),
  1422. helpstring( "IWMWriterAdvanced Interface"),
  1423. pointer_default(unique),
  1424. local
  1425. ]
  1426. //
  1427. // The writer can be QI'd for this interface, which provides advanced writing
  1428. // functionality.
  1429. //
  1430. interface IWMWriterAdvanced : IUnknown
  1431. {
  1432. //
  1433. // Sinks are where the output ASF data goes.
  1434. //
  1435. HRESULT GetSinkCount( [out] DWORD *pcSinks );
  1436. HRESULT GetSink( [in] DWORD dwSinkNum,
  1437. [out] IWMWriterSink **ppSink );
  1438. HRESULT AddSink( [in] IWMWriterSink *pSink );
  1439. HRESULT RemoveSink( [in] IWMWriterSink *pSink );
  1440. //
  1441. // By default, the user provides samples to an input on the
  1442. // IWMWriter interface, and the samples may be compressed, put
  1443. // into a MEB stream, etc. However, the user can use this interface to
  1444. // put the samples directly into the ASF, with no compression etc.
  1445. //
  1446. HRESULT WriteStreamSample( [in] WORD wStreamNum,
  1447. [in] QWORD cnsSampleTime,
  1448. [in] DWORD msSampleSendTime,
  1449. [in] QWORD cnsSampleDuration,
  1450. [in] DWORD dwFlags,
  1451. [in] INSSBuffer *pSample );
  1452. //
  1453. // The writer may be running in real-time. If so, it's interesting to
  1454. // get the current time from the writer.
  1455. //
  1456. HRESULT SetLiveSource( BOOL fIsLiveSource );
  1457. HRESULT IsRealTime( [out] BOOL *pfRealTime );
  1458. HRESULT GetWriterTime( [out] QWORD *pcnsCurrentTime );
  1459. //
  1460. // To get statistics, pass in a WM_WRITER_STATISTICS structure, which
  1461. // will be filled out by the GetStatistics() call with the requested
  1462. // stats.
  1463. //
  1464. // Pass in a stream number to get statistics for a specific stream, or
  1465. // pass 0 to get statistics for the entire ASF file.
  1466. //
  1467. HRESULT GetStatistics( [in] WORD wStreamNum,
  1468. [out] WM_WRITER_STATISTICS *pStats );
  1469. //
  1470. // Sync tolerance determines how far out of sync the inputs will be allowed
  1471. // to get before samples are thrown away. Default is 3000 ms.
  1472. //
  1473. HRESULT SetSyncTolerance( [in] DWORD msWindow );
  1474. HRESULT GetSyncTolerance( [out] DWORD* pmsWindow );
  1475. };
  1476. ///////////////////////////////////////////////////////////////////////////////
  1477. [
  1478. object,
  1479. uuid( 962dc1ec-c046-4db8-9cc7-26ceae500817 ),
  1480. helpstring( "IWMWriterAdvanced2 Interface"),
  1481. pointer_default(unique),
  1482. local
  1483. ]
  1484. //
  1485. // The writer can be QI'd for this interface, which provides advanced writing
  1486. // functionality.
  1487. //
  1488. interface IWMWriterAdvanced2 : IWMWriterAdvanced
  1489. {
  1490. //
  1491. // Retrieves a setting for a particular output by name
  1492. //
  1493. HRESULT GetInputSetting(
  1494. [in] DWORD dwInputNum,
  1495. [in] LPCWSTR pszName,
  1496. [out] WMT_ATTR_DATATYPE *pType,
  1497. [out] BYTE *pValue,
  1498. [in,out] WORD *pcbLength );
  1499. //
  1500. // Sets a named setting for a particular input
  1501. //
  1502. HRESULT SetInputSetting(
  1503. [in] DWORD dwInputNum,
  1504. [in] LPCWSTR pszName,
  1505. [in] WMT_ATTR_DATATYPE Type,
  1506. [in] const BYTE *pValue,
  1507. [in] WORD cbLength );
  1508. };
  1509. ///////////////////////////////////////////////////////////////////////////////
  1510. [
  1511. object,
  1512. uuid( D9D6549D-A193-4f24-B308-03123D9B7F8D ),
  1513. helpstring( "IWMWriterPostViewCallback Interface"),
  1514. pointer_default(unique),
  1515. local
  1516. ]
  1517. //
  1518. // This is the interface that receives uncompressed samples from the writer
  1519. // to preview (well, postview) what the codec is doing.
  1520. //
  1521. interface IWMWriterPostViewCallback : IWMStatusCallback
  1522. {
  1523. //
  1524. // cnsSampleDuration will be 0 for most media types.
  1525. //
  1526. HRESULT OnPostViewSample( [in] WORD wStreamNumber,
  1527. [in] QWORD cnsSampleTime,
  1528. [in] QWORD cnsSampleDuration,
  1529. [in] DWORD dwFlags,
  1530. [in] INSSBuffer *pSample,
  1531. [in] void *pvContext );
  1532. HRESULT AllocateForPostView([in] WORD wStreamNum,
  1533. [in] DWORD cbBuffer,
  1534. [out] INSSBuffer **ppBuffer,
  1535. [in] void *pvContext );
  1536. };
  1537. ///////////////////////////////////////////////////////////////////////////////
  1538. [
  1539. object,
  1540. uuid( 81E20CE4-75EF-491a-8004-FC53C45BDC3E ),
  1541. helpstring( "IWMWriterPostView Interface"),
  1542. pointer_default(unique),
  1543. local
  1544. ]
  1545. //
  1546. // The writer can be QI'd for this interface, which provides advanced writing
  1547. // functionality.
  1548. //
  1549. interface IWMWriterPostView : IUnknown
  1550. {
  1551. //
  1552. // Specify the callback to use for PostView
  1553. //
  1554. HRESULT SetPostViewCallback( IWMWriterPostViewCallback* pCallback, void* pvContext );
  1555. //
  1556. // Turns on delivery of postview samples for a given stream
  1557. //
  1558. HRESULT SetReceivePostViewSamples( [in] WORD wStreamNum,
  1559. [in] BOOL fReceivePostViewSamples );
  1560. HRESULT GetReceivePostViewSamples( [in] WORD wStreamNum,
  1561. [out] BOOL *pfReceivePostViewSamples );
  1562. //
  1563. // The user can enumerate through the various outputs, and get the
  1564. // output format for that data.
  1565. //
  1566. // Manipulating the IWMOutputMediaProps has no effect on the output, unless
  1567. // the user also calls SetOutputProps.
  1568. //
  1569. HRESULT GetPostViewProps( [in] WORD wStreamNumber,
  1570. [out] IWMMediaProps **ppOutput );
  1571. HRESULT SetPostViewProps( [in] WORD wStreamNumber,
  1572. [in] IWMMediaProps *pOutput );
  1573. //
  1574. // Used for determining all possible format types supported by this
  1575. // output on the reader.
  1576. //
  1577. HRESULT GetPostViewFormatCount( [in] WORD wStreamNumber,
  1578. [out] DWORD *pcFormats );
  1579. HRESULT GetPostViewFormat( [in] WORD wStreamNumber,
  1580. [in] DWORD dwFormatNumber,
  1581. [out] IWMMediaProps** ppProps );
  1582. //
  1583. // The user can register himself to provide buffers for any of the outputs
  1584. // (for instance, DDraw buffers). The actual allocation is on the
  1585. // IWMReaderCallbackAdvanced interface.
  1586. //
  1587. HRESULT SetAllocateForPostView( [in] WORD wStreamNumber,
  1588. [in] BOOL fAllocate );
  1589. HRESULT GetAllocateForPostView( [in] WORD wStreamNumber,
  1590. [out] BOOL *pfAllocate );
  1591. };
  1592. ///////////////////////////////////////////////////////////////////////////////
  1593. [
  1594. object,
  1595. uuid( 96406BE4-2B2B-11d3-B36B-00C04F6108FF ),
  1596. helpstring( "IWMWriterSink Interface"),
  1597. pointer_default(unique),
  1598. local
  1599. ]
  1600. //
  1601. // This is the interface that receives raw ASF from the writer.
  1602. //
  1603. interface IWMWriterSink : IUnknown
  1604. {
  1605. HRESULT OnHeader( [in] INSSBuffer *pHeader );
  1606. //
  1607. // Some sinks require that data be fed to them in real-time.
  1608. //
  1609. HRESULT IsRealTime( [out] BOOL *pfRealTime );
  1610. HRESULT AllocateDataUnit( [in] DWORD cbDataUnit,
  1611. [out] INSSBuffer **ppDataUnit );
  1612. HRESULT OnDataUnit( [in] INSSBuffer *pDataUnit );
  1613. //
  1614. // This function is called when the writer is done sending data.
  1615. //
  1616. HRESULT OnEndWriting();
  1617. };
  1618. ///////////////////////////////////////////////////////////////////////////////
  1619. [
  1620. object,
  1621. uuid( CF4B1F99-4DE2-4e49-A363-252740D99BC1 ),
  1622. helpstring( "IWMRegisterCallback Interface"),
  1623. pointer_default(unique),
  1624. local
  1625. ]
  1626. interface IWMRegisterCallback : IUnknown
  1627. {
  1628. HRESULT Advise( [in] IWMStatusCallback* pCallback,
  1629. [in] void* pvContext );
  1630. HRESULT Unadvise( [in] IWMStatusCallback* pCallback,
  1631. [in] void* pvContext );
  1632. };
  1633. ///////////////////////////////////////////////////////////////////////////////
  1634. [
  1635. object,
  1636. uuid( 96406BE5-2B2B-11d3-B36B-00C04F6108FF ),
  1637. helpstring( "IWMWriterFileSink Interface"),
  1638. pointer_default(unique),
  1639. local
  1640. ]
  1641. interface IWMWriterFileSink : IWMWriterSink
  1642. {
  1643. HRESULT Open( [in] const WCHAR *pwszFilename );
  1644. };
  1645. ///////////////////////////////////////////////////////////////////////////////
  1646. [
  1647. object,
  1648. uuid( 14282BA7-4AEF-4205-8CE5-C229035A05BC ),
  1649. helpstring( "IWMWriterFileSink2 Interface"),
  1650. pointer_default(unique),
  1651. local
  1652. ]
  1653. interface IWMWriterFileSink2 : IWMWriterFileSink
  1654. {
  1655. HRESULT Start( [in] QWORD cnsStartTime );
  1656. HRESULT Stop( [in] QWORD cnsStopTime );
  1657. HRESULT IsStopped( [out] BOOL *pfStopped );
  1658. HRESULT GetFileDuration( [out] QWORD *pcnsDuration );
  1659. HRESULT GetFileSize( [out] QWORD *pcbFile );
  1660. HRESULT Close();
  1661. HRESULT IsClosed( [out] BOOL *pfClosed );
  1662. };
  1663. ///////////////////////////////////////////////////////////////////////////////
  1664. [
  1665. object,
  1666. uuid( 96406BE7-2B2B-11d3-B36B-00C04F6108FF ),
  1667. helpstring( "IWMWriterNetworkSink Interface"),
  1668. pointer_default(unique),
  1669. local
  1670. ]
  1671. interface IWMWriterNetworkSink : IWMWriterSink
  1672. {
  1673. //
  1674. // Determine the maximum number of clients that can connect to this sink.
  1675. // Default is 10.
  1676. //
  1677. HRESULT SetMaximumClients( [in] DWORD dwMaxClients );
  1678. HRESULT GetMaximumClients( [out] DWORD *pdwMaxClients );
  1679. //
  1680. // The network protocol that the network sink will use.
  1681. //
  1682. HRESULT SetNetworkProtocol( [in] WMT_NET_PROTOCOL protocol );
  1683. HRESULT GetNetworkProtocol( [out] WMT_NET_PROTOCOL *pProtocol );
  1684. //
  1685. // Find out the name of the URL on which we're broadcasting
  1686. //
  1687. HRESULT GetHostURL( [out] WCHAR *pwszURL,
  1688. [in, out] DWORD *pcchURL );
  1689. //
  1690. // The method claims the network port number. Close the sink to release
  1691. // the port.
  1692. //
  1693. // Specify 0 for the port number and the sink will select a port for
  1694. // the user.
  1695. //
  1696. HRESULT Open( [in, out] DWORD *pdwPortNum );
  1697. //
  1698. // Disconnect all connected clients.
  1699. //
  1700. HRESULT Disconnect();
  1701. //
  1702. // Close and release the open port.
  1703. //
  1704. HRESULT Close();
  1705. };
  1706. ///////////////////////////////////////////////////////////////////////////////
  1707. [
  1708. object,
  1709. uuid( 73C66010-A299-41df-B1F0-CCF03B09C1C6 ),
  1710. helpstring( "IWMClientConnections Interface"),
  1711. pointer_default(unique),
  1712. local
  1713. ]
  1714. interface IWMClientConnections : IUnknown
  1715. {
  1716. //
  1717. // Determine the number of connected clients
  1718. //
  1719. HRESULT GetClientCount( [out] DWORD* pcClients );
  1720. //
  1721. // Get information about a connected client
  1722. //
  1723. HRESULT GetClientProperties( [in] DWORD dwClientNum,
  1724. [out] WM_CLIENT_PROPERTIES *pClientProperties );
  1725. };
  1726. ///////////////////////////////////////////////////////////////////////////////
  1727. [
  1728. object,
  1729. uuid( 96406BEA-2B2B-11d3-B36B-00C04F6108FF ),
  1730. helpstring( "IWMReaderAdvanced Interface"),
  1731. pointer_default(unique),
  1732. local
  1733. ]
  1734. //
  1735. // The reader can be QI'd for this interface for advanced functionality.
  1736. //
  1737. interface IWMReaderAdvanced : IUnknown
  1738. {
  1739. //
  1740. // The user may want to drive the clock himself, particularly if he wants
  1741. // to source from a file faster-than-realtime. This call may fail if the
  1742. // current source does not support user-driven clocks.
  1743. //
  1744. // The proper way for a user to drive the clock is for the user to call
  1745. // DeliverTime, and then wait for the OnTime call on
  1746. // IWMReaderCallbackAdvanced to reach the time he specified.
  1747. //
  1748. HRESULT SetUserProvidedClock( [in] BOOL fUserClock );
  1749. HRESULT GetUserProvidedClock( [out] BOOL *pfUserClock );
  1750. HRESULT DeliverTime( [in] QWORD cnsTime );
  1751. //
  1752. // The user can select streams manually, instead of relying on the
  1753. // automatic bandwidth stream selection that the reader will
  1754. // normally do. To figure out what streams are in this ASF and what their
  1755. // numbers are, QI for IWMProfile.
  1756. //
  1757. // When SetManualStreamSelection( TRUE ) is called, all streams are
  1758. // selected by default.
  1759. //
  1760. HRESULT SetManualStreamSelection( [in] BOOL fSelection );
  1761. HRESULT GetManualStreamSelection( [out] BOOL *pfSelection );
  1762. HRESULT SetStreamsSelected( [in] WORD cStreamCount,
  1763. [in] WORD *pwStreamNumbers,
  1764. [in] WMT_STREAM_SELECTION *pSelections );
  1765. HRESULT GetStreamSelected( [in] WORD wStreamNum,
  1766. [out] WMT_STREAM_SELECTION *pSelection );
  1767. //
  1768. // The user can also choose to get callbacks when automatic stream
  1769. // selection occurs.
  1770. //
  1771. HRESULT SetReceiveSelectionCallbacks( [in] BOOL fGetCallbacks );
  1772. HRESULT GetReceiveSelectionCallbacks( [in] BOOL *pfGetCallbacks );
  1773. //
  1774. // The user can register himself to receive samples directly from the
  1775. // ASF streams, rather than letting the Reader decompress them. Note that
  1776. // to do this, the IWMReaderCallback (supplied by the user) must support
  1777. // IWMReaderCallbackAdvanced.
  1778. //
  1779. // To get actual information about the contents of a stream, QI the
  1780. // object for IWMProfile.
  1781. //
  1782. HRESULT SetReceiveStreamSamples( [in] WORD wStreamNum,
  1783. [in] BOOL fReceiveStreamSamples );
  1784. HRESULT GetReceiveStreamSamples( [in] WORD wStreamNum,
  1785. [out] BOOL *pfReceiveStreamSamples );
  1786. //
  1787. // The user can register himself to provide buffers for any of the outputs
  1788. // (for instance, DDraw buffers). The actual allocation is on the
  1789. // IWMReaderCallbackAdvanced interface.
  1790. //
  1791. HRESULT SetAllocateForOutput( [in] DWORD dwOutputNum,
  1792. [in] BOOL fAllocate );
  1793. HRESULT GetAllocateForOutput( [in] DWORD dwOutputNum,
  1794. [out] BOOL *pfAllocate );
  1795. HRESULT SetAllocateForStream( [in] WORD dwStreamNum,
  1796. [in] BOOL fAllocate );
  1797. HRESULT GetAllocateForStream( [in] WORD dwSreamNum,
  1798. [out] BOOL *pfAllocate );
  1799. //
  1800. // Get statistics on demand
  1801. //
  1802. HRESULT GetStatistics( [in] WM_READER_STATISTICS *pStatistics );
  1803. //
  1804. // Set client side information used for logging
  1805. //
  1806. HRESULT SetClientInfo( [in] WM_READER_CLIENTINFO *pClientInfo );
  1807. //
  1808. // Get the maximum required buffer sizes that the SDK will allocate.
  1809. // The first is for output buffers, the second for stream buffers.
  1810. //
  1811. HRESULT GetMaxOutputSampleSize( [in] DWORD dwOutput, [out] DWORD *pcbMax );
  1812. HRESULT GetMaxStreamSampleSize( [in] WORD wStream, [out] DWORD *pcbMax );
  1813. //
  1814. // Used to notify the reader that it's delivering data
  1815. // too slowly to the client. The reader will try to speed
  1816. // up.
  1817. //
  1818. HRESULT NotifyLateDelivery( QWORD cnsLateness );
  1819. };
  1820. ///////////////////////////////////////////////////////////////////////////////
  1821. [
  1822. object,
  1823. uuid( ae14a945-b90c-4d0d-9127-80d665f7d73e ),
  1824. helpstring( "IWMReaderAdvanced2 Interface"),
  1825. pointer_default(unique),
  1826. local
  1827. ]
  1828. //
  1829. // The reader can be QI'd for this interface for advanced functionality.
  1830. //
  1831. interface IWMReaderAdvanced2 : IWMReaderAdvanced
  1832. {
  1833. //
  1834. // Set the play mode to WMT_PLAY_MODE_AUTOSELECT to allow the reader
  1835. // to pick the mode. (This is the default). If you select a play mode that
  1836. // is impossible for the requested URL, an error will be returned when
  1837. // the URL is opened.
  1838. //
  1839. HRESULT SetPlayMode( [in] WMT_PLAY_MODE Mode );
  1840. //
  1841. // Get the current play mode.
  1842. //
  1843. HRESULT GetPlayMode( [out] WMT_PLAY_MODE *pMode );
  1844. //
  1845. // Between WMT_BUFFERING_START and WMT_BUFFERING_STOP this call will
  1846. // return progress values. pdwPercent returns the percentage of buffering
  1847. // that has completed, and pcnsBuffering returns the amount of buffering
  1848. // remaining.
  1849. //
  1850. HRESULT GetBufferProgress( [out] DWORD *pdwPercent,
  1851. [out] QWORD *pcnsBuffering );
  1852. //
  1853. // When the play mode is WMT_PLAY_MODE_DOWNLOAD, this call will return
  1854. // progress values. pdwPercent returns the percentage of the download
  1855. // that has completed, pqwBytesDownloaded returns the number of bytes
  1856. // that have been downloaded, and pcnsDownload returns the amount of
  1857. // downloading remaining.
  1858. //
  1859. HRESULT GetDownloadProgress( [out] DWORD *pdwPercent,
  1860. [out] QWORD *pqwBytesDownloaded,
  1861. [out] QWORD *pcnsDownload );
  1862. //
  1863. // When saving a file, the operation may take awhile. Between
  1864. // WMT_SAVEAS_START and WMT_SAVEAS_STOP, this call will return progress
  1865. // values. pdwPercent returns the percentage of the save as that has
  1866. // completed.
  1867. //
  1868. HRESULT GetSaveAsProgress( [out] DWORD *pdwPercent );
  1869. //
  1870. // Save the current file. This only works for WMT_PLAY_MODE_DOWNLOAD.
  1871. // This operation is asynchronous; WMT_SAVEAS_STOP indicates that the
  1872. // save has completed. Closing the reader will abort a save operation
  1873. // that has not completed.
  1874. //
  1875. HRESULT SaveFileAs( [in] const WCHAR *pwszFilename );
  1876. //
  1877. // Returns the name of the protocol that is currently being used.
  1878. // The protocol name is a URL scheme, such as "mmsu", "http", "file", etc.
  1879. // Note, however, that the protocol name may differ from the URL scheme
  1880. // that was specified in IWMReader::Open().
  1881. // This method may return an empty string if the protocol name cannot be determined.
  1882. //
  1883. HRESULT GetProtocolName( [out] WCHAR *pwszProtocol, [in, out] DWORD *pcchProtocol );
  1884. //
  1885. // Same as IWMReader::Start, but uses a marker index instead of a time value.
  1886. //
  1887. HRESULT StartAtMarker( [in] WORD wMarkerIndex,
  1888. [in] QWORD cnsDuration,
  1889. [in] float fRate,
  1890. [in] void *pvContext );
  1891. //
  1892. // Retrieves a setting for a particular output by name
  1893. //
  1894. HRESULT GetOutputSetting(
  1895. [in] DWORD dwOutputNum,
  1896. [in] LPCWSTR pszName,
  1897. [out] WMT_ATTR_DATATYPE *pType,
  1898. [out] BYTE *pValue,
  1899. [in,out] WORD *pcbLength );
  1900. //
  1901. // Sets a named setting for a particular output
  1902. //
  1903. HRESULT SetOutputSetting(
  1904. [in] DWORD dwOutputNum,
  1905. [in] LPCWSTR pszName,
  1906. [in] WMT_ATTR_DATATYPE Type,
  1907. [in] const BYTE *pValue,
  1908. [in] WORD cbLength );
  1909. //
  1910. // Used to begin prerolling the reader. Call this method
  1911. // when you know you're going to call Start soon and want
  1912. // to start buffering data in advance. cnsStart, cnsDuration
  1913. // and fRate should be the same as the values you plan to pass
  1914. // to Start in the future.
  1915. //
  1916. HRESULT Preroll(
  1917. [in] QWORD cnsStart,
  1918. [in] QWORD cnsDuration,
  1919. [in] float fRate );
  1920. //
  1921. // Specifies whether the SDK should send the client's unique identifier
  1922. // to the server when streaming.
  1923. //
  1924. HRESULT SetLogClientID( [in] BOOL fLogClientID );
  1925. HRESULT GetLogClientID( [out] BOOL *pfLogClientID );
  1926. //
  1927. // This method requests that the Reader send WMT_BUFFERING_STOP as soon
  1928. // as possible. The Reader will only honor the request if it is currently
  1929. // buffering, i.e., it has sent a WMT_BUFFERING_START, but not yet sent the
  1930. // corresponding WMT_BUFFERING_STOP.
  1931. //
  1932. HRESULT StopBuffering( );
  1933. //
  1934. // Same as IWMReader::Open but takes an IStream interface pointer instead
  1935. // of an URL to be opened
  1936. //
  1937. HRESULT OpenStream( [in] IStream *pStream,
  1938. [in] IWMReaderCallback *pCallback,
  1939. [in] void *pvContext );
  1940. };
  1941. ///////////////////////////////////////////////////////////////////////////////
  1942. [
  1943. object,
  1944. uuid( 5DC0674B-F04B-4a4e-9F2A-B1AFDE2C8100 ),
  1945. helpstring( "IWMReaderAdvanced3 Interface" ),
  1946. pointer_default(unique),
  1947. local
  1948. ]
  1949. //
  1950. // The reader can be QI'ed for this interface for frame access functionaly.
  1951. //
  1952. interface IWMReaderAdvanced3 : IWMReaderAdvanced2
  1953. {
  1954. //
  1955. // This method is used when you want to stop net streaming right away but
  1956. // continue to receive samples that SDK have gotten so far.
  1957. //
  1958. // If it's successful, user should receive an END_OF_STREAMING quickly.
  1959. //
  1960. HRESULT StopNetStreaming( );
  1961. //
  1962. // This method is for frame based accessing, start with SMPTE time stamp etc.
  1963. // It is not supported in current version, we'll start to support this from v9
  1964. //
  1965. HRESULT StartAtPosition( [in] WORD wStreamNum,
  1966. [in] void *pvOffsetStart,
  1967. [in] void *pvDuration,
  1968. [in] WMT_OFFSET_FORMAT dwOffsetFormat,
  1969. [in] float fRate,
  1970. [in] void *pvContext );
  1971. };
  1972. ///////////////////////////////////////////////////////////////////////////////
  1973. [
  1974. object,
  1975. uuid( 9F762FA7-A22E-428d-93C9-AC82F3AAFE5A ),
  1976. helpstring( "IWMReaderAllocatorEx Interface"),
  1977. pointer_default(unique),
  1978. local
  1979. ]
  1980. interface IWMReaderAllocatorEx : IUnknown
  1981. {
  1982. HRESULT AllocateForStreamEx( [in] WORD wStreamNum,
  1983. [in] DWORD cbBuffer,
  1984. [out] INSSBuffer **ppBuffer,
  1985. [in] DWORD dwFlags,
  1986. [in] QWORD cnsSampleTime,
  1987. [in] QWORD cnsSampleDuration,
  1988. [in] void *pvContext );
  1989. HRESULT AllocateForOutputEx( [in] DWORD dwOutputNum,
  1990. [in] DWORD cbBuffer,
  1991. [out] INSSBuffer **ppBuffer,
  1992. [in] DWORD dwFlags,
  1993. [in] QWORD cnsSampleTime,
  1994. [in] QWORD cnsSampleDuration,
  1995. [in] void *pvContext );
  1996. };
  1997. ///////////////////////////////////////////////////////////////////////////////
  1998. [
  1999. object,
  2000. uuid( FDBE5592-81A1-41ea-93BD-735CAD1ADC05 ),
  2001. helpstring( "IWMReaderTypeNegotiation Interface"),
  2002. pointer_default(unique),
  2003. local
  2004. ]
  2005. interface IWMReaderTypeNegotiation : IUnknown
  2006. {
  2007. HRESULT TryOutputProps( [in] DWORD dwOutputNum,
  2008. [in] IWMOutputMediaProps *pOutput );
  2009. };
  2010. ///////////////////////////////////////////////////////////////////////////////
  2011. [
  2012. object,
  2013. uuid( 96406BEB-2B2B-11d3-B36B-00C04F6108FF ),
  2014. helpstring( "IWMReaderCallbackAdvanced Interface"),
  2015. pointer_default(unique),
  2016. local
  2017. ]
  2018. //
  2019. // For some advanced functionality, the IWMReaderCallback must support this
  2020. // interface.
  2021. //
  2022. interface IWMReaderCallbackAdvanced : IUnknown
  2023. {
  2024. //
  2025. // Receive a sample directly from the ASF. To get this call, the user
  2026. // must register himself to receive samples for a particular stream.
  2027. //
  2028. HRESULT OnStreamSample( [in] WORD wStreamNum,
  2029. [in] QWORD cnsSampleTime,
  2030. [in] QWORD cnsSampleDuration,
  2031. [in] DWORD dwFlags,
  2032. [in] INSSBuffer *pSample,
  2033. [in] void *pvContext );
  2034. //
  2035. // In some cases, the user may want to get callbacks telling what the
  2036. // reader thinks the current time is. This is interesting in 2 cases:
  2037. // - If the ASF has gaps in it; say no audio for 10 seconds. This call
  2038. // will continue to be called, while OnSample won't be called.
  2039. // - If the user is driving the clock, the reader needs to communicate
  2040. // back to the user its time, to avoid the user overrunning the reader.
  2041. //
  2042. HRESULT OnTime( [in] QWORD cnsCurrentTime, [in] void *pvContext );
  2043. //
  2044. // The user can also get callbacks when stream selection occurs.
  2045. //
  2046. HRESULT OnStreamSelection( [in] WORD wStreamCount,
  2047. [in] WORD *pStreamNumbers,
  2048. [in] WMT_STREAM_SELECTION *pSelections,
  2049. [in] void *pvContext );
  2050. //
  2051. // Will be called if the user got an async result from their
  2052. // call to SetOutputProps. The next sample you receive for
  2053. // this output will have these properties. The contents of the
  2054. // media type after calling SetOutputProps and before receiving
  2055. // an OutputPropsChanged notification are undefined.
  2056. //
  2057. HRESULT OnOutputPropsChanged( [in] DWORD dwOutputNum,
  2058. [in] WM_MEDIA_TYPE *pMediaType,
  2059. [in] void *pvContext );
  2060. //
  2061. // If the user has registered to allocate buffers, this is where he must
  2062. // do it.
  2063. //
  2064. HRESULT AllocateForStream( [in] WORD wStreamNum,
  2065. [in] DWORD cbBuffer,
  2066. [out] INSSBuffer **ppBuffer,
  2067. [in] void *pvContext );
  2068. HRESULT AllocateForOutput( [in] DWORD dwOutputNum,
  2069. [in] DWORD cbBuffer,
  2070. [out] INSSBuffer **ppBuffer,
  2071. [in] void *pvContext );
  2072. };
  2073. ///////////////////////////////////////////////////////////////////////////////
  2074. [
  2075. object,
  2076. uuid( D2827540-3EE7-432c-B14C-DC17F085D3B3 ),
  2077. helpstring( "IWMDRMReader Interface"),
  2078. pointer_default(unique),
  2079. local
  2080. ]
  2081. //
  2082. // Used to access advanced DRM functionality.
  2083. //
  2084. interface IWMDRMReader : IUnknown
  2085. {
  2086. HRESULT AcquireLicense( [in] DWORD dwFlags );
  2087. HRESULT CancelLicenseAcquisition();
  2088. HRESULT Individualize( [in] DWORD dwFlags );
  2089. HRESULT CancelIndividualization();
  2090. HRESULT MonitorLicenseAcquisition();
  2091. HRESULT CancelMonitorLicenseAcquisition();
  2092. HRESULT SetDRMProperty( [in] LPCWSTR pwstrName,
  2093. [in] WMT_ATTR_DATATYPE dwType,
  2094. [in] const BYTE *pValue,
  2095. [in] WORD cbLength );
  2096. HRESULT GetDRMProperty( [in] LPCWSTR pwstrName,
  2097. [out] WMT_ATTR_DATATYPE* pdwType,
  2098. [out] BYTE *pValue,
  2099. [out] WORD *pcbLength );
  2100. };
  2101. ///////////////////////////////////////////////////////////////////////////////
  2102. [
  2103. object,
  2104. uuid( 96406BEC-2B2B-11d3-B36B-00C04F6108FF ),
  2105. helpstring( "IWMReaderNetworkConfig Interface"),
  2106. pointer_default(unique),
  2107. local
  2108. ]
  2109. //
  2110. // Used to configure the network. This interface is implemented by
  2111. // the IWMReader object.
  2112. //
  2113. interface IWMReaderNetworkConfig : IUnknown
  2114. {
  2115. //
  2116. // Get and set the amount of time the network source will buffer
  2117. // data before rendering it.
  2118. //
  2119. HRESULT GetBufferingTime( [out] QWORD *pcnsBufferingTime );
  2120. HRESULT SetBufferingTime( [in] QWORD cnsBufferingTime );
  2121. //
  2122. // Returns the UDP port number ranges that will be used for receiving
  2123. // data. If no ranges are available, random UDP port numbers will be used.
  2124. //
  2125. HRESULT GetUDPPortRanges( [out] WM_PORT_NUMBER_RANGE *pRangeArray,
  2126. [in, out] DWORD *pcRanges );
  2127. //
  2128. // Sets the UDP port number ranges that can be used for receiving data.
  2129. // If no ranges are specified, random UDP port numbers will be used.
  2130. //
  2131. HRESULT SetUDPPortRanges( [in] WM_PORT_NUMBER_RANGE *pRangeArray,
  2132. [in] DWORD cRanges );
  2133. //
  2134. // Proxy settings: Manual proxy, Autodetect, UseBrowser (only for HTTP), or No Proxy.
  2135. //
  2136. HRESULT GetProxySettings( LPCWSTR pwszProtocol, WMT_PROXY_SETTINGS *pProxySetting );
  2137. HRESULT SetProxySettings( LPCWSTR pwszProtocol, WMT_PROXY_SETTINGS ProxySetting );
  2138. //
  2139. // The host to use as the proxy.
  2140. //
  2141. HRESULT GetProxyHostName( [in] LPCWSTR pwszProtocol, [out] WCHAR *pwszHostName, [in, out] DWORD *pcchHostName );
  2142. HRESULT SetProxyHostName( [in] LPCWSTR pwszProtocol, [in] LPCWSTR pwszHostName );
  2143. //
  2144. // The port to use as the proxy.
  2145. //
  2146. HRESULT GetProxyPort( [in] LPCWSTR pwszProtocol, [out] DWORD *pdwPort );
  2147. HRESULT SetProxyPort( [in] LPCWSTR pwszProtocol, [in] DWORD dwPort );
  2148. //
  2149. // Get and set the proxy exception list.
  2150. //
  2151. HRESULT GetProxyExceptionList( [in] LPCWSTR pwszProtocol, [out] WCHAR *pwszExceptionList, [in, out] DWORD *pcchExceptionList );
  2152. HRESULT SetProxyExceptionList( [in] LPCWSTR pwszProtocol, [in] LPCWSTR pwszExceptionList );
  2153. //
  2154. // Whether or not to bypass proxy for local hosts
  2155. //
  2156. HRESULT GetProxyBypassForLocal( [in] LPCWSTR pwszProtocol, [out] BOOL *pfBypassForLocal );
  2157. HRESULT SetProxyBypassForLocal( [in] LPCWSTR pwszProtocol, [in] BOOL fBypassForLocal );
  2158. //
  2159. // Whether to force a wpad discovery on the next run
  2160. //
  2161. HRESULT GetForceRerunAutoProxyDetection( [out] BOOL *pfForceRerunDetection );
  2162. HRESULT SetForceRerunAutoProxyDetection( [in] BOOL fForceRerunDetection );
  2163. //
  2164. // Whether or not to use multicast, http, tcp, or udp
  2165. //
  2166. HRESULT GetEnableMulticast( [out] BOOL *pfEnableMulticast );
  2167. HRESULT SetEnableMulticast( [in] BOOL fEnableMulticast );
  2168. HRESULT GetEnableHTTP( [out] BOOL *pfEnableHTTP );
  2169. HRESULT SetEnableHTTP( [in] BOOL fEnableHTTP );
  2170. HRESULT GetEnableUDP( [out] BOOL *pfEnableUDP );
  2171. HRESULT SetEnableUDP( [in] BOOL fEnableUDP );
  2172. HRESULT GetEnableTCP( [out] BOOL *pfEnableTCP );
  2173. HRESULT SetEnableTCP( [in] BOOL fEnableTCP );
  2174. //
  2175. // Forgets automatic protocol detection settings and redetects next time.
  2176. //
  2177. HRESULT ResetProtocolRollover( );
  2178. //
  2179. // Return or set the client's link bandwidth in bps. This is an optional
  2180. // setting. By default, the SDK will automatically detect its connection
  2181. // bandwidth to the streaming media server.
  2182. //
  2183. HRESULT GetConnectionBandwidth( [out] DWORD *pdwConnectionBandwidth );
  2184. HRESULT SetConnectionBandwidth( [in] DWORD dwConnectionBandwidth );
  2185. //
  2186. // Iterate through the network protocols supported by this reader
  2187. //
  2188. HRESULT GetNumProtocolsSupported( [out] DWORD *pcProtocols );
  2189. HRESULT GetSupportedProtocolName( [in] DWORD dwProtocolNum, [out] WCHAR *pwszProtocolName, [in, out] DWORD *pcchProtocolName);
  2190. //
  2191. // Adds the specified pszUrl to the list of URL's to recieve logging data.
  2192. // This list is in addition to the origin server.
  2193. //
  2194. HRESULT AddLoggingUrl( [in] LPCWSTR pwszUrl );
  2195. //
  2196. // Fills the buffer with the URL corresponding to index dwIndex.
  2197. //
  2198. HRESULT GetLoggingUrl( [in] DWORD dwIndex, [out] LPWSTR pwszUrl, [in, out] DWORD *pcchUrl );
  2199. //
  2200. // Returns the number of URLs in the current list of logging URLs.
  2201. //
  2202. HRESULT GetLoggingUrlCount( [out] DWORD *pdwUrlCount );
  2203. //
  2204. // Clears the list of logging URLs
  2205. //
  2206. HRESULT ResetLoggingUrlList( );
  2207. }
  2208. ///////////////////////////////////////////////////////////////////////////////
  2209. [
  2210. object,
  2211. uuid( 96406BED-2B2B-11d3-B36B-00C04F6108FF ),
  2212. helpstring( "IWMReaderStreamClock Interface"),
  2213. pointer_default(unique),
  2214. local
  2215. ]
  2216. //
  2217. // Used to configure the network. This interface is implemented by
  2218. // the IWMReader object.
  2219. //
  2220. interface IWMReaderStreamClock : IUnknown
  2221. {
  2222. //
  2223. // Get the current value of the stream clock
  2224. //
  2225. HRESULT GetTime( [in] QWORD *pcnsNow );
  2226. //
  2227. // Set or kill a timer. All timers are automatically
  2228. // killed whenever you stop the Reader. When a timer
  2229. // expires, you'll receive a WMT_TIMER OnStatus callback
  2230. // with hr == S_OK, pValue = TimerId and pvContext == pvParam.
  2231. //
  2232. //
  2233. HRESULT SetTimer( [in] QWORD cnsWhen, [in]void *pvParam, [out] DWORD *pdwTimerId );
  2234. HRESULT KillTimer( [in] DWORD dwTimerId );
  2235. }
  2236. ///////////////////////////////////////////////////////////////////////////////
  2237. [
  2238. object,
  2239. uuid( 6d7cdc71-9888-11d3-8edc-00c04f6109cf ),
  2240. helpstring( "IWMIndexer Interface"),
  2241. pointer_default(unique),
  2242. local
  2243. ]
  2244. interface IWMIndexer : IUnknown
  2245. {
  2246. //
  2247. // Start is an asynchronous call; it returns almost immediately and the user
  2248. // should wait for appropriate OnStatus calls to be sent to the callback.
  2249. //
  2250. HRESULT StartIndexing( [in] const WCHAR *pwszURL,
  2251. [in] IWMStatusCallback *pCallback,
  2252. [in] void *pvContext );
  2253. HRESULT Cancel();
  2254. };
  2255. ///////////////////////////////////////////////////////////////////////////////
  2256. [
  2257. object,
  2258. uuid( 05E5AC9F-3FB6-4508-BB43-A4067BA1EBE8 ),
  2259. helpstring( "IWMLicenseBackup Interface"),
  2260. pointer_default(unique),
  2261. local
  2262. ]
  2263. interface IWMLicenseBackup : IUnknown
  2264. {
  2265. HRESULT BackupLicenses( [in] DWORD dwFlags,
  2266. [in] IWMStatusCallback *pCallback );
  2267. HRESULT CancelLicenseBackup();
  2268. };
  2269. ///////////////////////////////////////////////////////////////////////////////
  2270. [
  2271. object,
  2272. uuid( C70B6334-0544-4efb-A245-15E65A004A13 ),
  2273. helpstring( "IWMLicenseRestore Interface"),
  2274. pointer_default(unique),
  2275. local
  2276. ]
  2277. interface IWMLicenseRestore : IUnknown
  2278. {
  2279. HRESULT RestoreLicenses( [in] DWORD dwFlags,
  2280. [in] IWMStatusCallback *pCallback );
  2281. HRESULT CancelLicenseRestore();
  2282. };
  2283. ///////////////////////////////////////////////////////////////////////////////
  2284. [
  2285. object,
  2286. uuid( 3C8E0DA6-996F-4ff3-A1AF-4838F9377E2E ),
  2287. helpstring( "IWMBackupRestoreProps Interface"),
  2288. pointer_default(unique),
  2289. local
  2290. ]
  2291. interface IWMBackupRestoreProps : IUnknown
  2292. {
  2293. HRESULT GetPropCount( [out] WORD *pcProps );
  2294. HRESULT GetPropByIndex( [in] WORD wIndex,
  2295. [out] WCHAR *pwszName,
  2296. [in,out] WORD *pcchNameLen,
  2297. [out] WMT_ATTR_DATATYPE *pType,
  2298. [out] BYTE *pValue,
  2299. [in,out] WORD *pcbLength );
  2300. HRESULT GetPropByName( [in] LPCWSTR pszName,
  2301. [out] WMT_ATTR_DATATYPE *pType,
  2302. [out] BYTE *pValue,
  2303. [in,out] WORD *pcbLength );
  2304. HRESULT SetProp( [in] LPCWSTR pszName,
  2305. [in] WMT_ATTR_DATATYPE Type,
  2306. [in] const BYTE *pValue,
  2307. [in] WORD cbLength );
  2308. HRESULT RemoveProp( [in] LPCWSTR pcwszName );
  2309. HRESULT RemoveAllProps();
  2310. };
  2311. ///////////////////////////////////////////////////////////////////////////////
  2312. [
  2313. object,
  2314. uuid( A970F41E-34DE-4a98-B3BA-E4B3CA7528F0 ),
  2315. helpstring( "IWMCodecInfo Interface"),
  2316. pointer_default(unique),
  2317. local
  2318. ]
  2319. interface IWMCodecInfo : IUnknown
  2320. {
  2321. HRESULT GetCodecInfoCount( [in] REFGUID guidType,
  2322. [out] DWORD *pcCodecs );
  2323. HRESULT GetCodecFormatCount( [in] REFGUID guidType,
  2324. [in] DWORD dwCodecIndex,
  2325. [out] DWORD *pcFormat );
  2326. HRESULT GetCodecFormat( [in] REFGUID guidType,
  2327. [in] DWORD dwCodecIndex,
  2328. [in] DWORD dwFormatIndex,
  2329. [out] IWMStreamConfig **ppIStreamConfig );
  2330. };
  2331. ///////////////////////////////////////////////////////////////////////////////
  2332. [
  2333. object,
  2334. uuid( AA65E273-B686-4056-91EC-DD768D4DF710 ),
  2335. helpstring( "IWMCodecInfo2 Interface"),
  2336. pointer_default(unique),
  2337. local
  2338. ]
  2339. interface IWMCodecInfo2 : IWMCodecInfo
  2340. {
  2341. HRESULT GetCodecName( [in] REFGUID guidType,
  2342. [in] DWORD dwCodecIndex,
  2343. [out] WCHAR *wszName,
  2344. [out] DWORD *pcchName );
  2345. HRESULT GetCodecFormatDesc( [in] REFGUID guidType,
  2346. [in] DWORD dwCodecIndex,
  2347. [in] DWORD dwFormatIndex,
  2348. [out] IWMStreamConfig **ppIStreamConfig,
  2349. [out] WCHAR *wszDesc,
  2350. [in, out] DWORD *pcchDesc );
  2351. };