2012-06-06

Filtergraph documentation

The previous post introduced my plan of creating a filter graph library to make it easy to integrate different audio/video systems.

This post will contain design notes on the filter graph library for my own reference.

Notes:
  • I will specify a precise terminology to make it simple to talk about the various parts of the system. 
  • I will use some "plumber" analogies as a basis for my terminology.
  • I will use boost::signal for propagating events about changes to the graph structure as well as the flow of data through the graph.
  • I will separate the concerns of graph structure from the concerns about data passing through the graph so that the filter graph code may be used to build graphs that can handle buffers of any kind.
Filtergraph terminology illustration

Terminology:
  • Graph: A system of one or more nodes linked together.
  • Node: A single component in the graph.
  • Pad: A connection point on a node which can be connected to exactly one other pad on another node. Can be either an input or an output.
  • Source: A node that has only output pad(s) and no input pads.
  • Sink: A node that has only input pad(s) and no output pads.
  • Filter: A node that has both input and output pad(s)
  • Connection: A link from an output pad of one node to an input pad of another node.
  • Pump: A node that determines the flow of control throughout the graph. When a node pushing data from node(s) connected to its output(s) or by pulling data from node(s) connected to its input(s) is said to ac as a pump. Usually there is a single source or sink in the graph acting as pump.
  • Simple: A node with only one input pad and/or one output pad is said to be simple. This makes it possible to talk about such things as "simple sink", or "simple filter pump".
  • Buffer: A piece of data traveling though the graph. For video the content of the buffer usually corresponds to one frame of video. For audio, it usually corresponds to a certain length of time in audio samples.


No comments:

Post a Comment