Error processing SSI file
LEADTOOLS Multimedia (Leadtools.Multimedia assembly)

Show in webframe

CurrentStream Property






Gets or sets the number of the current stream for the media file.
Syntax
public int CurrentStream {get; set;}
'Declaration
 
Public Property CurrentStream As Integer
'Usage
 
Dim instance As MediaInfo
Dim value As Integer
 
instance.CurrentStream = value
 
value = instance.CurrentStream
public:
property int CurrentStream {
   int get();
   void set (    int value);
}

Property Value

A value representing the number of the current stream.
Remarks
This value is zero-based. Once the current stream has been set, other MediaInfo properties are updated with information about the current stream.

For more information on Programs and Streams terminology in LEADTOOLS Multimedia, refer to Programs and Streams.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Multimedia
Imports LeadtoolsMultimediaExamples.Fixtures

Public _form As PlayCtrlForm = New PlayCtrlForm()
Public _result As Boolean = False
Public Sub ResetSourceExample()
   ' reference the play control
   Dim playctrl As PlayCtrl = _form.PlayCtrl

   ' input file
   Dim inFile As String = Path.Combine(LEAD_VARS.MediaDir, "MediaInfo_Source.avi")
   Dim info As String = String.Empty

   Try
      ' create a new media info object
      Dim mi As MediaInfo = New MediaInfo()

      ' set the input and output files
      mi.SourceFile = inFile

      ' set the info string
      info = String.Format("Source File={0}" _
                           & Microsoft.VisualBasic.Constants.vbLf _
                           & "Source File Size={1}" & Microsoft.VisualBasic.Constants.vbLf _
                           & "Source BitRate={2}" & Microsoft.VisualBasic.Constants.vbLf _
                           & "Duration={3}" & Microsoft.VisualBasic.Constants.vbLf _
                           & "VideoBitRate={4}" _
                           & Microsoft.VisualBasic.Constants.vbLf _
                           & "VideoBitCount={5}" _
                           & Microsoft.VisualBasic.Constants.vbLf + Microsoft.VisualBasic.Constants.vbLf _
                           & "Are these values correct?", _
                           mi.SourceFile, _
                           mi.SourceFileSize, _
                           mi.SourceBitRate, _
                           mi.SourceDuration, _
                           mi.VideoBitRate, _
                           mi.VideoBitCount) ', mi.AudioBitsPerSample, mi.AudioChannels);

      ' verify the values
      _result = (MessageBox.Show(_form, info, "Media Info", MessageBoxButtons.YesNo) = DialogResult.Yes)

      ' reset the source
      mi.ResetSource()

      ' set the result to what we expect
      _result = _result And (mi.SourceFile Is Nothing)
   Catch e1 As Exception
      _result = False
   End Try
End Sub

Public NotInheritable Class LEAD_VARS
Public Const MediaDir As String = "C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media"
End Class
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;

public PlayCtrlForm _form = new PlayCtrlForm();
public bool _result = false;
public void ResetSourceExample()
{
   // reference the play control
   PlayCtrl playctrl = _form.PlayCtrl;

   // input file
   string inFile =Path.Combine(LEAD_VARS.MediaDir,"MediaInfo_Source.avi");
   string info = string.Empty;

   try
   {
      // create a new media info object
      MediaInfo mi = new MediaInfo();

      // set the input and output files
      mi.SourceFile = inFile;

      // set the info string
      info = string.Format("Source File={0}\nSource File Size={1}\nSource BitRate={2}\nDuration={3}\nVideoBitRate={4}\nVideoBitCount={5}\n\nAre these values correct?",
          // AudioBitsPerSample={5}\nAudioChannels={6}\n 
         mi.SourceFile, mi.SourceFileSize, mi.SourceBitRate, mi.SourceDuration, mi.VideoBitRate, mi.VideoBitCount); //, mi.AudioBitsPerSample, mi.AudioChannels);

      // verify the values
      _result = (MessageBox.Show(_form, info, "Media Info", MessageBoxButtons.YesNo) == DialogResult.Yes);

      // reset the source
      mi.ResetSource();

      // set the result to what we expect
      _result &= (mi.SourceFile == null);
   }
   catch (Exception)
   {
      _result = false;
   }
}

static class LEAD_VARS
{
public const string MediaDir = @"C:\Program Files (x86)\LEAD Technologies\LEADTOOLS 19\Media";
}
Requirements

Target Platforms

See Also

Reference

MediaInfo Class
MediaInfo Members
StreamMediaType Property
StreamSubtype Property
StreamSubtypeName Property
StreamType Property
StreamTypeName Property
StreamDuration Property

Error processing SSI file
Leadtools.Multimedia requires a Multimedia or Multimedia Suite license and unlock key. For more information, refer to: LEADTOOLS Toolkit Features