Delphi-OpenCV/samples/Components/cVideoWriter/uMainForm.pas
Laentir Valetov 3b42f04c12 Fixed #21
Signed-off-by: Laentir Valetov <laex@bk.ru>
2014-07-18 00:27:13 +04:00

53 lines
1.0 KiB
ObjectPascal

unit uMainForm;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, ocv.comp.View,
ocv.comp.Types, ocv.comp.VideoWriter, ocv.comp.Source;
type
TForm2 = class(TForm)
ocvcmrsrc1: TocvCameraSource;
ocvdwrtr1: TocvVideoWriter;
ocvw1: TocvView;
lbl1: TLabel;
edt1: TEdit;
btn1: TButton;
procedure btn1Click(Sender: TObject);
private
procedure btn1Click1(Sender: TObject);
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.btn1Click1(Sender: TObject);
begin
btn1.Enabled := False;
ocvdwrtr1.Enabled := False;
btn1.OnClick := btn1Click;
btn1.Enabled := True;
btn1.Caption:='Save media';
end;
procedure TForm2.btn1Click(Sender: TObject);
begin
btn1.Enabled := False;
ocvdwrtr1.FileName := edt1.Text;
ocvdwrtr1.Enabled := True;
btn1.OnClick := btn1Click1;
btn1.Caption:='Stop';
btn1.Enabled := True;
end;
end.