GetSelectedStream Method


Gets the index of the selected stream of type streamType.

public int GetSelectedStream( 
   StreamFormatType streamType 
Public Function GetSelectedStream( _ 
   ByVal streamType As StreamFormatType _ 
) As Integer 
int GetSelectedStream(  
   StreamFormatType streamType 


A StreamFormatType enumeration value specifying the desired stream type. Only video and audio streams are currently supported, so this parameter should be StreamFormatType.Audio or StreamFormatType.Video.

Return Value

A value representing the index of the selected stream (between 0 and StreamCount - 1), where StreamCount is the number of streams of type streamType.


You can get the number of streams by calling GetStreamCount. You can change the current selected stream by calling SetSelectedStream.

The streams of a particular type are mutually exclusive. In other words, selecting a stream will automatically unselect the previously selected stream of the same type.

If you change the current program using CurrentProgram, the number of streams might change. So you will need to call PlayCtrl.GetSelectedStream again to see which stream is selected.

Do not confuse this with the Source Stream object returned by SourceStream. That refers to an alternative way to provide the source file using a System.IO.Stream object instead of a file on disk. Both properties/methods have the word Stream in the name, but there is no connection between the source stream object and the audio/video streams present in a file.

Refer to Programs and Streams for more information on Programs and Streams terminology in LEADTOOLS Multimedia.


Target Platforms

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly