Class 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
    • Constructor Detail

      • JNIEncoder

        public JNIEncoder()
        Initializes a new JNIEncoder instance.
    • Method Detail

      • configureAVCodecContext

        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. Allows extenders to override and provide additional, optional configuration.
        Overrides:
        configureAVCodecContext in class FFmpegAudioEncoder
        Parameters:
        avctx - the AVCodecContext to configure
        format - the AudioFormat with which avctx is being configured
      • doProcess

        protected int doProcess​(javax.media.Buffer inBuf,
                                javax.media.Buffer outBuf)
        Overrides:
        doProcess in class FFmpegAudioEncoder
      • setOutputFormat

        public javax.media.Format setOutputFormat​(javax.media.Format format)
        Additionally, determines whether this JNIEncoder is to perform RTP packetization.
        Specified by:
        setOutputFormat in interface javax.media.Codec
        Overrides:
        setOutputFormat in class AbstractCodec2
      • getOutputFormat

        public javax.media.Format getOutputFormat()
        Gets the Format of the media output by this Codec.
        Overrides:
        getOutputFormat in class net.sf.fmj.media.AbstractCodec
        Returns:
        the Format of the media output by this Codec
        See Also:
        AbstractCodec.getOutputFormat()