Class JNIDecoder
- 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.opus.JNIDecoder
-
- All Implemented Interfaces:
javax.media.Codec,javax.media.Control,javax.media.Controls,javax.media.PlugIn,FECDecoderControl
public class JNIDecoder extends AbstractCodec2 implements FECDecoderControl
Implements an Opus decoder.- Author:
- Boris Grozev, Lyubomir Marinov
-
-
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 JNIDecoder()Initializes a new JNIDecoder instance.
-
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 inBuf, javax.media.Buffer outBuf)Decodes an Opus packet.intfecPacketsDecoded()Returns the number of packets decoded with FEC.ComponentgetControlComponent()ImplementsControl.getControlComponent().protected javax.media.Format[]getMatchingOutputFormats(javax.media.Format inputFormat)Gets the Formats which are supported by this Codec as output when the input is in a specific Format.javax.media.FormatsetInputFormat(javax.media.Format format)Makes sure that the outputFormat of this instance is in accord with the inputFormat of this instance.javax.media.FormatsetOutputFormat(javax.media.Format format)-
Methods inherited from class org.jitsi.impl.neomedia.codec.AbstractCodec2
calculateLostSeqNoCount, close, discardOutputBuffer, getName, getSupportedOutputFormats, incrementSeqNo, matches, open, process, specialize, updateOutput, validateByteArraySize, validateShortArraySize
-
Methods inherited from class net.sf.fmj.media.AbstractCodec
checkInputBuffer, dump, getInputFormat, getOutputFormat, 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- See Also:
AbstractCodec2.doClose()
-
doOpen
protected void doOpen() throws javax.media.ResourceUnavailableExceptionOpens 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- See Also:
AbstractCodec2.doOpen()
-
doProcess
protected int doProcess(javax.media.Buffer inBuf, javax.media.Buffer outBuf)Decodes an Opus packet.- Specified by:
doProcessin classAbstractCodec2
-
fecPacketsDecoded
public int fecPacketsDecoded()
Returns the number of packets decoded with FEC.- Specified by:
fecPacketsDecodedin interfaceFECDecoderControl- Returns:
- the number of packets decoded with FEC
-
getControlComponent
public Component getControlComponent()
ImplementsControl.getControlComponent(). JNIDecoder does not provide user interface of its own.- Specified by:
getControlComponentin interfacejavax.media.Control- Returns:
- null to signify that JNIDecoder does not provide user interface of its own
-
getMatchingOutputFormats
protected javax.media.Format[] getMatchingOutputFormats(javax.media.Format inputFormat)
Gets the Formats which are supported by this Codec as output when the input is in a specific Format.- Overrides:
getMatchingOutputFormatsin classAbstractCodec2- Parameters:
inputFormat- the Format of the input for which the supported output Formats are to be returned- Returns:
- an array of Formats supported by this Codec as output when the input is in the specified inputFormat
-
setInputFormat
public javax.media.Format setInputFormat(javax.media.Format format)
Makes sure that the outputFormat of this instance is in accord with the inputFormat of this instance.- Specified by:
setInputFormatin interfacejavax.media.Codec- Overrides:
setInputFormatin classAbstractCodec2
-
setOutputFormat
public javax.media.Format setOutputFormat(javax.media.Format format)
- Specified by:
setOutputFormatin interfacejavax.media.Codec- Overrides:
setOutputFormatin classAbstractCodec2
-
-