Class AudioInfo


  • public class AudioInfo
    extends java.lang.Object
    Instances of this class report informations about an audio stream that can be decoded.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String bitDepth
      The audio stream bit depth.
      private int bitRate
      The audio stream (average) bit rate.
      private int channels
      The audio stream channels number (1=mono, 2=stereo).
      private java.lang.String decoder
      The audio stream decoder name.
      private java.util.Map<java.lang.String,​java.lang.String> metadata
      The video metadata.
      private int samplingRate
      The audio stream sampling rate.
    • Constructor Summary

      Constructors 
      Constructor Description
      AudioInfo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBitDepth()
      Returns the audio stream bit depth.
      int getBitRate()
      Returns the audio stream (average) bit rate.
      int getChannels()
      Returns the audio stream channels number (1=mono, 2=stereo).
      java.lang.String getDecoder()
      Returns the audio stream decoder name.
      java.util.Map<java.lang.String,​java.lang.String> getMetadata()
      Returns the audio metadata.
      int getSamplingRate()
      Returns the audio stream sampling rate.
      void setBitDepth​(java.lang.String bitDepth)
      Sets the audio stream bit depth.
      AudioInfo setBitRate​(int bitRate)
      Sets the audio stream (average) bit rate.
      AudioInfo setChannels​(int channels)
      Sets the audio stream channels number (1=mono, 2=stereo).
      AudioInfo setDecoder​(java.lang.String format)
      Sets the audio stream decoder name.
      AudioInfo setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
      Sets the audio metadata.
      AudioInfo setSamplingRate​(int samplingRate)
      Sets the audio stream sampling rate.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • decoder

        private java.lang.String decoder
        The audio stream decoder name.
      • samplingRate

        private int samplingRate
        The audio stream sampling rate. If less than 0, this information is not available.
      • channels

        private int channels
        The audio stream channels number (1=mono, 2=stereo). If less than 0, this information is not available.
      • bitRate

        private int bitRate
        The audio stream (average) bit rate. If less than 0, this information is not available.
      • bitDepth

        private java.lang.String bitDepth
        The audio stream bit depth.
      • metadata

        private java.util.Map<java.lang.String,​java.lang.String> metadata
        The video metadata.
    • Constructor Detail

      • AudioInfo

        public AudioInfo()
    • Method Detail

      • getDecoder

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

        public AudioInfo setDecoder​(java.lang.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 java.lang.String getBitDepth()
        Returns the audio stream bit depth.
        Returns:
        The audio stream bit depth.
      • setBitDepth

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

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object