Class JNIEncoder
- 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.AbstractFFmpegAudioCodec
-
- org.jitsi.impl.neomedia.codec.audio.FFmpegAudioEncoder
-
- org.jitsi.impl.neomedia.codec.audio.amrwb.JNIEncoder
-
- All Implemented Interfaces:
javax.media.Codec,javax.media.Controls,javax.media.PlugIn
public class JNIEncoder extends FFmpegAudioEncoder
Implements an Adaptive Multi-Rate Wideband (AMR-WB) encoder using FFmpeg.- Author:
- Lyubomir Marinov
-
-
Field Summary
-
Fields inherited from class org.jitsi.impl.neomedia.codec.audio.FFmpegAudioEncoder
prevInLen
-
Fields inherited from class org.jitsi.impl.neomedia.codec.audio.AbstractFFmpegAudioCodec
avctx, codecID, frameSizeInBytes
-
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 JNIEncoder()Initializes a new JNIEncoder instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureAVCodecContext(long avctx, javax.media.format.AudioFormat format)Configures the AVCodecContext initialized inAbstractFFmpegAudioCodec.doOpen()prior to invoking one of the FFmpeg functions in the avcodec_open family.protected intdoProcess(javax.media.Buffer inBuf, javax.media.Buffer outBuf)javax.media.FormatgetOutputFormat()Gets the Format of the media output by this Codec.javax.media.FormatsetOutputFormat(javax.media.Format format)Additionally, determines whether this JNIEncoder is to perform RTP packetization.-
Methods inherited from class org.jitsi.impl.neomedia.codec.audio.FFmpegAudioEncoder
assertFindAVCodec, doClose, findAVCodec, getAVCodecContextFormat
-
Methods inherited from class org.jitsi.impl.neomedia.codec.audio.AbstractFFmpegAudioCodec
codecIDToString, doOpen
-
Methods inherited from class org.jitsi.impl.neomedia.codec.AbstractCodec2
calculateLostSeqNoCount, close, discardOutputBuffer, getMatchingOutputFormats, getName, getSupportedOutputFormats, incrementSeqNo, matches, open, process, setInputFormat, 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
-
configureAVCodecContext
protected void configureAVCodecContext(long avctx, javax.media.format.AudioFormat format)Configures the AVCodecContext initialized inAbstractFFmpegAudioCodec.doOpen()prior to invoking one of the FFmpeg functions in the avcodec_open family. Allows extenders to override and provide additional, optional configuration.- Overrides:
configureAVCodecContextin classFFmpegAudioEncoder- Parameters:
avctx- the AVCodecContext to configureformat- the AudioFormat with which avctx is being configured
-
doProcess
protected int doProcess(javax.media.Buffer inBuf, javax.media.Buffer outBuf)- Overrides:
doProcessin classFFmpegAudioEncoder
-
setOutputFormat
public javax.media.Format setOutputFormat(javax.media.Format format)
Additionally, determines whether this JNIEncoder is to perform RTP packetization.- Specified by:
setOutputFormatin interfacejavax.media.Codec- Overrides:
setOutputFormatin classAbstractCodec2
-
getOutputFormat
public javax.media.Format getOutputFormat()
Gets the Format of the media output by this Codec.- Overrides:
getOutputFormatin classnet.sf.fmj.media.AbstractCodec- Returns:
- the Format of the media output by this Codec
- See Also:
AbstractCodec.getOutputFormat()
-
-