Programming Guide
135
6
Programming Guide
6.1 DirectShow Programming Guide
Introduction
A complete documentation on DirectShow application program-
ming can be found at:
.
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.
Summary of Contents for cRTV-24
Page 4: ......
Page 8: ...List of Tables iv Table 5 2 C C Data Types 83 Table 5 3 Pixel Data 122 ...
Page 10: ......
Page 18: ...8 Introduction ...
Page 34: ...24 Hardware Reference Figure 2 8 STRG Address Jumpers ...
Page 55: ...Installation Guide 45 Figure 3 2 cRTV 24 3U cPCI ...
Page 61: ...Installation Guide 51 ...
Page 62: ...52 Installation Guide ...
Page 64: ...54 Installation Guide The Device Manager should be as follows ...
Page 67: ...Installation Guide 57 ...
Page 68: ...58 Installation Guide 3 When the following window appears please click Con tinue Anyway ...
Page 70: ...60 Installation Guide The Device Manager should be as follows ...
Page 72: ...62 Installation Guide 3 Click the Finish button to finish the installation ...
Page 76: ...66 Installation Guide ...
Page 144: ...134 Function Library ...
Page 174: ...164 Programming Guide ...