home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / mac / SiteBldr / AMOVIE / SDK / _SETUP / COMMON.Z / builder.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-04-25  |  20.9 KB  |  591 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMain 
  3.    Caption         =   "Filter and Pin Viewer"
  4.    ClientHeight    =   6060
  5.    ClientLeft      =   1680
  6.    ClientTop       =   1710
  7.    ClientWidth     =   7230
  8.    Height          =   6750
  9.    Left            =   1620
  10.    LinkTopic       =   "frmMain"
  11.    ScaleHeight     =   6060
  12.    ScaleWidth      =   7230
  13.    Top             =   1080
  14.    Width           =   7350
  15.    Begin VB.Frame frameFilter 
  16.       Caption         =   "Filter Graph"
  17.       Height          =   2652
  18.       Left            =   120
  19.       TabIndex        =   12
  20.       Top             =   120
  21.       Width           =   6972
  22.       Begin VB.CommandButton cmdSource 
  23.          Caption         =   "Add &Source Filter..."
  24.          Height          =   372
  25.          Left            =   4560
  26.          TabIndex        =   14
  27.          Top             =   2160
  28.          Width           =   1572
  29.       End
  30.       Begin VB.ListBox listFilters 
  31.          Height          =   1584
  32.          Left            =   3960
  33.          TabIndex        =   4
  34.          Top             =   480
  35.          Width           =   2772
  36.       End
  37.       Begin VB.CommandButton cmdAddRegFilter 
  38.          Caption         =   "&Add ->"
  39.          Height          =   372
  40.          Left            =   3120
  41.          TabIndex        =   13
  42.          Top             =   600
  43.          Width           =   732
  44.       End
  45.       Begin VB.ListBox listRegFilters 
  46.          Height          =   1584
  47.          Left            =   240
  48.          TabIndex        =   2
  49.          Top             =   480
  50.          Width           =   2772
  51.       End
  52.       Begin VB.Label lblFilters 
  53.          Caption         =   "Filters in current filter &graph"
  54.          Height          =   252
  55.          Left            =   3960
  56.          TabIndex        =   3
  57.          Top             =   240
  58.          Width           =   2052
  59.       End
  60.       Begin VB.Label lblRegFilters 
  61.          Caption         =   "&Registered filters"
  62.          Height          =   252
  63.          Left            =   240
  64.          TabIndex        =   1
  65.          Top             =   240
  66.          Width           =   2052
  67.       End
  68.    End
  69.    Begin VB.Frame framePinInfo 
  70.       Caption         =   "Filter"
  71.       Height          =   3132
  72.       Left            =   120
  73.       TabIndex        =   0
  74.       Top             =   2760
  75.       Width           =   6972
  76.       Begin VB.TextBox txtPinInfo 
  77.          Height          =   1812
  78.          Left            =   3720
  79.          MultiLine       =   -1  'True
  80.          ScrollBars      =   2  'Vertical
  81.          TabIndex        =   17
  82.          Text            =   "builder.frx":0000
  83.          Top             =   1200
  84.          Width           =   3012
  85.       End
  86.       Begin VB.CommandButton cmdConnect 
  87.          Caption         =   "Co&nnect One Pin..."
  88.          Height          =   372
  89.          Left            =   1920
  90.          TabIndex        =   8
  91.          Top             =   2640
  92.          Width           =   1692
  93.       End
  94.       Begin VB.CommandButton cmdRender 
  95.          Caption         =   "&Connect Downstream"
  96.          Height          =   372
  97.          Left            =   120
  98.          TabIndex        =   7
  99.          Top             =   2640
  100.          Width           =   1692
  101.       End
  102.       Begin VB.ListBox listPins 
  103.          Height          =   1392
  104.          Left            =   240
  105.          TabIndex        =   6
  106.          Top             =   1200
  107.          Width           =   3252
  108.       End
  109.       Begin VB.Label lblFilterName 
  110.          Height          =   255
  111.          Left            =   1440
  112.          TabIndex        =   16
  113.          Top             =   240
  114.          Width           =   4815
  115.       End
  116.       Begin VB.Label lblFilter 
  117.          Caption         =   "Filter name:"
  118.          Height          =   255
  119.          Left            =   240
  120.          TabIndex        =   15
  121.          Top             =   240
  122.          Width           =   975
  123.       End
  124.       Begin VB.Label lblVendor 
  125.          Caption         =   "Vendor: "
  126.          Height          =   255
  127.          Left            =   240
  128.          TabIndex        =   11
  129.          Top             =   480
  130.          Width           =   735
  131.       End
  132.       Begin VB.Label lblVendorInfo 
  133.          Height          =   255
  134.          Left            =   1440
  135.          TabIndex        =   10
  136.          Top             =   480
  137.          Width           =   4935
  138.       End
  139.       Begin VB.Label lblPinListbox 
  140.          Caption         =   "&Pins in selected filter"
  141.          Height          =   255
  142.          Left            =   240
  143.          TabIndex        =   5
  144.          Top             =   840
  145.          Width           =   2055
  146.       End
  147.       Begin VB.Label lblPinInfo 
  148.          Caption         =   "Information for selected pin"
  149.          Height          =   252
  150.          Left            =   3720
  151.          TabIndex        =   9
  152.          Top             =   840
  153.          Width           =   2172
  154.       End
  155.    End
  156.    Begin MSComDlg.CommonDialog CommonDialog1 
  157.       Left            =   8760
  158.       Top             =   -120
  159.       _Version        =   65536
  160.       _ExtentX        =   847
  161.       _ExtentY        =   847
  162.       _StockProps     =   0
  163.       Flags           =   4096
  164.    End
  165.    Begin VB.Menu mnuFilterGraph 
  166.       Caption         =   "&FilterGraph"
  167.       Begin VB.Menu mnu_FilterGraphNew 
  168.          Caption         =   "&New (empty)"
  169.       End
  170.       Begin VB.Menu mnu_FilterGraphGenerate 
  171.          Caption         =   "&Generate from input file..."
  172.       End
  173.       Begin VB.Menu mnu_Separator1 
  174.          Caption         =   "-"
  175.       End
  176.       Begin VB.Menu mnu_FilterGraphRun 
  177.          Caption         =   "&Run"
  178.       End
  179.       Begin VB.Menu mnu_FilterGraphPause 
  180.          Caption         =   "&Pause"
  181.       End
  182.       Begin VB.Menu mnu_FilterGraphStop 
  183.          Caption         =   "&Stop"
  184.       End
  185.       Begin VB.Menu mnu_Separator2 
  186.          Caption         =   "-"
  187.       End
  188.       Begin VB.Menu mnu_FilterGraphExit 
  189.          Caption         =   "E&xit"
  190.       End
  191.    End
  192.    Begin VB.Menu mnu_Options 
  193.       Caption         =   "&Options"
  194.       Begin VB.Menu mnu_BuildCustomGraph 
  195.          Caption         =   "&Build custom graph"
  196.       End
  197.    End
  198. Attribute VB_Name = "frmMain"
  199. Attribute VB_Creatable = False
  200. Attribute VB_Exposed = False
  201. ' global variables
  202. ' use the prefix "g_obj" to indicate a global object
  203. Dim g_objMC As IMediaControl ' object  'IMediaControl
  204. Dim g_objSelFilter As Object 'IFilterInfo
  205. Dim g_objRegFilters As Object ' IFilterInfo collection
  206. Dim g_objLocalRegFilter As Object ' IFilterInfo
  207. Dim g_objSelPin As Object  ' IPinInfo; pin selected from listbox
  208. Dim g_fRunning As Boolean  ' indicates whether the video is running or not
  209. Private Sub RefreshRegFilters()
  210. ' update the listbox of registered filters
  211. ' using the global variable g_objRegFilters
  212.     Dim filter As IRegFilterInfo
  213.     listRegFilters.Clear
  214.     If Not g_objRegFilters Is Nothing Then
  215.         For Each filter In g_objRegFilters
  216.             listRegFilters.AddItem filter.Name
  217.         Next filter
  218.     End If
  219.     If listRegFilters.ListCount > 0 Then
  220.         listRegFilters.ListIndex = 0  ' select first in list
  221.     End If
  222. End Sub
  223. Private Sub AddFilter(FName As String, f As IFilterInfo)
  224. ' call IRegFilterInfo::filter
  225.     Dim LocalRegFilters As Object
  226.     Set LocalRegFilters = g_objMC.RegFilterCollection
  227.     Dim filter As IRegFilterInfo
  228.     For i = 0 To (LocalRegFilters.Count - 1) Step 1
  229.         LocalRegFilters.Item i, filter
  230.         If filter.Name = FName Then
  231.             filter.filter f
  232.             Exit For
  233.         End If
  234.     Next i
  235.     RefreshFilters
  236. End Sub
  237. Private Sub cmdAddRegFilter_Click()
  238. ' IMediaControl property RegFilterCollection is an
  239. ' an IAMCollection interface
  240.     Dim filter As IRegFilterInfo
  241.     For Each filter In g_objRegFilters ' listRegFilters
  242.         If filter.Name = listRegFilters.Text Then
  243.             Dim f As IFilterInfo
  244.             filter.filter f
  245.             If f.IsFileSource Then
  246.                CommonDialog1.ShowOpen
  247.                ' handle user cancel
  248.                f.filename = CommonDialog1.filename
  249.             End If
  250.             Exit For
  251.         End If
  252.     Next filter
  253.     ' Set frmRegFilters = g_objMC.RegFilterCollection
  254.     RefreshFilters
  255. End Sub
  256. Private Sub cmdConnect_Click()
  257. ' connects the current selected pin, indicated by
  258. ' g_objSelPin , g_objMC, and g_objSelFilter
  259.     On Error Resume Next ' if already connected, connect fails
  260.     frmSelectPin.OtherDir = g_objSelPin.Direction
  261.     Set frmSelectPin.g_objMC = g_objMC
  262.     Set frmSelectPin.g_objFI = g_objSelFilter
  263.     frmSelectPin.RefreshFilters
  264.     frmSelectPin.Show 1
  265.     If frmSelectPin.bOK Then
  266.         Dim objPI As IPinInfo
  267.         Set objPI = frmSelectPin.g_objPI
  268.         g_objSelPin.Connect objPI
  269.         RefreshFilters  ' sub in this VB app that updates display
  270.     End If
  271. End Sub
  272. Private Sub Form_Load()
  273. ' initialize the display
  274.     listFilters.Clear
  275.     listPins.Clear
  276.     txtPinInfo.Text = ""
  277. ' create the global object used throughout the app
  278.     Set g_objMC = New FilgraphManager
  279. ' update the display for registered filters
  280.     Set g_objRegFilters = g_objMC.RegFilterCollection
  281.     RefreshRegFilters
  282. End Sub
  283. Private Sub cmdRender_Click()
  284. ' call IPinInfo::Render
  285. ' complete the graph downstream from this pin
  286.     On Error Resume Next  ' if already connected, this fails
  287.     g_objSelPin.Render
  288.     RefreshFilters
  289. End Sub
  290. Private Sub cmdSource_Click()
  291. ' calls IMediaControl::AddSourceFilter
  292. ' adds to the graph the source filter that can read the given filename
  293. ' Returns an IFilterInfo object.
  294.     Dim objFilter As Object  ' tmp object for valid syntax; not used here
  295.     On Error GoTo cmdsourceclick_cancelerror
  296.     CommonDialog1.CancelError = True
  297.     CommonDialog1.filter = "ActiveMovie files (*.mpg;*.avi;*.mov)|*.mpg;*.avi;*.mov|"
  298.     CommonDialog1.ShowOpen  ' open the source filter
  299.     g_objMC.AddSourceFilter CommonDialog1.filename, objFilter
  300.     ' we don't actually use the returned IFilterInfo object here...
  301.     RefreshFilters  ' update all info displayed by this VB app
  302.     ' the app displays filters, pins, and detailed pin info
  303.     Exit Sub
  304. cmdsourceclick_cancelerror:
  305.     ' user canceled out of the Open File dialog; just exit
  306.     Exit Sub
  307. End Sub
  308. Public Sub RefreshFilters()
  309. ' update the contents of the "Filters" combo box
  310. ' using the current IMediaControl.FilterCollection
  311.     Dim objFI As IFilterInfo
  312.     listFilters.Clear
  313.     For Each objFI In g_objMC.FilterCollection
  314.         listFilters.AddItem objFI.Name
  315.     Next objFI
  316.     If listFilters.ListCount > 0 Then
  317.         listFilters.ListIndex = 0  ' select first in list
  318.     End If
  319. End Sub
  320. Private Sub listFilters_Click()
  321. ' user clicked on a filter in the filters combo box
  322. ' or entry 0 was selected by default when filling the
  323. ' "listFilters" listbox
  324. ' update the pins listbox to show all of its pins
  325.     Dim objFI As IFilterInfo
  326.     For Each objFI In g_objMC.FilterCollection
  327.         If objFI.Name = listFilters.Text Then
  328.             Set g_objSelFilter = objFI
  329.             lblFilterName.Caption = objFI.Name
  330.             lblVendorInfo.Caption = objFI.VendorInfo
  331.             ' add all of this filter's pins to the combo box
  332.             listPins.Clear
  333.             Dim objPI As IPinInfo
  334.             For Each objPI In objFI.Pins
  335.                 listPins.AddItem objPI.Name
  336.             Next objPI
  337.         End If
  338.     Next objFI   ' next filter info
  339.     listPins.ListIndex = 0  ' select the first in the combobox
  340. End Sub
  341. Private Sub listPins_Click()
  342. ' Add detailed pin information to the listbox on the right
  343. ' when the user clicks on a pin in the listbox on the left
  344.   Dim strTemp As String
  345.   On Error Resume Next
  346.   Dim objPin As IPinInfo
  347.   For Each objPin In g_objSelFilter.Pins
  348.     If objPin.Name = listPins.Text Then ' selected in listbox?
  349.       Set g_objSelPin = objPin  'yes, get all info
  350.       strTemp = ""
  351.       Dim objPinOther As IPinInfo
  352.       Set objPinOther = objPin.ConnectedTo
  353.       If Err.Number = 0 Then
  354.         strTemp = "Connected to pin: " + objPinOther.Name + " "
  355.         Dim objPeer As IFilterInfo
  356.         Set objPeer = objPinOther.FilterInfo
  357.         strTemp = strTemp + " on filter: " + objPeer.Name + " "
  358.         Dim objMTI As IMediaTypeInfo
  359.         Set objMTI = objPin.ConnectionMediaType
  360.         strTemp = strTemp + vbCrLf + "Media Type: " + objMTI.Type
  361.       End If
  362.       If objPin.Direction = 0 Then
  363.         strTemp = strTemp + " " + vbCrLf + "Direction: Input"
  364.       Else
  365.         strTemp = strTemp + " " + vbCrLf + "Direction: Output"
  366.       End If
  367.     txtPinInfo.Text = strTemp
  368.     End If
  369.   Next objPin
  370.   Exit Sub
  371. End Sub
  372. Private Sub listRegFilters_DblClick()
  373.     cmdAddRegFilter_Click
  374. End Sub
  375. Private Sub mnu_BuildCustomGraph_Click()
  376. ' This routine demonstrates a likely common use
  377. ' of these methods in Visual Basic applications:
  378. ' Directly creating the filter graph needed
  379. ' for a specific multimedia file.
  380. ' The graph has the following filters: AVI Source, AVI Decompressor,
  381. ' Video Renderer, AVI Splitter, and Audio Renderer.
  382. ' Note that these filters can be connected by reusing just
  383. ' two pin object variables, but for clarity of the example,
  384. ' all are defined using names that reflect their position
  385. ' in the filter graph.
  386. ' The filters are declared with their pins, as follows:
  387. Dim pSourceFilter As IFilterInfo  ' AVI source filter; has two pins
  388. Dim SourceOutputPin As IPinInfo  'Source Filter output pin
  389. Dim pAVISplitter As IFilterInfo ' AVI splitter
  390. Dim SplitterInPin As IPinInfo   ' AVI splitter pin "Input"
  391. Dim SplitterOut00Pin As IPinInfo  ' AVI splitter pin "Stream 00"
  392. Dim SplitterOut01Pin As IPinInfo  ' AVI splitter pin "Stream 01"
  393. Dim pDECFilter As IFilterInfo  ' AVI Decompressor; has two pins
  394. Dim DECInPin As IPinInfo   'AVI Decompressor pin "XForm In"
  395. Dim DECOutPin As IPinInfo   ' AVI Decompressor pin "XForm Out"
  396. Dim pVidRenderer As IFilterInfo ' Video renderer, has one pin
  397. Dim VidRendInPin As IPinInfo  ' Video Renderer pin "Input"
  398. Dim pAudioRenderer As IFilterInfo 'Audio renderer, has one pin
  399. Dim AudioRendInPin As IPinInfo ' Audio Renderer pin "Input"
  400. Dim pPin As IPinInfo
  401.     Set SVideoPin = Nothing
  402.     Set SAudioPin = Nothing
  403.     Set DECInPin = Nothing
  404.     Set DECOutPin = Nothing
  405.     Set VidRendInPin = Nothing
  406.     Set AudioRendInPin = Nothing
  407. ' reinitialize all global variables
  408.     Set g_objRegFilters = Nothing
  409.     Set g_objSelFilter = Nothing
  410.     Set g_objSelPin = Nothing
  411.     Set g_objMC = Nothing
  412. ' create a new IMediaControl object
  413.     Set g_objMC = New FilgraphManager
  414.     ' reset the listRegFilters again
  415.     Set g_objRegFilters = g_objMC.RegFilterCollection
  416.     RefreshRegFilters
  417. ' reinitialize the display
  418.     listFilters.Clear
  419.     lblFilterName.Caption = ""
  420.     lblVendorInfo.Caption = ""
  421.     listPins.Clear
  422.     txtPinInfo.Text = ""
  423.     g_fRunning = False
  424.         
  425. 'Add source filter for an AVI file
  426.     On Error GoTo err_CustomGraph_Cancel
  427.     CommonDialog1.CancelError = True
  428.     CommonDialog1.filter = "AVI files (*.avi)|*.avi"
  429.     CommonDialog1.ShowOpen  ' get the name of the source or filter graph file
  430.     g_objMC.AddSourceFilter CommonDialog1.filename, pSourceFilter
  431.     On Error GoTo err_CustomGraph  ' handle other errors
  432.     ' Get the pins we need to connect
  433.     For Each pPin In pSourceFilter.Pins
  434.       Debug.Print pPin.Name
  435.       If pPin.Name = "Output" Then
  436.           Set SourceOutputPin = pPin
  437.       End If
  438.     Next pPin
  439.     'Add DEC filter
  440.     AddFilter "AVI Decompressor", pDECFilter
  441.     'Print out list of pins on decompressor filter
  442.     For Each pPin In pDECFilter.Pins
  443.       Debug.Print pPin.Name
  444.       ' save specific pins to connect them
  445.       If pPin.Name = "XForm In" Then
  446.           Set DECInPin = pPin
  447.       End If
  448.       If pPin.Name = "XForm Out" Then
  449.           Set DECOutPin = pPin
  450.       End If
  451.     Next pPin
  452.     'Add AVI Splitter
  453.     AddFilter "AVI Splitter", pAVISplitter
  454.     'Print out list of pins on decompressor filter
  455.     For Each pPin In pAVISplitter.Pins
  456.       Debug.Print pPin.Name
  457.       ' save specific pins to connect them
  458.       ' pin 0, pin 1
  459.       If pPin.Name = "input pin" Then
  460.           Set SplitterInPin = pPin
  461.       ElseIf pPin.Name = "Stream 00" Then
  462.           Set SplitterOut00Pin = pPin
  463.       ElseIf pPin.Name = "Stream 01" Then
  464.           Set SplitterOut01Pin = pPin
  465.       End If
  466.     Next pPin
  467.     'Connect Source video output pin to AVI splitter input pin
  468.     If Not SourceOutputPin Is Nothing And Not SplitterInPin Is Nothing Then
  469.         SourceOutputPin.Connect SplitterInPin
  470.     End If
  471.     ' Splitter now knows how many output pins it needs
  472.     For Each pPin In pAVISplitter.Pins
  473.       Debug.Print pPin.Name
  474.       ' save specific pins to connect them
  475.       ' pin 0, pin 1
  476.       If pPin.Name = "Stream 00" Then
  477.           Set SplitterOut00Pin = pPin
  478.       ElseIf pPin.Name = "Stream 01" Then
  479.           Set SplitterOut01Pin = pPin
  480.       End If
  481.     Next pPin
  482.     'Add Video Renderer filter and set its pin variables
  483.     AddFilter "Video Renderer", pVidRenderer
  484.     'Print out list of pins on video renderer filter
  485.     For Each pPin In pVidRenderer.Pins
  486.       Debug.Print pPin.Name
  487.       If pPin.Name = "Input" Then
  488.           Set VidRendInPin = pPin
  489.       End If
  490.     Next pPin
  491.     'Add Audio Renderer filter and set its pin variables
  492.     AddFilter "Audio Renderer", pAudioRenderer
  493.     'Print out list of pins on audioo renderer filter
  494.     For Each pPin In pAudioRenderer.Pins
  495.       Debug.Print pPin.Name
  496.       If InStr(pPin.Name, "Input") Then
  497.           Set AudioRendInPin = pPin
  498.       End If
  499.     Next pPin
  500.     ' Connect AVI splitter stream 01 to AVI decompressor
  501.     If Not DECInPin Is Nothing And Not SplitterOut00Pin Is Nothing Then
  502.         SplitterOut00Pin.Connect DECInPin
  503.     End If
  504.     'Connect DEC filter output pin to Video Renderer input pin
  505.     If Not DECOutPin Is Nothing And Not VidRendInPin Is Nothing Then
  506.         DECOutPin.Connect VidRendInPin
  507.     End If
  508.     ' Connect AVI splitter stream 01 to audio renderer
  509.     ' continue if there is no audio connection for the source AVI file
  510.     On Error Resume Next
  511.     If Not AudioRendInPin Is Nothing And Not SplitterOut01Pin Is Nothing Then
  512.         SplitterOut01Pin.Connect AudioRendInPin
  513.     End If
  514.     RefreshFilters
  515.     Exit Sub
  516. err_CustomGraph:
  517.     MsgBox "Could not create the custom filter graph. Please select an .AVI file that uses the AVI splitter and AVI decompressor filters."
  518.     Exit Sub
  519. err_CustomGraph_Cancel:
  520.     ' user cancelled out of File Open dialog; just exit
  521.     Exit Sub
  522. End Sub
  523. Private Sub mnu_FilterGraphExit_Click()
  524.     Set g_objLocalRegFilter = Nothing
  525.     Set g_objRegFilters = Nothing
  526.     Set g_objSelFilter = Nothing
  527.     Set g_objSelPin = Nothing
  528.     Set g_objMC = Nothing
  529.     End
  530. End Sub
  531. Private Sub mnu_FilterGraphGenerate_Click()
  532. ' User is initializing the filter graph based on a source file
  533. ' Create a new filter graph and then get all filters, connections
  534. ' reset the application's global objects
  535.     Set g_objRegFilters = Nothing
  536.     Set g_objSelFilter = Nothing
  537.     Set g_objSelPin = Nothing
  538.     Set g_objMC = Nothing
  539. ' initialize the display
  540.     listFilters.Clear
  541.     listPins.Clear
  542.     txtPinInfo.Text = ""
  543. ' create a new IMediaControl object
  544.     Set g_objMC = New FilgraphManager
  545. ' refresh the display for registered filters
  546.     Set g_objRegFilters = g_objMC.RegFilterCollection
  547.     RefreshRegFilters
  548.     ' use the common dialog to let the user select the input file
  549.     On Error GoTo filtergraphgenerate_cancelerror
  550.     CommonDialog1.CancelError = True
  551.     CommonDialog1.filter = "ActiveMovie files (*.mpg;*.avi;*.mov)|*.mpg;*.avi;*.mov|"
  552.     CommonDialog1.ShowOpen
  553.     ' call IMediaControl::RenderFile to add all filters and connect all pins
  554.     g_objMC.RenderFile CommonDialog1.filename
  555.     ' update and display the list of registered filters
  556.     ' update and display all active filters for this filter graph
  557.     RefreshFilters  ' local subroutine to update the listbox
  558.     Exit Sub
  559. filtergraphgenerate_cancelerror:
  560.     ' user cancelled out of the File Open dialog
  561.     Exit Sub
  562. End Sub
  563. Private Sub mnu_FilterGraphNew_Click()
  564. ' user wants to start with a fresh filter graph
  565. ' reset the global objects
  566.     Set g_objRegFilters = Nothing
  567.     Set g_objSelFilter = Nothing
  568.     Set g_objSelPin = Nothing
  569.     Set g_objMC = Nothing
  570. ' create a new IMediaControl object
  571.     Set g_objMC = New FilgraphManager
  572.     ' reset the listRegFilters again
  573.     Set g_objRegFilters = g_objMC.RegFilterCollection
  574.     RefreshRegFilters
  575.     listFilters.Clear
  576.     lblFilterName.Caption = ""
  577.     lblVendorInfo.Caption = ""
  578.     listPins.Clear
  579.     txtPinInfo.Text = ""
  580.     g_fRunning = False
  581. End Sub
  582. Private Sub mnu_FilterGraphPause_Click()
  583.     g_objMC.Pause
  584. End Sub
  585. Private Sub mnu_FilterGraphRun_Click()
  586.     g_objMC.Run
  587. End Sub
  588. Private Sub mnu_FilterGraphStop_Click()
  589.     g_objMC.Stop
  590. End Sub
  591.