⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 options.pas

📁 适用于网络监控,视频聊天,网络VOD等多媒体数据流的网络传输与回放.控件包目前包括三个控件
💻 PAS
字号:
unit Options;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, DSPack, DSUtil, DirectShow9, CheckLst;

type
  TOptionForm = class(TForm)
    GroupBox1: TGroupBox;
    GroupBox2: TGroupBox;
    Button1: TButton;
    Button2: TButton;
    ListBox1: TListBox;
    ListBox2: TListBox;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure GetInputIndex(var a, b: Integer);
  end;

var
  OptionForm: TOptionForm;
  SysDev1: TSysDevEnum;
  SysDev2: TSysDevEnum;
  ai: Integer;
  bi: Integer;

implementation

{$R *.dfm}

procedure TOptionForm.GetInputIndex(var a, b: Integer);
begin
  a := ai;
  b := bi;
end;

procedure TOptionForm.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  ListBox1.Clear;
  SysDev1 := TSysDevEnum.Create(CLSID_VideoInputDeviceCategory);
  for i := 0 to SysDev1.CountFilters - 1 do
  begin
    ListBox1.AddItem(SysDev1.Filters[i].FriendlyName, nil);
  end;
  ListBox1.ItemIndex := 0;
  ListBox2.Clear;
  SysDev2 := TSysDevEnum.Create(CLSID_AudioInputDeviceCategory);
  for i := 0 to SysDev2.CountFilters - 1 do
  begin
    ListBox2.AddItem(SysDev2.Filters[i].FriendlyName, nil);
  end;
  ListBox2.ItemIndex := 0;
end;

procedure TOptionForm.Button1Click(Sender: TObject);
begin
  ai := ListBox1.ItemIndex;
  bi := ListBox2.ItemIndex;
  Close;
end;

procedure TOptionForm.Button2Click(Sender: TObject);
begin
  ai := 0;
  bi := 0;
  Close;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -