
| 语言: | .NET C#/Visual Basic |
| 版本: | 3.0.3 |
| 发布于: | 2005年4月7日 |
| 作者: | IC Imaging Control 技术支持部 |
| 系统要求: | IC Imaging Control >2.1 由WDM数据流类驱动程序驱动的相机、视频转换器或图像采集卡 |
| |
示例程序窗口如下图所示:

首先,向程序窗体中放置 IC Imaging Control 控件和两个用于控制视频录制的按钮。
程序开始运行后先调用内置对话框用于选择一台视频捕捉设备(.ShowDeviceSettingsDialog)。 而后,通过LiveStart显示设备传来的现场视频数据流:
[C#] private void Form1_Load(object sender, System.EventArgs e) { icImagingControl1.ShowDeviceSettingsDialog(); if( !icImagingControl1.DeviceValid ) { Close(); return; } btnStopCapture.Enabled = false; icImagingControl1.LiveStart(); }
用户点击"Start Capture AVI",程序停止显示现场视频(.LiveStop),创建一个AVI文件(.AviStartCapture)。
点击"Stop Capture AVI"将关闭这个AVI文件(.AviStopCapture),开启视频数据流(.LiveStart):
[C#] private void btnStartCapture_Click(object sender, System.EventArgs e) { icImagingControl1.LiveStop(); icImagingControl1.AviStartCapture( "video.avi", "DV Video Encoder" ); btnStartCapture.Enabled = false; btnStopCapture.Enabled = true; } private void btnStopCapture_Click(object sender, System.EventArgs e) { icImagingControl1.AviStopCapture(); icImagingControl1.LiveStart(); btnStopCapture.Enabled = false; btnStartCapture.Enabled = true; }
责任声明
IC Imaging Control 源代码库中的所有代码均只用于教学目的,The Imaging Source Europe GmbH 作为IC Imaging Control的开发制造商,不对任何由于使用本文或其中源代码所产生的后果承担责任。