StreamNumber Property

Summary
Gets or sets the stream number.
Syntax
C#
C++/CLI
public int StreamNumber { get; set; } 
public: 
property int StreamNumber { 
   int get(); 
   void set (    int ); 
} 

Property Value

The stream number

Remarks

Stream numbers range from 1 through 63. The stream number is different from the index. Stream indexes are zero-based, while each stream in the profile might have its own number, which is different from the index. If a new stream number is set, call the WMProfile.ReconfigStream method to have the new number to take effect. For more information, refer to the Microsoft documentation for IWMStreamConfig.GetStreamNumber.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
public bool _result = false; 
public CaptureCtrlForm _form = new CaptureCtrlForm(); 
 
public void StreamTypeExample() 
{ 
   // reference the capture control 
   CaptureCtrl capturectrl = _form.CaptureCtrl; 
 
   try 
   { 
      // reference the profile if available 
      WMProfile CurrentProfile = capturectrl.WMProfile; 
 
      // if we have a profile display the info 
      if (CurrentProfile != null) 
         MessageBox.Show(GetStreamInfo(CurrentProfile), "Stream Info", MessageBoxButtons.OK); 
      _result = true; 
   } 
   catch (Exception) 
   { 
      _result = false; 
   } 
} 
 
// discovering streams  
private string GetStreamInfo(WMProfile Profile) 
{ 
   WMStreamConfig streamConfig; 
   string streamInfo = string.Empty; 
 
   // show all the information regarding the streams 
   for (int i = 0; i < Profile.StreamCount - 1; i++) 
   { 
      streamConfig = Profile.GetStream(0); 
      streamInfo += "[[ Stream " + (i + 1).ToString() + " ]]"; 
 
      // get the major type of the stream 
      streamInfo += "\n type: " + streamConfig.StreamType; 
 
      // get Stream number 
      streamInfo += "\n number: " + streamConfig.StreamNumber.ToString(); 
 
      // get Stream name 
      streamInfo += "\n name: " + streamConfig.StreamName; 
 
      // get connection name 
      streamInfo += "\n connection name: " + streamConfig.ConnectionName; 
 
      // get Bitrate 
      streamInfo += "\n bitrate: " + streamConfig.Bitrate.ToString(); 
 
      // get the maximum latency (time in milliseconds) between stream reception and display 
      streamInfo += "\n buffer window: " + streamConfig.BufferWindow.ToString(); 
 
      // get the major type of the media in the stream 
      streamInfo += "\n majortype: " + streamConfig.Type; 
 
      // get the maximum key frame time interval (in 100-nano seconds)  
      streamInfo += "\n max keyframe spacing: " + streamConfig.MaxKeyFrameSpacing.ToString(); 
 
      // get the Quality, range from 0 to 100 
      // where zero denotes maximum frame rate and 100 denotes maximum quality.  
      streamInfo += "\n stream quality: "; 
 
      if (streamConfig.Quality > -1) 
         streamInfo += streamConfig.Quality.ToString(); 
      else 
         streamInfo += "(unknown)"; 
   } 
 
   return streamInfo; 
} 
Requirements

Target Platforms

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

Leadtools.Multimedia Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.