aboutsummaryrefslogtreecommitdiff
path: root/Source/fsinfounit.pas
blob: 892c964078780c56834d90b92ecff428ffa3531e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
unit fsinfounit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  fsformunit;

type
  Tfsinfo = class(TFsForm)
  private
    { Private declarations }
  public
    { Public declarations }
    procedure Parse(const S: String); override;
  end;

var
  fsinfo: Tfsinfo;

implementation

uses
  mainunit, fsframeunit,
  Strz;

{$R *.DFM}

{ Tfsinfo }

procedure Tfsinfo.Parse(const S: String);
var
  s1: String;
  f: TFsFrame;
begin
  if (S='') or
   (WordCount(S, [' '])<5) or
   (not main.cstoPd.Active) then Exit;

  s1 := ExtractWord(1, S, [' ']);
  f := FindFrame(s1);
  if f=nil then Exit;

  main.SendReturnValues(
   ExtractWord(5, S, [' '])+'='+IntToStr(f.Avi.FrameRate)+';'+
   ExtractWord(4, S, [' '])+'='+IntToStr(f.Avi.FrameCount)+';'+
   ExtractWord(3, S, [' '])+'='+IntToStr(f.d1.Surface.Height)+';'+
   ExtractWord(2, S, [' '])+'='+IntToStr(f.d1.Surface.Width)
  );
end;

end.