The MediaStreamSink allows video files to be recorded in a more sophisticated manor than is possible using AviStartCapture and AviStopCapture. However, for simple tasks, the methods AviStartCapture and AviStopCapture are better suited, as they are really easy to use. A MediaStreamSink can save image data to video files in various formats and optionally allows you to specify one or more FrameFilters that can analyze and/or transform the image data, before it is written to the video file.
The FrameFilter implementation can also drop certain frames, thus enabling lapse recording applications to be easily authored. The video file format is specified by a MediaStreamContainer, while the format of the image data in the file is determined by a codec, represented as an AviCompressor object. The MediaStreamContainer determines the video file format; the most common MediaStreamContainer is AVI. Many media stream containers allow the specification of an AviCompressor to compress the image data before writing it to the file.
The following code fragment shows how to create a MediaStreamSink to record an AVI file:
Introduced in IC Imaging Control 3.0
BaseSink
MediaStreamSink
Property | Description | ||
Codec | Returns or sets the used AviCompressor. |
||
Filename | Returns or sets the name of the target video file. |
||
FrameFilters | The FrameFilters property grants access to a FrameFilters collection that can be used to manipulate the filter chain used to transform the image data, before it is written to the video file. |
||
StreamContainer | Returns or sets the used MediaStreamContainer. |
||