Class JavaEncoder
- java.lang.Object
-
- net.sf.fmj.media.AbstractControls
-
- net.sf.fmj.media.AbstractPlugIn
-
- net.sf.fmj.media.AbstractCodec
-
- org.jitsi.impl.neomedia.codec.AbstractCodec2
-
- org.jitsi.impl.neomedia.codec.audio.silk.JavaEncoder
-
- All Implemented Interfaces:
javax.media.Codec,javax.media.Control,javax.media.Controls,javax.media.PlugIn,PacketLossAwareEncoder
public class JavaEncoder extends AbstractCodec2 implements PacketLossAwareEncoder
Implements the SILK encoder as an FMJ/JMF Codec.- Author:
- Dingxin Xu, Boris Grozev
-
-
Field Summary
-
Fields inherited from class org.jitsi.impl.neomedia.codec.AbstractCodec2
BUFFER_FLAG_FEC, BUFFER_FLAG_PLC, EMPTY_FORMATS, features, MAX_AUDIO_SEQUENCE_NUMBERS_TO_PLC, SEQUENCE_MAX, SEQUENCE_MIN
-
-
Constructor Summary
Constructors Constructor Description JavaEncoder()Initializes a newJavaEncoderinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoClose()protected voiddoOpen()Opens this Codec and acquires the resources that it needs to operate.protected intdoProcess(javax.media.Buffer inputBuffer, javax.media.Buffer outputBuffer)ComponentgetControlComponent()Stub.protected javax.media.Format[]getMatchingOutputFormats(javax.media.Format inputFormat)Get the output formats matching a specific input format.javax.media.FormatgetOutputFormat()Get the output format.voidsetExpectedPacketLoss(int percentage)Updates the encoder's packet loss percentage.-
Methods inherited from class org.jitsi.impl.neomedia.codec.AbstractCodec2
calculateLostSeqNoCount, close, discardOutputBuffer, getName, getSupportedOutputFormats, incrementSeqNo, matches, open, process, setInputFormat, setOutputFormat, specialize, updateOutput, validateByteArraySize, validateShortArraySize
-
Methods inherited from class net.sf.fmj.media.AbstractCodec
checkInputBuffer, dump, getInputFormat, getSupportedInputFormats, isEOM, propagateEOM
-
Methods inherited from class net.sf.fmj.media.AbstractControls
addControl, getControl, getControls, removeControl
-
-
-
-
Method Detail
-
doClose
protected void doClose()
- Specified by:
doClosein classAbstractCodec2
-
doOpen
protected void doOpen() throws javax.media.ResourceUnavailableExceptionDescription copied from class:AbstractCodec2Opens this Codec and acquires the resources that it needs to operate. A call toPlugIn.open()on this instance will result in a call to doOpen only ifAbstractCodec.openedis false. All required input and/or output formats are assumed to have been set on this Codec before doOpen is called.- Specified by:
doOpenin classAbstractCodec2- Throws:
javax.media.ResourceUnavailableException- if any of the resources that this Codec needs to operate cannot be acquired
-
doProcess
protected int doProcess(javax.media.Buffer inputBuffer, javax.media.Buffer outputBuffer)- Specified by:
doProcessin classAbstractCodec2
-
getMatchingOutputFormats
protected javax.media.Format[] getMatchingOutputFormats(javax.media.Format inputFormat)
Get the output formats matching a specific input format.- Overrides:
getMatchingOutputFormatsin classAbstractCodec2- Parameters:
inputFormat- the input format to get the matching output formats of- Returns:
- the output formats matching the specified input format
- See Also:
AbstractCodec2.getMatchingOutputFormats(Format)
-
getOutputFormat
public javax.media.Format getOutputFormat()
Get the output format.- Overrides:
getOutputFormatin classnet.sf.fmj.media.AbstractCodec- Returns:
- output format
- See Also:
AbstractCodec.getOutputFormat()
-
setExpectedPacketLoss
public void setExpectedPacketLoss(int percentage)
Updates the encoder's packet loss percentage. Takes into account this.alwaysAssumePacketLoss.- Specified by:
setExpectedPacketLossin interfacePacketLossAwareEncoder- Parameters:
percentage- the expected packet loss percentage to set.
-
getControlComponent
public Component getControlComponent()
Stub. Only added in order to implement the PacketLossAwareEncoder interface.- Specified by:
getControlComponentin interfacejavax.media.Control- Returns:
- null
-
-