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.

912 lines
30 KiB

  1. //==========================================================================;
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11. // Neutral/English language type library for basic Quartz control interfaces
  12. // the quartz type library defines the basic control interfaces
  13. [
  14. uuid(56a868b0-0ad4-11ce-b03a-0020af0ba770),
  15. helpstring("ActiveMovie control type library"),
  16. lcid(0x0000),
  17. version(1.0)
  18. ]
  19. library QuartzTypeLib
  20. {
  21. importlib("STDOLE2.TLB");
  22. // types are restricted to be automation-compatible
  23. typedef double REFTIME; // ReferenceTime
  24. typedef LONG_PTR OAEVENT; // should be a HANDLE
  25. typedef LONG_PTR OAHWND; // should be an hwnd
  26. // from strmif.idl
  27. typedef long OAFilterState;
  28. // collection interface - represents a collection of IUnknowns
  29. // this is used below to collect filter-info objects, registry-filters
  30. // pin-info objects and wrapped media type objects
  31. [
  32. uuid(56a868b9-0ad4-11ce-b03a-0020af0ba770),
  33. helpstring("Collection"),
  34. odl,
  35. oleautomation,
  36. dual
  37. ]
  38. interface IAMCollection : IDispatch
  39. {
  40. // number of items in collection
  41. [propget]
  42. HRESULT Count(
  43. [out, retval] LONG* plCount);
  44. // return IUnknown for contained item by index
  45. HRESULT Item(
  46. [in] long lItem,
  47. [out] IUnknown** ppUnk);
  48. // return IUnknown for an object that implements IEnumVARIANT on
  49. // this collection
  50. [propget]
  51. HRESULT _NewEnum(
  52. [out, retval] IUnknown** ppUnk);
  53. }
  54. // core control providing state control
  55. [
  56. uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770),
  57. helpstring("IMediaControl interface"),
  58. odl,
  59. oleautomation,
  60. dual
  61. ]
  62. interface IMediaControl : IDispatch
  63. {
  64. // methods
  65. HRESULT Run();
  66. HRESULT Pause();
  67. HRESULT Stop();
  68. //returns the state. same semantics as IMediaFilter::GetState
  69. HRESULT GetState(
  70. [in] LONG msTimeout,
  71. [out] OAFilterState* pfs);
  72. // adds and connects filters needed to play the specified file
  73. // (same as IFilterGraph::RenderFile)
  74. HRESULT RenderFile(
  75. [in] BSTR strFilename);
  76. // adds to the graph the source filter that can read this file,
  77. // and returns an IFilterInfo object for it (actually returns
  78. // an IDispatch for the IFilterInfo object).
  79. HRESULT AddSourceFilter(
  80. [in] BSTR strFilename,
  81. [out] IDispatch**ppUnk);
  82. // get a collection of IFilterInfo objects representing the
  83. // filters in the graph (returns IDispatch for an object
  84. // that supports IAMCollection
  85. [propget]
  86. HRESULT FilterCollection(
  87. [out, retval] IDispatch** ppUnk);
  88. // get a collection of IRegFilter objects representing the
  89. // filters available in the registry
  90. [propget]
  91. HRESULT RegFilterCollection(
  92. [out, retval] IDispatch** ppUnk);
  93. HRESULT StopWhenReady();
  94. }
  95. // provides an event notification scheme passing events
  96. // asynchronously to applications. See also IMediaEventSink in
  97. // strmif.idl and sdk\h\evcodes.h.
  98. //
  99. // this interface behaves as if events are held on a queue. A call to
  100. // IMediaEventSink::Notify will place an event on this queue. Calling
  101. // GetEvent removes the first item off the queue and returns it. Items are
  102. // returned in the order they were queued (there is no priority scheme).
  103. // The event handle is in a signalled state iff the queue is non-empty.
  104. //
  105. // Apps that issue multiple Run calls without always picking up the
  106. // completion events are advised to call GetEvent or WaitForCompletion
  107. // (with a 0 timeout) repeatedly to remove all events from the queue
  108. // when in stopped or paused state before each Run method.
  109. //
  110. // Parameters to events are actually LONG, IUnknown* or BSTR. You need to
  111. // look at evcode.h for details of parameters to a specific event code.
  112. // In order to correctly free resources, always call FreeEventParams
  113. // after receiving an event.
  114. //
  115. [
  116. uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770),
  117. helpstring("IMediaEvent interface"),
  118. odl,
  119. oleautomation,
  120. dual
  121. ]
  122. interface IMediaEvent : IDispatch
  123. {
  124. // get back the event handle. This is manual-reset
  125. // (don't - it's reset by the event mechanism) and remains set
  126. // when events are queued, and reset when the queue is empty.
  127. HRESULT GetEventHandle(
  128. [out] OAEVENT * hEvent);
  129. // remove the next event notification from the head of the queue and
  130. // return it. Waits up to msTimeout millisecs if there are no events.
  131. // if a timeout occurs without any events, this method will return
  132. // E_ABORT, and the value of the event code and other parameters
  133. // is undefined.
  134. //
  135. // If this call returns successfully the caller MUST call
  136. // FreeEventParams(lEventCode, lParam1, lParam2) to release
  137. // resources held inside the event arguments
  138. //
  139. HRESULT GetEvent(
  140. [out] long * lEventCode,
  141. [out] LONG_PTR * lParam1,
  142. [out] LONG_PTR * lParam2,
  143. [in] long msTimeout
  144. );
  145. // Calls GetEvent repeatedly discarding events until it finds a
  146. // completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT).
  147. // The completion event is removed from the queue and returned
  148. // in pEvCode. Note that the object is still in running mode until
  149. // a Pause or Stop call is made.
  150. // If the timeout occurs, *pEvCode will be 0 and E_ABORT will be
  151. // returned.
  152. HRESULT WaitForCompletion(
  153. [in] long msTimeout,
  154. [out] long * pEvCode);
  155. // cancels any system handling of the specified event code
  156. // and ensures that the events are passed straight to the application
  157. // (via GetEvent) and not handled. A good example of this is
  158. // EC_REPAINT: default handling for this ensures the painting of the
  159. // window and does not get posted to the app.
  160. HRESULT CancelDefaultHandling(
  161. [in] long lEvCode);
  162. // restore the normal system default handling that may have been
  163. // cancelled by CancelDefaultHandling().
  164. HRESULT RestoreDefaultHandling( [in] long lEvCode);
  165. // Free any resources associated with the parameters to an event.
  166. // Event parameters may be LONGs, IUnknown* or BSTR. No action
  167. // is taken with LONGs. IUnknown are passed addrefed and need a
  168. // Release call. BSTR are allocated by the task allocator and will be
  169. // freed by calling the task allocator.
  170. HRESULT FreeEventParams(
  171. [in] long lEvCode,
  172. [in] LONG_PTR lParam1,
  173. [in] LONG_PTR lParam2
  174. );
  175. }
  176. [
  177. uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770),
  178. helpstring("IMediaEventEx interface"),
  179. odl
  180. ]
  181. interface IMediaEventEx : IMediaEvent
  182. {
  183. // Register a window to send messages to when events occur
  184. // Parameters:
  185. //
  186. // hwnd - handle of window to notify -
  187. // pass NULL to stop notification
  188. // lMsg - Message id to pass messages with
  189. // lInstanceData - will come back in lParam
  190. //
  191. // The event information must still be retrived by a call
  192. // to GetEvent when the window message is received.
  193. //
  194. // Multiple events may be notified with one window message.
  195. //
  196. HRESULT SetNotifyWindow(
  197. [in] OAHWND hwnd,
  198. [in] long lMsg,
  199. [in] LONG_PTR lInstanceData
  200. );
  201. // Turn events notification on or off
  202. // lNoNotify = 0x00 event notification is ON
  203. // lNoNotify = 0x01 event notification is OFF. The
  204. // handle returned by GetEventHandle will be signalled at
  205. // end of stream
  206. HRESULT SetNotifyFlags(
  207. [in] long lNoNotifyFlags
  208. );
  209. HRESULT GetNotifyFlags(
  210. [out] long *lplNoNotifyFlags
  211. );
  212. }
  213. // seek/cueing for positional media
  214. [
  215. uuid(56a868b2-0ad4-11ce-b03a-0020af0ba770),
  216. helpstring("IMediaPosition interface"),
  217. odl,
  218. oleautomation,
  219. dual
  220. ]
  221. interface IMediaPosition : IDispatch
  222. {
  223. // properties
  224. [propget]
  225. HRESULT Duration(
  226. [out, retval] REFTIME* plength);
  227. [propput]
  228. HRESULT CurrentPosition(
  229. [in] REFTIME llTime);
  230. [propget]
  231. HRESULT CurrentPosition(
  232. [out, retval] REFTIME* pllTime);
  233. [propget]
  234. HRESULT StopTime(
  235. [out, retval] REFTIME* pllTime);
  236. [propput]
  237. HRESULT StopTime(
  238. [in] REFTIME llTime);
  239. [propget]
  240. HRESULT PrerollTime(
  241. [out, retval] REFTIME* pllTime);
  242. [propput]
  243. HRESULT PrerollTime(
  244. [in] REFTIME llTime);
  245. [propput]
  246. HRESULT Rate(
  247. [in] double dRate);
  248. [propget]
  249. HRESULT Rate(
  250. [out, retval] double * pdRate);
  251. HRESULT CanSeekForward([out, retval] LONG *pCanSeekForward);
  252. HRESULT CanSeekBackward([out, retval] LONG *pCanSeekBackward);
  253. }
  254. // basic audio-related functionality
  255. [
  256. uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770),
  257. helpstring("IBasicAudio interface"),
  258. odl,
  259. oleautomation,
  260. dual
  261. ]
  262. interface IBasicAudio : IDispatch
  263. {
  264. // properties
  265. [propput]
  266. HRESULT Volume(
  267. [in] long lVolume);
  268. [propget]
  269. HRESULT Volume(
  270. [out, retval] long * plVolume);
  271. [propput]
  272. HRESULT Balance(
  273. [in] long lBalance);
  274. [propget]
  275. HRESULT Balance(
  276. [out, retval] long * plBalance);
  277. }
  278. // basic window-related functionality
  279. [
  280. uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770),
  281. helpstring("IVideoWindow interface"),
  282. odl,
  283. oleautomation,
  284. dual
  285. ]
  286. interface IVideoWindow : IDispatch
  287. {
  288. // properties
  289. // set and get the window title caption
  290. [propput]
  291. HRESULT Caption([in] BSTR strCaption);
  292. [propget]
  293. HRESULT Caption([out, retval] BSTR *strCaption);
  294. // change the window styles (as per Win32)
  295. [propput]
  296. HRESULT WindowStyle([in] long WindowStyle);
  297. [propget]
  298. HRESULT WindowStyle([out, retval] long *WindowStyle);
  299. // change the extended window styles (as per Win32)
  300. [propput]
  301. HRESULT WindowStyleEx([in] long WindowStyleEx);
  302. [propget]
  303. HRESULT WindowStyleEx([out, retval] long *WindowStyleEx);
  304. [propput]
  305. HRESULT AutoShow([in] long AutoShow);
  306. [propget]
  307. HRESULT AutoShow([out, retval] long *AutoShow);
  308. // change the window state (as per Win32)
  309. [propput]
  310. HRESULT WindowState([in] long WindowState);
  311. [propget]
  312. HRESULT WindowState([out, retval] long *WindowState);
  313. // realise the palette in the background
  314. [propput]
  315. HRESULT BackgroundPalette([in] long BackgroundPalette);
  316. [propget]
  317. HRESULT BackgroundPalette([out, retval] long *pBackgroundPalette);
  318. // affect the visibility of the window
  319. [propput]
  320. HRESULT Visible([in] long Visible);
  321. [propget]
  322. HRESULT Visible([out, retval] long *pVisible);
  323. // change the desktop position of the video window
  324. [propput]
  325. HRESULT Left([in] long Left);
  326. [propget]
  327. HRESULT Left([out, retval] long *pLeft);
  328. [propput]
  329. HRESULT Width([in] long Width);
  330. [propget]
  331. HRESULT Width([out, retval] long *pWidth);
  332. [propput]
  333. HRESULT Top([in] long Top);
  334. [propget]
  335. HRESULT Top([out, retval] long *pTop);
  336. [propput]
  337. HRESULT Height([in] long Height);
  338. [propget]
  339. HRESULT Height([out, retval] long *pHeight);
  340. // change the owning window of the video
  341. [propput]
  342. HRESULT Owner([in] OAHWND Owner);
  343. [propget]
  344. HRESULT Owner([out, retval] OAHWND *Owner);
  345. // change the window to receive posted messages
  346. [propput]
  347. HRESULT MessageDrain([in] OAHWND Drain);
  348. [propget]
  349. HRESULT MessageDrain([out, retval] OAHWND *Drain);
  350. [propget]
  351. HRESULT BorderColor([out, retval] long *Color);
  352. [propput]
  353. HRESULT BorderColor([in] long Color);
  354. [propget]
  355. HRESULT FullScreenMode([out, retval] long *FullScreenMode);
  356. [propput]
  357. HRESULT FullScreenMode([in] long FullScreenMode);
  358. // methods
  359. // ask the renderer to grab it's window the foreground
  360. // and optionally also give the window the input focus
  361. HRESULT SetWindowForeground([in] long Focus);
  362. // owners should pass WM_PALETTECHANGED and WM_SYSCOLORCHANGE
  363. // messages on the filter graph so they can be distributed
  364. // otherwise child renderers never see these messages go by
  365. HRESULT NotifyOwnerMessage([in] OAHWND hwnd,
  366. [in] long uMsg,
  367. [in] LONG_PTR wParam,
  368. [in] LONG_PTR lParam
  369. );
  370. // get and set the window position on the desktop
  371. HRESULT SetWindowPosition([in] long Left,
  372. [in] long Top,
  373. [in] long Width,
  374. [in] long Height);
  375. HRESULT GetWindowPosition([out] long *pLeft,
  376. [out] long *pTop,
  377. [out] long *pWidth,
  378. [out] long *pHeight);
  379. // get the ideal sizes for the video image playback (client) area
  380. HRESULT GetMinIdealImageSize([out] long *pWidth,[out] long *pHeight);
  381. HRESULT GetMaxIdealImageSize([out] long *pWidth,[out] long *pHeight);
  382. // get the restored window size when we're maximised or iconic
  383. HRESULT GetRestorePosition([out] long *pLeft,
  384. [out] long *pTop,
  385. [out] long *pWidth,
  386. [out] long *pHeight);
  387. // show and hide cursors useful when fullscreen
  388. HRESULT HideCursor([in] long HideCursor);
  389. HRESULT IsCursorHidden([out] long *CursorHidden);
  390. }
  391. // basic video-related functionality
  392. [
  393. uuid(56a868b5-0ad4-11ce-b03a-0020af0ba770),
  394. helpstring("IBasicVideo interface"),
  395. odl,
  396. oleautomation,
  397. dual
  398. ]
  399. interface IBasicVideo : IDispatch
  400. {
  401. // properties
  402. // Video specific (approximate) bit and frame rates
  403. [propget]
  404. HRESULT AvgTimePerFrame([out, retval] REFTIME *pAvgTimePerFrame);
  405. [propget]
  406. HRESULT BitRate([out, retval] long *pBitRate);
  407. [propget]
  408. HRESULT BitErrorRate([out, retval] long *pBitErrorRate);
  409. // read the native video size
  410. [propget]
  411. HRESULT VideoWidth([out, retval] long *pVideoWidth);
  412. [propget]
  413. HRESULT VideoHeight([out, retval] long *pVideoHeight);
  414. // change the source rectangle for the video
  415. [propput]
  416. HRESULT SourceLeft([in] long SourceLeft);
  417. [propget]
  418. HRESULT SourceLeft([out, retval] long *pSourceLeft);
  419. [propput]
  420. HRESULT SourceWidth([in] long SourceWidth);
  421. [propget]
  422. HRESULT SourceWidth([out, retval] long *pSourceWidth);
  423. [propput]
  424. HRESULT SourceTop([in] long SourceTop);
  425. [propget]
  426. HRESULT SourceTop([out, retval] long *pSourceTop);
  427. [propput]
  428. HRESULT SourceHeight([in] long SourceHeight);
  429. [propget]
  430. HRESULT SourceHeight([out, retval] long *pSourceHeight);
  431. // change the destination rectangle for the video
  432. [propput]
  433. HRESULT DestinationLeft([in] long DestinationLeft);
  434. [propget]
  435. HRESULT DestinationLeft([out, retval] long *pDestinationLeft);
  436. [propput]
  437. HRESULT DestinationWidth([in] long DestinationWidth);
  438. [propget]
  439. HRESULT DestinationWidth([out, retval] long *pDestinationWidth);
  440. [propput]
  441. HRESULT DestinationTop([in] long DestinationTop);
  442. [propget]
  443. HRESULT DestinationTop([out, retval] long *pDestinationTop);
  444. [propput]
  445. HRESULT DestinationHeight([in] long DestinationHeight);
  446. [propget]
  447. HRESULT DestinationHeight([out, retval] long *pDestinationHeight);
  448. // methods
  449. // get and set the source rectangle position
  450. HRESULT SetSourcePosition([in] long Left,
  451. [in] long Top,
  452. [in] long Width,
  453. [in] long Height);
  454. HRESULT GetSourcePosition([out] long *pLeft,
  455. [out] long *pTop,
  456. [out] long *pWidth,
  457. [out] long *pHeight);
  458. HRESULT SetDefaultSourcePosition();
  459. // get and set the destination rectangle position
  460. HRESULT SetDestinationPosition([in] long Left,
  461. [in] long Top,
  462. [in] long Width,
  463. [in] long Height);
  464. HRESULT GetDestinationPosition([out] long *pLeft,
  465. [out] long *pTop,
  466. [out] long *pWidth,
  467. [out] long *pHeight);
  468. HRESULT SetDefaultDestinationPosition();
  469. // get the native video dimensions
  470. HRESULT GetVideoSize([out] long *pWidth,[out] long *pHeight);
  471. // get all or some of the current video palette
  472. HRESULT GetVideoPaletteEntries([in] long StartIndex,
  473. [in] long Entries,
  474. [out] long *pRetrieved,
  475. [out] long *pPalette);
  476. HRESULT GetCurrentImage([in,out] long *pBufferSize,
  477. [out] long *pDIBImage);
  478. // are we using a default source or destination
  479. HRESULT IsUsingDefaultSource();
  480. HRESULT IsUsingDefaultDestination();
  481. }
  482. // interface extension to IBasicVideo to return preferred aspect ratio
  483. [
  484. uuid(329bb360-f6ea-11d1-9038-00a0c9697298),
  485. helpstring("IBasicVideo2"),
  486. odl
  487. ]
  488. interface IBasicVideo2 : IBasicVideo
  489. {
  490. // This may not match the native video dimensions because of
  491. // non-square pixels or whatever.
  492. // The video may not always be displayed in the preferred
  493. // aspect ratio for performance reasons
  494. HRESULT GetPreferredAspectRatio([out] long *plAspectX,
  495. [out] long *plAspectY);
  496. }
  497. // interface returned to a command that has been queued via IQueueCommand
  498. [
  499. uuid(56a868b8-0ad4-11ce-b03a-0020af0ba770),
  500. helpstring("IDeferredCommand"),
  501. odl
  502. ]
  503. interface IDeferredCommand : IUnknown
  504. {
  505. HRESULT Cancel();
  506. HRESULT Confidence(
  507. [out] LONG* pConfidence);
  508. HRESULT Postpone(
  509. [in] REFTIME newtime);
  510. // return value is S_OK if completed. phrResult is set to the
  511. // result of the deferred command.
  512. HRESULT GetHResult(
  513. [out] HRESULT* phrResult);
  514. };
  515. // queue an IDispatch-based command for execution at a specified time
  516. [
  517. uuid(56a868b7-0ad4-11ce-b03a-0020af0ba770),
  518. helpstring("IQueueCommand"),
  519. odl
  520. ]
  521. interface IQueueCommand : IUnknown
  522. {
  523. HRESULT InvokeAtStreamTime(
  524. [out] IDeferredCommand** pCmd,
  525. [in] REFTIME time, // at this streamtime
  526. [in] GUID* iid, // call this interface
  527. [in] long dispidMethod, // ..and this method
  528. [in] short wFlags, // method/property
  529. [in] long cArgs, // count of args
  530. [in] VARIANT* pDispParams, // actual args
  531. [in, out] VARIANT* pvarResult, // return value
  532. [out] short* puArgErr // which arg in error
  533. );
  534. HRESULT InvokeAtPresentationTime(
  535. [out] IDeferredCommand** pCmd,
  536. [in] REFTIME time, // at this presentation time
  537. [in] GUID* iid, // call this interface
  538. [in] long dispidMethod, // ..and this method
  539. [in] short wFlags, // method/property
  540. [in] long cArgs, // count of args
  541. [in] VARIANT* pDispParams, // actual args
  542. [in, out] VARIANT* pvarResult, // return value
  543. [out] short* puArgErr // which arg in error
  544. );
  545. };
  546. // the filgraph object (CLSID_Filgraph)
  547. [
  548. uuid(e436ebb3-524f-11ce-9f53-0020af0ba770),
  549. helpstring("Filtergraph type info")
  550. ]
  551. coclass FilgraphManager
  552. {
  553. [default] interface IMediaControl;
  554. interface IMediaEvent;
  555. interface IMediaPosition;
  556. interface IBasicAudio;
  557. interface IBasicVideo;
  558. interface IVideoWindow;
  559. };
  560. // represents a filter (you can't QI for IBaseFilter from this object)
  561. [
  562. uuid(56a868ba-0ad4-11ce-b03a-0020af0ba770),
  563. helpstring("FilterInfo"),
  564. odl,
  565. oleautomation,
  566. dual
  567. ]
  568. interface IFilterInfo : IDispatch
  569. {
  570. // find a pin given an id - returns an object supporting
  571. // IPinInfo
  572. HRESULT FindPin(
  573. [in] BSTR strPinID,
  574. [out] IDispatch** ppUnk);
  575. // filter name
  576. [propget]
  577. HRESULT Name(
  578. [out, retval] BSTR* strName);
  579. // Vendor info string
  580. [propget]
  581. HRESULT VendorInfo(
  582. [out, retval] BSTR* strVendorInfo);
  583. // returns the actual filter object (supports IBaseFilter)
  584. [propget]
  585. HRESULT Filter(
  586. [out, retval] IUnknown **ppUnk);
  587. // returns an IAMCollection object containing the PinInfo objects
  588. // for this filter
  589. [propget]
  590. HRESULT Pins(
  591. [out, retval] IDispatch ** ppUnk);
  592. // returns -1 if true or 0 if false (OATRUE/FALSE)
  593. [propget]
  594. HRESULT IsFileSource(
  595. [out, retval] LONG * pbIsSource);
  596. [propget]
  597. HRESULT Filename(
  598. [out, retval] BSTR* pstrFilename);
  599. [propput]
  600. HRESULT Filename(
  601. [in] BSTR strFilename);
  602. }
  603. [
  604. uuid(56a868bb-0ad4-11ce-b03a-0020af0ba770),
  605. helpstring("Registry Filter Info"),
  606. odl,
  607. oleautomation,
  608. dual
  609. ]
  610. interface IRegFilterInfo : IDispatch
  611. {
  612. // get the name of this filter
  613. [propget]
  614. HRESULT Name(
  615. [out, retval] BSTR* strName);
  616. // make an instance of this filter, add it to the graph and
  617. // return an IFilterInfo for it.
  618. HRESULT Filter(
  619. [out] IDispatch** ppUnk);
  620. }
  621. // wrapper for a media type
  622. [
  623. uuid(56a868bc-0ad4-11ce-b03a-0020af0ba770),
  624. helpstring("Media Type"),
  625. odl,
  626. oleautomation,
  627. dual
  628. ]
  629. interface IMediaTypeInfo : IDispatch
  630. {
  631. // get the major type GUID as a string
  632. [propget]
  633. HRESULT Type(
  634. [out, retval] BSTR* strType);
  635. // get the subtype GUID as a string
  636. [propget]
  637. HRESULT Subtype(
  638. [out, retval] BSTR* strType);
  639. }
  640. [
  641. uuid(56a868bd-0ad4-11ce-b03a-0020af0ba770),
  642. helpstring("Pin Info"),
  643. odl,
  644. oleautomation,
  645. dual
  646. ]
  647. interface IPinInfo : IDispatch
  648. {
  649. // get the pin object (IUnknown for an object that
  650. // supports IPin
  651. [propget]
  652. HRESULT Pin(
  653. [out, retval] IUnknown** ppUnk);
  654. // get the PinInfo object for the pin we are connected to
  655. [propget]
  656. HRESULT ConnectedTo(
  657. [out, retval] IDispatch** ppUnk);
  658. // get the media type on this connection - returns an
  659. // object supporting IMediaTypeInfo
  660. [propget]
  661. HRESULT ConnectionMediaType(
  662. [out, retval] IDispatch** ppUnk);
  663. // return the FilterInfo object for the filter this pin
  664. // is part of
  665. [propget]
  666. HRESULT FilterInfo(
  667. [out, retval] IDispatch** ppUnk);
  668. // get the name of this pin
  669. [propget]
  670. HRESULT Name(
  671. [out, retval] BSTR* ppUnk);
  672. // pin direction
  673. [propget]
  674. HRESULT Direction(
  675. [out, retval] LONG *ppDirection);
  676. // PinID - can pass to IFilterInfo::FindPin
  677. [propget]
  678. HRESULT PinID(
  679. [out, retval] BSTR* strPinID);
  680. // collection of preferred media types (IAMCollection)
  681. [propget]
  682. HRESULT MediaTypes(
  683. [out, retval] IDispatch** ppUnk);
  684. // Connect to the following pin, using other transform
  685. // filters as necessary. pPin can support either IPin or IPinInfo
  686. HRESULT Connect(
  687. [in] IUnknown* pPin);
  688. // Connect directly to the following pin, not using any intermediate
  689. // filters
  690. HRESULT ConnectDirect(
  691. [in] IUnknown* pPin);
  692. // Connect directly to the following pin, using the specified
  693. // media type only. pPin is an object that must support either
  694. // IPin or IPinInfo, and pMediaType must support IMediaTypeInfo.
  695. HRESULT ConnectWithType(
  696. [in] IUnknown * pPin,
  697. [in] IDispatch * pMediaType);
  698. // disconnect this pin and the corresponding connected pin from
  699. // each other. (Calls IPin::Disconnect on both pins).
  700. HRESULT Disconnect(void);
  701. // render this pin using any necessary transform and rendering filters
  702. HRESULT Render(void);
  703. }
  704. //--------------------------------------------------------------------
  705. //
  706. // IAMStats - statistics
  707. //
  708. // Note that the calls using an index are likely to be much faster
  709. //--------------------------------------------------------------------
  710. [
  711. uuid(bc9bcf80-dcd2-11d2-abf6-00a0c905f375),
  712. helpstring("Statistics"),
  713. odl,
  714. oleautomation,
  715. dual
  716. ]
  717. interface IAMStats : IDispatch {
  718. // Reset all stats
  719. HRESULT Reset();
  720. // Get number of stats collected
  721. [propget]
  722. HRESULT Count(
  723. [out, retval] LONG* plCount);
  724. // Pull out a specific value by position
  725. HRESULT GetValueByIndex([in] long lIndex,
  726. [out] BSTR *szName,
  727. [out] long *lCount,
  728. [out] double *dLast,
  729. [out] double *dAverage,
  730. [out] double *dStdDev,
  731. [out] double *dMin,
  732. [out] double *dMax);
  733. // Pull out a specific value by name
  734. HRESULT GetValueByName([in] BSTR szName,
  735. [out] long *lIndex,
  736. [out] long *lCount,
  737. [out] double *dLast,
  738. [out] double *dAverage,
  739. [out] double *dStdDev,
  740. [out] double *dMin,
  741. [out] double *dMax);
  742. // The calls below are for generators of statistics
  743. // Return the index for a string - optinally create
  744. HRESULT GetIndex([in] BSTR szName,
  745. [in] long lCreate,
  746. [out] long *plIndex);
  747. // Add a new value
  748. HRESULT AddValue([in] long lIndex,
  749. [in] double dValue);
  750. }
  751. };