2011年1月31日 星期一

[MultiMedia] How to Build the Filter Graph

Building the Filter Graph
  1. Filter Graph Manager
    • CLSID_FilterGraph: Creates the Filter Graph Manager on a shared worker thread. (通常都用CLSID_FilterGraph)
    • CLSID_FilterGraphNoThread: Creates the Filter Graph Manager on the application thread. 
  2. IGraphBuilder Interface
    • Connect: Connects two pins. If they will not connect directly, this method connects them with intervening transforms.
    • Render: Adds a chain of filters to a specified output pin to render it. (將Source的output pin 試著connect到已Add的filter)
    • RenderFile: Builds a filter graph that renders the specified file. (也就是AutoRender)
    • AddSourceFilter: Adds a source filter to the filter graph for a specific file. 
  3. IMediaControl Interface
    • Run: Runs all the filters in the filter graph.
    • Pause: Pauses all filters in the filter graph.
    • Stop: Stops all the filters in the filter graph.
    • StopWhenReady: Pauses the filter graph, allowing filters to queue data, and then stops the filter graph.
    • GetState: Retrieves the state of the filter graph. 
  4. IMediaEventEx Interface
    • SetNotifyWindow: Registers a window to process event notifications.
    • SetNotifyFlags: Enables or disables event notifications.
    • GetNotifyFlags: Determines whether event notifications are enabled. 
    Reference

    沒有留言:

    張貼留言