MediaStreamSink.MediaStreamSink Method

Creates a new MediaStreamSink.
Syntax:
[C#]
Public MediaStreamSink MediaStreamSink( AviCompressor codec, String filename );
Parameter Description
codec

Specifies the codec to be used by the MediaStreamSink.

filename

Specifies the filename, to used by the MediaStreamSink when writing an AVI file.

Information:

Introduced in version 3.1

Example:

The following code fragment shows how to select a codec and create a MediaStreamSink to record an AVI file. After doing so a two second AVI file is recorded.

[C#]
AviCompressor Codec = null; //Set DV Video encoder as codec. foreach( AviCompressor codec in AviCompressor.AviCompressors ) { if( codec.Name == "DV Video Encoder" ) { Codec = codec; break; } } // Create the MediaStreamSink using the selected codec and a filename. MediaStreamSink MSSink = new MediaStreamSink(Codec, "Test.AVI"); // Set the sink. ICImagingControl1.Sink = MSSink; // Start recording for two seconds. ICImagingControl1.LiveStart(); System.Threading.Thread.Sleep(2000); ICImagingControl1.LiveStop();
See also: ICImagingControl, ICImagingControl.LivePrepare, ICImagingControl.LiveStart, ICImagingControl.LiveVideoRunning

<< MediaStreamSink