|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sound.sampled.spi.FormatConversionProvider org.xiph.speex.spi.SpeexFormatConvertionProvider
A format conversion provider provides format conversion services from one or more input formats to one or more output formats. Converters include codecs, which encode and/or decode audio data, as well as transcoders, etc. Format converters provide methods for determining what conversions are supported and for obtaining an audio stream from which converted data can be read. The source format represents the format of the incoming audio data, which will be converted. The target format represents the format of the processed, converted audio data. This is the format of the data that can be read from the stream returned by one of the getAudioInputStream methods.
Field Summary | |
static javax.sound.sampled.AudioFormat.Encoding[] |
BOTH_ENCODINGS
|
static javax.sound.sampled.AudioFormat.Encoding[] |
NO_ENCODING
|
static javax.sound.sampled.AudioFormat[] |
NO_FORMAT
|
static javax.sound.sampled.AudioFormat.Encoding[] |
PCM_ENCODING
|
static javax.sound.sampled.AudioFormat.Encoding[] |
SPEEX_ENCODING
|
Constructor Summary | |
SpeexFormatConvertionProvider()
|
Method Summary | |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(javax.sound.sampled.AudioFormat.Encoding targetEncoding,
javax.sound.sampled.AudioInputStream sourceStream)
Obtains an audio input stream with the specified encoding from the given audio input stream. |
javax.sound.sampled.AudioInputStream |
getAudioInputStream(javax.sound.sampled.AudioFormat targetFormat,
javax.sound.sampled.AudioInputStream sourceStream)
Obtains an audio input stream with the specified format from the given audio input stream. |
javax.sound.sampled.AudioFormat.Encoding[] |
getSourceEncodings()
Obtains the set of source format encodings from which format conversion services are provided by this provider. |
javax.sound.sampled.AudioFormat.Encoding[] |
getTargetEncodings()
Obtains the set of target format encodings to which format conversion services are provided by this provider. |
javax.sound.sampled.AudioFormat.Encoding[] |
getTargetEncodings(javax.sound.sampled.AudioFormat sourceFormat)
Obtains the set of target format encodings supported by the format converter given a particular source format. |
javax.sound.sampled.AudioFormat[] |
getTargetFormats(javax.sound.sampled.AudioFormat.Encoding targetEncoding,
javax.sound.sampled.AudioFormat sourceFormat)
Obtains the set of target formats with the encoding specified supported by the format converter. |
Methods inherited from class javax.sound.sampled.spi.FormatConversionProvider |
isConversionSupported, isConversionSupported, isSourceEncodingSupported, isTargetEncodingSupported |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final javax.sound.sampled.AudioFormat.Encoding[] NO_ENCODING
public static final javax.sound.sampled.AudioFormat.Encoding[] PCM_ENCODING
public static final javax.sound.sampled.AudioFormat.Encoding[] SPEEX_ENCODING
public static final javax.sound.sampled.AudioFormat.Encoding[] BOTH_ENCODINGS
public static final javax.sound.sampled.AudioFormat[] NO_FORMAT
Constructor Detail |
public SpeexFormatConvertionProvider()
Method Detail |
public javax.sound.sampled.AudioFormat.Encoding[] getSourceEncodings()
public javax.sound.sampled.AudioFormat.Encoding[] getTargetEncodings()
public javax.sound.sampled.AudioFormat.Encoding[] getTargetEncodings(javax.sound.sampled.AudioFormat sourceFormat)
sourceFormat
- format of the incoming data.
public javax.sound.sampled.AudioFormat[] getTargetFormats(javax.sound.sampled.AudioFormat.Encoding targetEncoding, javax.sound.sampled.AudioFormat sourceFormat)
targetEncoding
- desired encoding of the outgoing data.sourceFormat
- format of the incoming data.
public javax.sound.sampled.AudioInputStream getAudioInputStream(javax.sound.sampled.AudioFormat.Encoding targetEncoding, javax.sound.sampled.AudioInputStream sourceStream)
targetEncoding
- - desired encoding of the stream after processing.sourceStream
- - stream from which data to be processed should be read.
java.lang.IllegalArgumentException
- - if the format combination supplied
is not supported.public javax.sound.sampled.AudioInputStream getAudioInputStream(javax.sound.sampled.AudioFormat targetFormat, javax.sound.sampled.AudioInputStream sourceStream)
targetFormat
- - desired data format of the stream after processing.sourceStream
- - stream from which data to be processed should be read.
java.lang.IllegalArgumentException
- - if the format combination supplied
is not supported.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |