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.
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.
(->format-conversion-provider)
Constructor.
Constructor.
(conversion-supported? this target-encoding source-format)
Indicates whether the format converter supports conversion to a particular encoding from a particular format.
target-encoding - desired encoding of the outgoing data - javax.sound.sampled.AudioFormat.Encoding
source-format - format of the incoming data - javax.sound.sampled.AudioFormat
returns: true if the conversion is supported, otherwise false - boolean
Indicates whether the format converter supports conversion to a particular encoding from a particular format. target-encoding - desired encoding of the outgoing data - `javax.sound.sampled.AudioFormat.Encoding` source-format - format of the incoming data - `javax.sound.sampled.AudioFormat` returns: true if the conversion is supported, otherwise false - `boolean`
(get-audio-input-stream this target-encoding source-stream)
Obtains an audio input stream with the specified encoding from the given audio input stream.
target-encoding - desired encoding of the stream after processing - javax.sound.sampled.AudioFormat.Encoding
source-stream - stream from which data to be processed should be read - javax.sound.sampled.AudioInputStream
returns: stream from which processed data with the specified target encoding may be read - javax.sound.sampled.AudioInputStream
throws: java.lang.IllegalArgumentException - if the format combination supplied is not supported.
Obtains an audio input stream with the specified encoding from the given audio input stream. target-encoding - desired encoding of the stream after processing - `javax.sound.sampled.AudioFormat.Encoding` source-stream - stream from which data to be processed should be read - `javax.sound.sampled.AudioInputStream` returns: stream from which processed data with the specified target encoding may be read - `javax.sound.sampled.AudioInputStream` throws: java.lang.IllegalArgumentException - if the format combination supplied is not supported.
(get-source-encodings this)
Obtains the set of source format encodings from which format conversion services are provided by this provider.
returns: array of source format encodings. If for some reason provider
does not provide any conversion services, an array of length 0 is
returned. - javax.sound.sampled.AudioFormat.Encoding[]
Obtains the set of source format encodings from which format conversion services are provided by this provider. returns: array of source format encodings. If for some reason provider does not provide any conversion services, an array of length 0 is returned. - `javax.sound.sampled.AudioFormat.Encoding[]`
(get-target-encodings this)
(get-target-encodings this source-format)
Obtains the set of target format encodings supported by the format converter given a particular source format. If no target format encodings are supported for this source format, an array of length 0 is returned.
source-format - format of the incoming data - javax.sound.sampled.AudioFormat
returns: array of supported target format encodings. - javax.sound.sampled.AudioFormat.Encoding[]
Obtains the set of target format encodings supported by the format converter given a particular source format. If no target format encodings are supported for this source format, an array of length 0 is returned. source-format - format of the incoming data - `javax.sound.sampled.AudioFormat` returns: array of supported target format encodings. - `javax.sound.sampled.AudioFormat.Encoding[]`
(get-target-formats this target-encoding source-format)
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned.
target-encoding - desired encoding of the stream after processing - javax.sound.sampled.AudioFormat.Encoding
source-format - format of the incoming data - javax.sound.sampled.AudioFormat
returns: array of supported target formats. - javax.sound.sampled.AudioFormat[]
Obtains the set of target formats with the encoding specified supported by the format converter If no target formats with the specified encoding are supported for this source format, an array of length 0 is returned. target-encoding - desired encoding of the stream after processing - `javax.sound.sampled.AudioFormat.Encoding` source-format - format of the incoming data - `javax.sound.sampled.AudioFormat` returns: array of supported target formats. - `javax.sound.sampled.AudioFormat[]`
(source-encoding-supported? this source-encoding)
Indicates whether the format converter supports conversion from the specified source format encoding.
source-encoding - the source format encoding for which support is queried - javax.sound.sampled.AudioFormat.Encoding
returns: true if the encoding is supported, otherwise false - boolean
Indicates whether the format converter supports conversion from the specified source format encoding. source-encoding - the source format encoding for which support is queried - `javax.sound.sampled.AudioFormat.Encoding` returns: true if the encoding is supported, otherwise false - `boolean`
(target-encoding-supported? this target-encoding)
Indicates whether the format converter supports conversion to the specified target format encoding.
target-encoding - the target format encoding for which support is queried - javax.sound.sampled.AudioFormat.Encoding
returns: true if the encoding is supported, otherwise false - boolean
Indicates whether the format converter supports conversion to the specified target format encoding. target-encoding - the target format encoding for which support is queried - `javax.sound.sampled.AudioFormat.Encoding` returns: true if the encoding is supported, otherwise false - `boolean`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close