Package ws.schild.jave.info
Class AudioInfo
java.lang.Object
ws.schild.jave.info.AudioInfo
Instances of this class report informations about an audio stream that can be decoded.
- Author:
- Carlo Pelliccia
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the audio stream bit depth.intReturns the audio stream (average) bit rate.intReturns the audio stream channels number (1=mono, 2=stereo).Returns the audio stream decoder name.Returns the audio metadata.intReturns the audio stream sampling rate.voidsetBitDepth(String bitDepth) Sets the audio stream bit depth.setBitRate(int bitRate) Sets the audio stream (average) bit rate.setChannels(int channels) Sets the audio stream channels number (1=mono, 2=stereo).setDecoder(String format) Sets the audio stream decoder name.setMetadata(Map<String, String> metadata) Sets the audio metadata.setSamplingRate(int samplingRate) Sets the audio stream sampling rate.toString()
-
Constructor Details
-
AudioInfo
public AudioInfo()
-
-
Method Details
-
getDecoder
Returns the audio stream decoder name.- Returns:
- The audio stream decoder name.
-
setDecoder
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
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
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
Sets the audio stream (average) bit rate.- Parameters:
bitRate- The audio stream (average) bit rate.- Returns:
- this instance
-
getBitDepth
Returns the audio stream bit depth.- Returns:
- The audio stream bit depth.
-
setBitDepth
Sets the audio stream bit depth.- Parameters:
bitDepth- The audio stream bit depth.
-
getMetadata
Returns the audio metadata.- Returns:
- The audio metadata.
-
setMetadata
Sets the audio metadata.- Parameters:
metadata- The audio metadata.- Returns:
- this instance
-
toString
-