ltmmWMProfile.GetStream Example for Visual Basic
'Discovering Streams:
Private Sub GetStreamInfo(Profile As ltmmWMProfile)
Dim StreamConfig As ltmmWMStreamConfig
Dim i As Long
txtStreamInfo.Text = ""
' Show all the information regarding the streams
For i = 0 To Profile.StreamCount - 1
Set StreamConfig = Profile.GetStream (i)
txtStreamInfo.Text = txtStreamInfo.Text + "[[ Stream " + CStr(i + 1) + " ]]"
' Get the major type of the stream
txtStreamInfo.Text = txtStreamInfo.Text + StreamConfig.StreamType
' Get Stream number
txtStreamInfo.Text = txtStreamInfo.Text + CStr(StreamConfig.StreamNumber)
' Get Stream name
txtStreamInfo.Text = txtStreamInfo.Text + StreamConfig.StreamName
' Get connection name
txtStreamInfo.Text = txtStreamInfo.Text + StreamConfig.ConnectionName
' Get Bitrate
txtStreamInfo.Text = txtStreamInfo.Text + CStr(StreamConfig.Bitrate)
' Get the maximum latency (time in milliseconds) between stream reception and display
txtStreamInfo.Text = txtStreamInfo.Text + CStr(StreamConfig.BufferWindow)
' Get the major type of the media in the stream
txtStreamInfo.Text = txtStreamInfo.Text + StreamConfig.Type
' Get the maximum key frame time interval (in 100-nano seconds)
txtStreamInfo.Text = txtStreamInfo.Text + CStr(StreamConfig.MaxKeyFrameSpacing)
' Get the Quality, range from 0 to 100
' where zero denotes maximum frame rate and 100 denotes maximum quality.
txtStreamInfo.Text = txtStreamInfo.Text + "Stream quality unknown = " + CStr(StreamConfig.Quality)
If StreamConfig.Quality = -1 Then
txtStreamInfo.Text = txtStreamInfo.Text + "...(unknown)"
End If
Next i
End Sub