www.pudn.com > NetAudioVideo.v3.0.rar > Unit1.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdUDPBase, IdUDPClient, MVideocap,
SendVideo_XVID, StdCtrls, VideoAdd, ExtCtrls;
type
TForm1 = class(TForm)
SendVideo_VIDX1: TSendVideo_VIDX;
VideoCap1: TVideoCap;
IdUDPClient1: TIdUDPClient;
Button1: TButton;
Label1: TLabel;
Edit1: TEdit;
Memo1: TMemo;
VideoAdd1: TVideoAdd;
Image1: TImage;
Label2: TLabel;
Timer1: TTimer;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
VideoCap1.DriverIndex := StrToInt(Edit1.Text);
SendVideo_VIDX1.MakeInfo;
Timer1.Enabled := true;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
VideoAdd1.Labely := VideoAdd1.Labely+1;
if(VideoAdd1.Labely>VideoCap1.BitMapInfoHeader.biHeight) then
VideoAdd1.Labely := 0;
VideoAdd1.ImageX := VideoAdd1.ImageX + 1;
if(VideoAdd1.ImageX>VideoCap1.BitMapInfoHeader.biWidth) then
VideoAdd1.ImageX := 0;
end;
end.