Viewing Pin Connection Information
Microsoft DirectShow 9.0 |
Viewing Pin Connection Information
- Note This topic is deprecated. It applies to Visual Basic 6.0. DirectShow is not supported for Visual Basic .NET or C#.
When you have obtained a pin object from the collection available from the IFilterInfo.Pins property of the filter object, you can list its connection and other information.
Dim strTemp As String On Error Resume Next Dim objPin As IPinInfo For Each objPin In g_objSelFilter.Pins If objPin.Name = listPins.Text Then ' selected in list box? Set g_objSelPin = objPin 'yes, get all information strTemp = "" ' clear existing displayed pin information Dim objPinOther As IPinInfo Set objPinOther = objPin.ConnectedTo If Err.Number = 0 Then ' yes, there is a connection strTemp = "Connected to pin: " + objPinOther.Name + " " Dim objPeer As IFilterInfo Set objPeer = objPinOther.FilterInfo strTemp = strTemp + " on filter: " + objPeer.Name + " " Dim objMTI As IMediaTypeInfo Set objMTI = objPin.ConnectionMediaType strTemp = strTemp + vbCrLf + "Media Type: " + objMTI.Type End If If objPin.Direction = 0 Then strTemp = strTemp + " " + vbCrLf + "Direction: Input" Else strTemp = strTemp + " " + vbCrLf + "Direction: Output" End If txtPinInfo.Text = strTemp End If Next objPin