home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / control.odl < prev    next >
Text File  |  1998-04-25  |  28KB  |  838 lines

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