unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DSPack;
type
TForm1 =
class(TForm)
VW: TDSVideoWindowEx2;
FilterGraph1: TFilterGraph;
SampleGrabber1: TSampleGrabber;
Filter1: TFilter;
Edit1: TEdit;
Label1: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var FileName:
string;
begin
FileName:= Edit1.Text;
FilterGraph1.Active:= True;
if FilterGraph1.RenderFile(FileName)<>S_OK
then begin // <- Hier tritt das Problem im "Release-Modus" auf!
MessageDLG('
Fehler beim Öffnen der Datei ''
'+FileName+'
''
!',mtError,[mbOk],0);
FilterGraph1.Active:= False;
end
else FilterGraph1.Pause;
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
FilterGraph1.Stop;
FilterGraph1.Active:= False;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Edit1.Text:= '
D:\test.avi';
end;
end.