public class FFmpegAudioDecoder extends AbstractFFmpegAudioCodec
avctx, codecID, frameSizeInBytes
BUFFER_FLAG_FEC, BUFFER_FLAG_PLC, EMPTY_FORMATS, features, MAX_AUDIO_SEQUENCE_NUMBERS_TO_PLC, SEQUENCE_MAX, SEQUENCE_MIN
Modifier | Constructor and Description |
---|---|
protected |
FFmpegAudioDecoder(java.lang.String name,
int codecID,
javax.media.Format[] supportedOutputFormats)
Initializes a new FFmpegAudioDecoder instance with a specific
PlugIn name, a specific AVCodecID, and a specific list
of Formats supported as output.
|
Modifier and Type | Method and Description |
---|---|
static void |
assertFindAVCodec(int codecID)
Asserts that an decoder with a specific AVCodecID is found by
FFmpeg.
|
protected void |
doClose() |
protected void |
doOpen()
Opens this Codec and acquires the resources that it needs to
operate.
|
protected int |
doProcess(javax.media.Buffer inBuf,
javax.media.Buffer outBuf) |
protected long |
findAVCodec(int codecID)
Finds an AVCodec with a specific AVCodecID.
|
protected javax.media.format.AudioFormat |
getAVCodecContextFormat()
Gets the AudioFormat with which
AbstractFFmpegAudioCodec.avctx is to be
configured and opened by AbstractFFmpegAudioCodec.doOpen() . |
codecIDToString, configureAVCodecContext
calculateLostSeqNoCount, close, discardOutputBuffer, getMatchingOutputFormats, getName, getSupportedOutputFormats, incrementSeqNo, matches, open, process, setInputFormat, setOutputFormat, specialize, updateOutput, validateByteArraySize, validateShortArraySize
checkInputBuffer, dump, getInputFormat, getOutputFormat, getSupportedInputFormats, isEOM, propagateEOM
addControl, getControl, getControls, removeControl
protected FFmpegAudioDecoder(java.lang.String name, int codecID, javax.media.Format[] supportedOutputFormats)
name
- the PlugIn name of the new instancecodecID
- the AVCodecID of the FFmpeg codec to be
represented by the new instancesupportedOutputFormats
- the list of Formats supported by
the new instance as outputpublic static void assertFindAVCodec(int codecID)
codecID
- the AVCodecID of the decoder to findjava.lang.RuntimeException
- if no decoder with the specified
codecID is found by FFmpegprotected void doClose()
doClose
in class AbstractFFmpegAudioCodec
protected void doOpen() throws javax.media.ResourceUnavailableException
PlugIn.open()
on this instance will result in
a call to doOpen only if AbstractCodec.opened
is
false. All required input and/or output formats are assumed to
have been set on this Codec before doOpen is called.doOpen
in class AbstractFFmpegAudioCodec
javax.media.ResourceUnavailableException
- if any of the resources that this
Codec needs to operate cannot be acquiredprotected int doProcess(javax.media.Buffer inBuf, javax.media.Buffer outBuf)
doProcess
in class AbstractCodec2
protected long findAVCodec(int codecID)
AbstractFFmpegAudioCodec.doOpen()
in order to (eventually) open a new
AVCodecContext.findAVCodec
in class AbstractFFmpegAudioCodec
codecID
- the AVCodecID of the AVCodec to findprotected javax.media.format.AudioFormat getAVCodecContextFormat()
AbstractFFmpegAudioCodec.avctx
is to be
configured and opened by AbstractFFmpegAudioCodec.doOpen()
.getAVCodecContextFormat
in class AbstractFFmpegAudioCodec
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.