www.pudn.com > AVideoCapture.rar > OptionsSetUnt.pas
unit OptionsSetUnt;
interface
uses
LiveSrvCastUnt, MainUnt, Windows, Messages, Sysutils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, CoolTrayIcon, ExtCtrls, Inifiles;
type
TOptionsSet = class(TForm)
YesBtn: TButton;
NoBtn: TButton;
SetPageCtrl: TPageControl;
AVideoTabSht: TTabSheet;
CommunicateTabSht: TTabSheet;
AudeoGroupBox: TGroupBox;
VideoGroupBox: TGroupBox;
VideoCardComBox: TComboBox;
VideoSourceComBox: TComboBox;
Label1: TLabel;
Label2: TLabel;
Label23: TLabel;
AudeoCardComBox: TComboBox;
Label8: TLabel;
AudeoSourceComBox: TComboBox;
ServerGroupBox: TGroupBox;
TCPGroupBox: TGroupBox;
LocallGroupBox: TGroupBox;
ServerIPAddrComBox: TComboBox;
Label3: TLabel;
ServerIPPortComBox: TComboBox;
Label4: TLabel;
LocalIPAddrComBox: TComboBox;
Label7: TLabel;
LocalIPPortComBox: TComboBox;
Label9: TLabel;
Label10: TLabel;
TCPSendPortComBox: TComboBox;
TCPListenComboBox: TComboBox;
Label5: TLabel;
procedure ComboBoxDropDown(Sender: TObject);
procedure BtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
OptionsSet: TOptionsSet;
implementation
uses CastOprUnt, AVideoFunctionUnt, AVideoStatusUnt;
{$R *.dfm}
procedure TOptionsSet.ComboBoxDropDown(Sender: TObject);
var
i: Integer;
begin
case TComboBox(Sender).tag of
0: begin //增加音频卡
AudeoCardComBox.Items.Clear;
for i := 0 to 2 do
if audeoCard[i].Name <> '' then
AudeoCardComBox.Items.Add(audeoCard[i].Name);
end;
2: begin //增加视频卡
VideoCardComBox.Items.Clear;
for i := 0 to 2 do
if videoCard[i].Name <> '' then
VideoCardComBox.Items.Add(videoCard[i].Name);
end;
1: begin //增加音频源
AudeoSourceComBox.Items.Clear;
if AudeoCardComBox.ItemIndex >= 0 then
for i := 0 to 9 do
if (audeoCard[AudeoCardComBox.ItemIndex].Source[i] <> '') then
AudeoSourceComBox.Items.Add(audeoCard[AudeoCardComBox.ItemIndex].Source[i]);
end;
3: begin //增加视频源
VideoSourceComBox.Items.Clear;
if VideoCardComBox.ItemIndex >= 0 then
for i := 0 to 9 do
if (videoCard[VideoCardComBox.ItemIndex].Source[i] <> '') then
VideoSourceComBox.Items.Add(videoCard[VideoCardComBox.ItemIndex].Source[i]);
end;
6: begin //增加本地IP
LocalIPAddrComBox.Items.Clear;
for i := 0 to 2 do
if localIPSrc[i].Addr <> '' then
LocalIPAddrComBox.Items.Add(localIPSrc[i].Addr);
end;
end;
end;
procedure TOptionsSet.BtnClick(Sender: TObject);
begin
case TButton(Sender).tag of
0: begin //确定
end;
1: begin //取消
close;
end;
end;
end;
procedure TOptionsSet.FormCreate(Sender: TObject);
begin
ServerIPAddrComBox.Items.Add(appliini.ReadString('Server_Socket', 'Addr', '192.168.0.1'));
ServerIPPortComBox.Items.Add(IntToStr(appliini.ReadInteger('Server_Socket', 'Port', 9908)));
LocalIPPortComBox.Items.Add(IntToStr(appliini.ReadInteger('Client_SFLive', 'TCPListenPort', 554)));
TCPSendPortComBox.Items.Add(IntToStr(appliini.ReadInteger('Client_SFLive', 'TCPSendPort', 8090)));
TCPListenComboBox.Items.Add(IntToStr(appliini.ReadInteger('Client_SFLive', 'TCPListenPort', 554)));
end;
end.