Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.codec.audio.mp3
Class JNIEncoder

java.lang.Object
  extended by net.sf.fmj.media.AbstractControls
      extended by net.sf.fmj.media.AbstractPlugIn
          extended by net.sf.fmj.media.AbstractCodec
              extended by net.java.sip.communicator.impl.neomedia.codec.AbstractCodecExt
                  extended by net.java.sip.communicator.impl.neomedia.codec.audio.mp3.JNIEncoder
All Implemented Interfaces:
javax.media.Codec, javax.media.Controls, javax.media.PlugIn

public class JNIEncoder
extends AbstractCodecExt

Implements a MP3 encoder using the native FFmpeg library.

Author:
Lyubomir Marinov

Field Summary
 
Fields inherited from class net.sf.fmj.media.AbstractCodec
inputFormat, inputFormats, opened, outputFormat
 
Fields inherited from interface javax.media.PlugIn
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
Constructor Summary
JNIEncoder()
          Initializes a new JNIEncoder instance.
 
Method Summary
protected  void doClose()
          Implements AbstractCodecExt.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)
          Implements AbstractCodecExt.doProcess(Buffer, Buffer).
 
Methods inherited from class net.java.sip.communicator.impl.neomedia.codec.AbstractCodecExt
close, discardOutputBuffer, getMatchingOutputFormats, getName, getSupportedOutputFormats, matches, open, process, setInputFormat, setOutputFormat, 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.AbstractPlugIn
reset
 
Methods inherited from class net.sf.fmj.media.AbstractControls
addControl, getControl, getControls, removeControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.media.PlugIn
reset
 
Methods inherited from interface javax.media.Controls
getControl, getControls
 

Constructor Detail

JNIEncoder

public JNIEncoder()
Initializes a new JNIEncoder instance.

Method Detail

doClose

protected void doClose()
Implements AbstractCodecExt.doClose().

Specified by:
doClose in class AbstractCodecExt
See Also:
AbstractCodecExt.doClose()

doOpen

protected void doOpen()
               throws javax.media.ResourceUnavailableException
Opens this Codec and acquires the resources that it needs to operate. A call to 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.

Specified by:
doOpen in class AbstractCodecExt
Throws:
javax.media.ResourceUnavailableException - if any of the resources that this Codec needs to operate cannot be acquired
See Also:
AbstractCodecExt.doOpen()

doProcess

protected int doProcess(javax.media.Buffer inputBuffer,
                        javax.media.Buffer outputBuffer)
Implements AbstractCodecExt.doProcess(Buffer, Buffer).

Specified by:
doProcess in class AbstractCodecExt
Parameters:
inputBuffer -
outputBuffer -
See Also:
AbstractCodecExt.doProcess(Buffer, Buffer)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.