Programmatically Inserting a Processor Filter (Delphi 6.0)

Assume you want to insert the Emboss as first filter to the play object.

1.

Start with the project that you created in Using ltmmPlayCtrl for Simple Playback.

2.

Add button control to your form, and name it as follows:

 

Name

Caption

 

btnSelectFilter

Select Filter

3.

Handle the btnSelectFilter OnClick event, and code btnSelectFilterClick procedure as follows.

procedure TForm1.btnSelectFilterClick(Sender: TObject); 
var
 nIndex: Integer; 
begin
 //The string below is retrieved from the Filters List utility
 nIndex:= ltmmPlayCtrl1.VideoProcessors.Find('@device:sw:{E526D606-22E7-494C-B81E-AC0A94BFE603}\{E2B7DB17-38C5-11D5-91F6-00104BDB8FF9}'); 
   ltmmPlayCtrl1.SelectedVideoProcessors.Add ( ltmmPlayCtrl1.VideoProcessors.Item (nIndex), 0 ); 
end; 

4.

Run your program to test it.