Class AudioInfo

java.lang.Object
ws.schild.jave.info.AudioInfo

public class AudioInfo extends Object
Instances of this class report informations about an audio stream that can be decoded.
Author:
Carlo Pelliccia
  • Constructor Details

    • AudioInfo

      public AudioInfo()
  • Method Details

    • getDecoder

      public String getDecoder()
      Returns the audio stream decoder name.
      Returns:
      The audio stream decoder name.
    • setDecoder

      public AudioInfo setDecoder(String format)
      Sets the audio stream decoder name.
      Parameters:
      format - The audio stream format name.
      Returns:
      this instance
    • getSamplingRate

      public int getSamplingRate()
      Returns the audio stream sampling rate. If less than 0, this information is not available.
      Returns:
      The audio stream sampling rate.
    • setSamplingRate

      public AudioInfo setSamplingRate(int samplingRate)
      Sets the audio stream sampling rate.
      Parameters:
      samplingRate - The audio stream sampling rate.
      Returns:
      this instance
    • getChannels

      public int getChannels()
      Returns the audio stream channels number (1=mono, 2=stereo). If less than 0, this information is not available.
      Returns:
      the channels The audio stream channels number (1=mono, 2=stereo).
    • setChannels

      public AudioInfo setChannels(int channels)
      Sets the audio stream channels number (1=mono, 2=stereo).
      Parameters:
      channels - The audio stream channels number (1=mono, 2=stereo).
      Returns:
      this instance
    • getBitRate

      public int getBitRate()
      Returns the audio stream (average) bit rate. If less than 0, this information is not available.
      Returns:
      The audio stream (average) bit rate.
    • setBitRate

      public AudioInfo setBitRate(int bitRate)
      Sets the audio stream (average) bit rate.
      Parameters:
      bitRate - The audio stream (average) bit rate.
      Returns:
      this instance
    • getBitDepth

      public String getBitDepth()
      Returns the audio stream bit depth.
      Returns:
      The audio stream bit depth.
    • setBitDepth

      public void setBitDepth(String bitDepth)
      Sets the audio stream bit depth.
      Parameters:
      bitDepth - The audio stream bit depth.
    • getMetadata

      public Map<String,String> getMetadata()
      Returns the audio metadata.
      Returns:
      The audio metadata.
    • setMetadata

      public AudioInfo setMetadata(Map<String,String> metadata)
      Sets the audio metadata.
      Parameters:
      metadata - The audio metadata.
      Returns:
      this instance
    • toString

      public String toString()
      Overrides:
      toString in class Object