motion/CaptureDeviceForm.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using dshow;
using dshow.Core;
namespace motion
{
/// <summary>
/// Summary description for CaptureDeviceForm.
/// </summary>
public class CaptureDeviceForm : System.Windows.Forms.Form
{
FilterCollection filters;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox deviceCombo;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private string device;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
// Device
public string Device
{
get { return device; }
}
// Constructor
public CaptureDeviceForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
try
{
filters = new FilterCollection(FilterCategory.VideoInputDevice);
if (filters.Count == 0)
throw new ApplicationException();
// add all devices to combo
foreach (Filter filter in filters)
{
deviceCombo.Items.Add(filter.Name);
}
}
catch (ApplicationException)
{
deviceCombo.Items.Add("No local capture devices");
deviceCombo.Enabled = false;
okButton.Enabled = false;
后面还有 98 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。