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