public class JavaEncoder extends AbstractCodec2 implements PacketLossAwareEncoder
Modifier and Type | Field and Description |
---|---|
(package private) static int |
MAX_BYTES_PER_FRAME
The maximum number of output payload bytes per input frame.
|
(package private) static javax.media.Format[] |
SUPPORTED_INPUT_FORMATS
The list of Formats of audio data supported as input by
JavaEncoder instances.
|
(package private) static javax.media.Format[] |
SUPPORTED_OUTPUT_FORMATS
The list of Formats of audio data supported as output by
JavaEncoder instances.
|
BUFFER_FLAG_FEC, BUFFER_FLAG_PLC, EMPTY_FORMATS, features, MAX_AUDIO_SEQUENCE_NUMBERS_TO_PLC, SEQUENCE_MAX, SEQUENCE_MIN
Constructor and Description |
---|
JavaEncoder()
Initializes a new
JavaEncoder instance. |
Modifier and Type | Method and Description |
---|---|
protected void |
doClose() |
protected void |
doOpen()
Opens this Codec and acquires the resources that it needs to
operate.
|
protected int |
doProcess(javax.media.Buffer inputBuffer,
javax.media.Buffer outputBuffer) |
java.awt.Component |
getControlComponent()
Stub.
|
protected javax.media.Format[] |
getMatchingOutputFormats(javax.media.Format inputFormat)
Get the output formats matching a specific input format.
|
(package private) static javax.media.Format[] |
getMatchingOutputFormats(javax.media.Format inputFormat,
javax.media.Format[] supportedInputFormats,
javax.media.Format[] supportedOutputFormats) |
javax.media.Format |
getOutputFormat()
Get the output format.
|
void |
setExpectedPacketLoss(int percentage)
Updates the encoder's packet loss percentage.
|
calculateLostSeqNoCount, close, discardOutputBuffer, getName, getSupportedOutputFormats, incrementSeqNo, matches, open, process, setInputFormat, setOutputFormat, specialize, updateOutput, validateByteArraySize, validateShortArraySize
checkInputBuffer, dump, getInputFormat, getSupportedInputFormats, isEOM, propagateEOM
addControl, getControl, getControls, removeControl
static final int MAX_BYTES_PER_FRAME
static final javax.media.Format[] SUPPORTED_INPUT_FORMATS
static final javax.media.Format[] SUPPORTED_OUTPUT_FORMATS
protected void doClose()
doClose
in class AbstractCodec2
protected void doOpen() throws javax.media.ResourceUnavailableException
AbstractCodec2
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 AbstractCodec2
javax.media.ResourceUnavailableException
- if any of the resources that this
Codec needs to operate cannot be acquiredprotected int doProcess(javax.media.Buffer inputBuffer, javax.media.Buffer outputBuffer)
doProcess
in class AbstractCodec2
protected javax.media.Format[] getMatchingOutputFormats(javax.media.Format inputFormat)
getMatchingOutputFormats
in class AbstractCodec2
inputFormat
- the input format to get the matching output formats ofAbstractCodecExt#getMatchingOutputFormats(Format)
static javax.media.Format[] getMatchingOutputFormats(javax.media.Format inputFormat, javax.media.Format[] supportedInputFormats, javax.media.Format[] supportedOutputFormats)
public javax.media.Format getOutputFormat()
getOutputFormat
in class net.sf.fmj.media.AbstractCodec
AbstractCodec.getOutputFormat()
public void setExpectedPacketLoss(int percentage)
setExpectedPacketLoss
in interface PacketLossAwareEncoder
percentage
- the expected packet loss percentage to set.public java.awt.Component getControlComponent()
getControlComponent
in interface javax.media.Control
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.