I am using Delphi 5.
I want to know when avi file play is completed using 'TFilterGraph'. I want to run number of avi file one after another automatically. So I have downloaded DSPack and used 'TFilterGraph' and 'TVideoWindow' component. avi file video is displaying properly. How do I know the avi video or any video has completed playing so I can select next avi or any other video file to play?
procedure TForm1.Button2Click(Sender: TObject);
begin
videowindow1.FilterGraph:=filtergraph1; //query interfaces to video window
filtergraph1.Active:=true;
filtergraph1.RenderFile('I:\Project Part 1\Clips\More Clips\D.avi');
filtergraph1.Play;
end;
I have overcome the video completion time another way.
Here, I have providing the code for .pas file as well as .dfm file.
Of course, there should be DSPack installed already. I have downloaded from the link you provided above. Thanks a lot for that.
Everything works, only you need to change the file type and the file path in the 'ListFileDir' procedure. Rest works fine.
Just save .PAS file with 'NewPlayerSource' name, else you would get an error while compiling the project.
.PAS File Code:
.DFM File Code:
Once again thanks You soooo much TLama for everything.
Let me know if something is missing or something could be improved.