Programming Guide; Directshow Programming Guide - ADLINK Technology RTV Series User Manual

Multi-channel real-time video frame grabber series
Table of Contents

Advertisement

6

Programming Guide

6.1 DirectShow Programming Guide

Introduction
A complete documentation on DirectShow application program-
ming can be found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/directx9_c/directX/htm/introductiontodirectshow.asp.
If a DirectX 9.0 is installed, this documentation is also available
from DirectX SDK Help.
The main goal of writing a DirectShow Application is to build a filter
graph by connecting several filters together to perform a given
task such as previewing video/audio, capturing video/audio and
multiplexing them to write into a file. Each filter performs a single
operation and pass data from its output pin to the input pin of the
next filter in the graph.
To build a capture graph using a program, the first thing is to
obtain the interface pointer of the capture filter. The ADLink Bt878
Video Capture filter can be obtained through system device enu-
merator. After holding an interface pointer to the capture filter
object, use method IGraphBuilder::AddSourceFilter to add the
source filter object to the filter graph. Use IFilterGraph::AddFilter
to add other downstream filters to the filter graph. After filters are
added,
call
IFilterGraph::ConnectDirect
or
IGraph-
Builder::Connect methods to connect output pins from upstream
filters to the input pins of the downstream filters. Calling methods
IMediaControl::Run, IMediaControl::Pause or IMediaCon-
trol::Stop will change filter state to running, paused or stopped.
The filters that are needed for capturing video streams are listed in
next section, with detailed information for each filter and its pins.
Example filter graphs for previewing/capturing video streams are
also illustrated in this chapter and gives examples of two ways of
controlling device driver.
Descriptions of Filters
This section lists filters needed to build a filter graph for capturing
video stream and previewing video stream.
Programming Guide
135

Advertisement

Table of Contents
loading

Table of Contents