Package ws.schild.jave.info
Class AudioInfo
- java.lang.Object
-
- ws.schild.jave.info.AudioInfo
-
public class AudioInfo extends java.lang.ObjectInstances of this class report informations about an audio stream that can be decoded.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbitDepthThe audio stream bit depth.private intbitRateThe audio stream (average) bit rate.private intchannelsThe audio stream channels number (1=mono, 2=stereo).private java.lang.StringdecoderThe audio stream decoder name.private java.util.Map<java.lang.String,java.lang.String>metadataThe video metadata.private intsamplingRateThe 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.StringgetBitDepth()Returns the audio stream bit depth.intgetBitRate()Returns the audio stream (average) bit rate.intgetChannels()Returns the audio stream channels number (1=mono, 2=stereo).java.lang.StringgetDecoder()Returns the audio stream decoder name.java.util.Map<java.lang.String,java.lang.String>getMetadata()Returns the audio metadata.intgetSamplingRate()Returns the audio stream sampling rate.voidsetBitDepth(java.lang.String bitDepth)Sets the audio stream bit depth.AudioInfosetBitRate(int bitRate)Sets the audio stream (average) bit rate.AudioInfosetChannels(int channels)Sets the audio stream channels number (1=mono, 2=stereo).AudioInfosetDecoder(java.lang.String format)Sets the audio stream decoder name.AudioInfosetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Sets the audio metadata.AudioInfosetSamplingRate(int samplingRate)Sets the audio stream sampling rate.java.lang.StringtoString()
-
-
-
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.
-
-
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:
toStringin classjava.lang.Object
-
-