AVI video and Delphi (How can I get width and heigth of an AVI?)

5 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Jungle

nieprzeczytany,
15 sty 1997, 03:00:0015.01.1997
do

I need to know how to get the width and heigth of an AVI video in
Delphi. The only basic knowledge I have about that is MCI.

It would be great if you can show me an exemple with you
explainations.

I need to know which code should I use and which library (if there's
one).

Thank you,

Patrick
psta...@mixmedia.qc.ca

fred011

nieprzeczytany,
21 sty 1997, 03:00:0021.01.1997
do

This is rather easy and comes from Lloyd's Help File,

To make a AVI fit in a panel use this code:

begin
with MediaPlayer1 do begin
DeviceType := dtAutoSelect;
visible := false;
FileName := InputBox('AVI', 'Enter AVI file name',
'c:\windows\borland.avi');
display := panel1;
open;
DisplayRect := rect(0, 0, panel1.width, panel1.height); {This is it!}
rewind;
play;
end;
end;

{ This code came from Lloyd's help file! }

Now to doe the reverse and make the panel the same size as the default avi
size, load the avi file first, then size the panle based on the Trect
parameters, like so:

A: Note: the DisplayRect property is modified when the avi file is
opened. Therefore, setting or getting the DisplayRect must be done after
the file is opened.

var
t: trect;
begin
with MediaPlayer1 do begin
DeviceType := dtAutoSelect;
visible := false;
FileName := InputBox('AVI', 'Enter AVI file name',
'c:\windows\borland.avi');
display := panel1;
open;
t := DisplayRect;
caption := IntToStr(t.left) + ' : ' + IntToStr(t.top) + ' : ' +
IntToStr(t.right) + ' : ' + IntToStr(t.bottom); {This is it!}
rewind;
play;
end;
end;

{ This code came from Lloyd's help file! }

good luck
fred011
Jungle <psta...@mixmedia.qc.ca> wrote in article
<5bj57n$flp$1...@wagner.spc.videotron.ca>...

Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż dalej
Nowe wiadomości: 0