Access the Interface of Filters (Visual Basic)
Assume you want to access the Emboss filter that was inserted previously as first filter to the play object in the tutorial Programmatically Inserting a Processor Filter.
1. |
Start with the project that you created in Programmatically Inserting a Processor Filter. |
2. |
Add the LEAD Video Emboss Filter to your project. On the Project pull-down menu, use the References option. In case you can’t find "LEAD Video Emboss Filter Library" in the list, press the Browse button and browse to find and choose the library "LMVEmbs.dll", and press the Open button to close the "Add Reference" dialog box. Select the LEAD Video Emboss Filter Library, and Press OK. |
3. |
Update the btnSelectFilterClick procedure to be as follows: |
Private Sub btnSelectFilter_Click()
Dim nIndex As Integer
Dim LMVEmboss As ILMVEmbossDisp
'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
' Getting the the Emboss object
Set LMVEmboss = ltmmPlayCtrl1.GetSubObject (ltmmPlay_Object_SelVideoProcessor)
' Fill our options
LMVEmboss.Enabled = 1
LMVEmboss.LightAngle = 100
LMVEmboss.Elevation = 50
LMVEmboss.Depth = 50
End Sub
4. |
Run your program to test it. |