How to use ltmmProcessors object to register a 3rd-party DirectShow filter as a video processor for Visual Basic

The following code demonstrates how to use the ltmmProcessors object from the ltmmPlayControl object to register a 3rd-party video processor:


Dim LTMMPlay as ltmmPlayCtrl


Sub RegisterMyVideoProcessor(ltmmPlayCtrl1 As ltmmPlayCtrl, ClassID As String) 

   Dim videoProcessors As ltmmProcessors
   ' register it and have video processors refreshed
   Set videoProcessors = ltmmPlayCtrl1. VideoProcessors

   If Not videoProcessors Is Nothing Then
      videoProcessors.RegisterExternalProcessor ClassID, True
   End If
End Sub

Sub SetAVideoProcessor()
   RegisterMyVideoProcessor LTMMPlay, "{AFF289A6-ABF1-4d68-9A51-634BF7077CFC}"
End Sub