public class FFmpegAudioEncoder extends AbstractFFmpegAudioCodec
Modifier and Type | Field and Description |
---|---|
protected int |
prevInLen
The length of the valid audio data in
prevIn . |
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 |
FFmpegAudioEncoder(java.lang.String name,
int codecID,
javax.media.Format[] supportedOutputFormats)
Initializes a new FFmpegAudioEncoder 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 encoder with a specific AVCodecID is found by
FFmpeg.
|
protected void |
configureAVCodecContext(long avctx,
javax.media.format.AudioFormat format)
Configures the AVCodecContext initialized in
AbstractFFmpegAudioCodec.doOpen()
prior to invoking one of the FFmpeg functions in the
avcodec_open family. |
protected void |
doClose() |
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, doOpen
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 int prevInLen
prevIn
.protected FFmpegAudioEncoder(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 encoder to findjava.lang.RuntimeException
- if no encoder with the specified
codecID is found by FFmpegprotected void configureAVCodecContext(long avctx, javax.media.format.AudioFormat format)
AbstractFFmpegAudioCodec.doOpen()
prior to invoking one of the FFmpeg functions in the
avcodec_open family. Allows extenders to override and provide
additional, optional configuration.configureAVCodecContext
in class AbstractFFmpegAudioCodec
avctx
- the AVCodecContext to configureformat
- the AudioFormat with which avctx is being
configuredprotected void doClose()
doClose
in class AbstractFFmpegAudioCodec
protected 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.