Friday, September 16, 2011

DirectShow tutorial for windows mobile - Part II

Filter Graph Manager (FGM)

As you have seen in the first part of this tutorial (here) the atomic module of the direct show is a filter. Set of connected filters are used for processing a multimedia stream. This is called a filter graph. Most important feature of the DirectShow API is the Filter Graph Manager (FGM) which handles all the required operations for handling a filter graph.

If you are processing a multimedia stream with DirectShow, you don't need to look after each and every filter. FGM controls the flow of data through the filter graph. You only need to call high level API calls such as

  • Run - to move the data through the filter graph
  • Stop - to stop the data flow
FGM will take care about all the required operations with the filters. 

If the user want to handle the filters on his own, then user can use the "COM" interface to interact with filters. 

Another thing that FGM does is that passing the event notifications to the application, so that user application can respond to events such as
  • end of the stream
  • pause
  • stop
This process is done with the help of the Operating systems Message Queue. If end of the stream event is happened, OS will pass that message to the FGM. Then it will pass the relevant message to the application.

to be contd ...

No comments:

Post a Comment