Mediums and categories
Traditionally, Microsoft DirectShow streams have been identified solely by their Media Type. While this is sufficient for rendering simple filter graphs, more complex graphs and graphs that reflect a hardware topology require additional information for correct graph building. To enable filter graph building to correctly identify and connect pins, video capture minidrivers specify stream categories that their pins belong to, as well as mediums.
Stream categories are a method to identify the primary purpose of a pin. For example, a capture filter could have two output pins with identical MediaTypes supported on each pin. In the case where the filter gives priority to one of the pins, the higher-priority pin could be assigned to the capture stream category (PINNAME_VIDEO_CAPTURE), and the lower-priority pin to the preview stream category (PINNAME_VIDEO_PREVIEW).
Mediums are a method to ensure connectivity between two pins on separate filters, such as the analog audio output pin on a TV tuner filter (to support TV audio), and TV Audio input pin on a TV Audio filter. One way to think of a medium is that it identifies a wire between the output pin of one filter and the input pin of another filter.
The DirectShow graph builder interfaces, IFilterMapper2 and ICaptureGraphBuilder, use these methods to construct filter graphs based on both mediums and stream categories.