home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / iamovie.idl < prev    next >
Text File  |  1998-04-25  |  6KB  |  147 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. [
  13. object,
  14. uuid(359ace10-7688-11cf-8b23-00805f6cef60),
  15. pointer_default(unique)
  16. ]
  17. interface IAMovie : IFilterGraph
  18. {
  19.         // IGraphBuilder
  20.         // Connect these two pins directly or indirectly, using transform filters
  21.         // if necessary.
  22.  
  23.         HRESULT Connect
  24.         ( [in] IPin * ppinOut,    // the output pin
  25.           [in] IPin * ppinIn      // the input pin
  26.         );
  27.  
  28.  
  29.         // Connect this output pin directly or indirectly, using transform filters
  30.         // if necessary to something that will render it.
  31.  
  32.         HRESULT Render
  33.         ( [in] IPin * ppinOut     // the output pin
  34.         );
  35.  
  36.  
  37.         // IMediaControl methods
  38.         HRESULT Run();
  39.         HRESULT Pause();
  40.         HRESULT Stop();
  41.  
  42.         //returns the state. same semantics as IMediaFilter::GetState
  43.  
  44.         HRESULT GetState(
  45.                     [in] LONG msTimeout,
  46.                     [out] FILTER_STATE* pfs);
  47.  
  48.         // adds and connects filters needed to play the specified file
  49.         HRESULT RenderFile(
  50.                     [in] LPCWSTR strFilename);
  51.  
  52.         // adds to the graph the source filter that can read this file,
  53.         // and returns an IFilterInfo object for it
  54.         HRESULT AddSourceFilter(
  55.                     [in] LPCWSTR strFilename,
  56.                     [out] IBaseFilter ** ppUnk);
  57.  
  58.         // get back the event handle. This is manual-reset
  59.         // (don't - it's reset by the event mechanism) and remains set
  60.         // when events are queued, and reset when the queue is empty.
  61.         HRESULT GetEventHandle(
  62.                         [out] HEVENT * hEvent);
  63.  
  64.         // remove the next event notification from the head of the queue and
  65.         // return it. Waits up to msTimeout millisecs if there are no events.
  66.         // if a timeout occurs without any events, this method will return
  67.         // E_ABORT, and the value of the event code and other parameters
  68.         // is undefined.
  69.         HRESULT GetEvent(
  70.                         [out] long * lEventCode,
  71.                         [out] long * lParam1,
  72.                         [out] long * lParam2,
  73.                         [in] long msTimeout
  74.                         );
  75.  
  76.         // Calls GetEvent repeatedly discarding events until it finds a
  77.         // completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT).
  78.         // The completion event is removed from the queue and returned
  79.         // in pEvCode. Note that the object is still in running mode until
  80.         // a Pause or Stop call is made.
  81.         // If the timeout occurs, *pEvCode will be 0 and E_ABORT will be
  82.         // returned.
  83.         HRESULT WaitForCompletion(
  84.                         [in] long msTimeout,
  85.                         [out] long * pEvCode);
  86.  
  87.         // cancels any system handling of the specified event code
  88.         // and ensures that the events are passed straight to the application
  89.         // (via GetEvent) and not handled. A good example of this is
  90.         // EC_REPAINT: default handling for this ensures the painting of the
  91.         // window and does not get posted to the app.
  92.         HRESULT CancelDefaultHandling(
  93.                         [in] long lEvCode);
  94.  
  95.         // restore the normal system default handling that may have been
  96.         // cancelled by CancelDefaultHandling().
  97.         HRESULT RestoreDefaultHandling( [in] long lEvCode);
  98.  
  99.         // properties
  100.         HRESULT get_Duration(
  101.                     [out] REFTIME* plength);
  102.  
  103.         HRESULT put_CurrentPosition(
  104.                     [in] REFTIME llTime);
  105.  
  106.         HRESULT get_CurrentPosition(
  107.                     [out] REFTIME* pllTime);
  108.  
  109.         HRESULT get_StopTime(
  110.                     [out] REFTIME* pllTime);
  111.  
  112.         HRESULT put_StopTime(
  113.                     [in] REFTIME llTime);
  114.  
  115.         HRESULT get_PrerollTime(
  116.                     [out] REFTIME* pllTime);
  117.         HRESULT put_PrerollTime(
  118.                     [in] REFTIME llTime);
  119.  
  120.         HRESULT put_Rate(
  121.                     [in] double dRate);
  122.         HRESULT get_Rate(
  123.                     [out] double * pdRate);
  124.  
  125.     /* New methods */
  126.     HRESULT RemoveAllFilters();
  127.     HRESULT Play();
  128.     HRESULT PlayFile([in] LPCWSTR strFilename);
  129.     HRESULT EnumFiltersByInterface( [in] REFIID riid, [out] IEnumFilters ** ppEnum );
  130.     HRESULT EnumPins( [out] IEnumPins ** ppEnum );
  131.     HRESULT EnumPinsIn( [out] IEnumPins ** ppEnum );
  132.     HRESULT EnumPinsOut( [out] IEnumPins ** ppEnum );
  133.     HRESULT RenderAll();
  134.     HRESULT RenderNewFile( [in] LPCWSTR strFilename);
  135.  
  136.     // Free any resources associated with the parameters to an event.
  137.         // Event parameters may be LONGs, IUnknown* or BSTR. No action
  138.         // is taken with LONGs. IUnknown are passed addrefed and need a
  139.         // Release call. BSTR are allocated by the task allocator and will be
  140.         // freed by calling the task allocator.
  141.         HRESULT FreeEventParams(
  142.                 [in] long lEvCode,
  143.                         [in] long lParam1,
  144.                         [in] long lParam2);
  145. }
  146.  
  147.