|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.fmj.media.AbstractControls
net.sf.fmj.media.AbstractPlugIn
net.sf.fmj.media.AbstractCodec
net.java.sip.communicator.impl.neomedia.codec.AbstractCodecExt
public abstract class AbstractCodecExt
Extends FMJ's AbstractCodec to make it even easier to implement a Codec.
| 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 | |
|---|---|
protected |
AbstractCodecExt(String name,
Class<? extends javax.media.Format> formatClass,
javax.media.Format[] supportedOutputFormats)
Initializes a new AbstractCodecExt instance with a specific PlugIn name, a specific Class of input and output Formats and a specific list of Formats supported as output. |
| Method Summary | |
|---|---|
void |
close()
|
protected void |
discardOutputBuffer(javax.media.Buffer outputBuffer)
|
protected abstract void |
doClose()
|
protected abstract void |
doOpen()
Opens this Codec and acquires the resources that it needs to operate. |
protected abstract int |
doProcess(javax.media.Buffer inputBuffer,
javax.media.Buffer outputBuffer)
|
protected javax.media.Format[] |
getMatchingOutputFormats(javax.media.Format inputFormat)
Get the output formats matching a specific input format. |
String |
getName()
|
javax.media.Format[] |
getSupportedOutputFormats(javax.media.Format inputFormat)
Implements AbstractCodec.getSupportedOutputFormats(Format). |
static javax.media.Format |
matches(javax.media.Format in,
javax.media.Format[] outs)
Utility to perform format matching. |
void |
open()
Opens this PlugIn software or hardware component and acquires the resources that it needs to operate. |
int |
process(javax.media.Buffer inputBuffer,
javax.media.Buffer outputBuffer)
Implements AbstractCodec#process(Buffer, Buffer). |
javax.media.Format |
setInputFormat(javax.media.Format format)
|
javax.media.Format |
setOutputFormat(javax.media.Format format)
|
protected void |
updateOutput(javax.media.Buffer outputBuffer,
javax.media.Format format,
int length,
int offset)
Updates the format, length and offset of a specific output Buffer to specific values. |
protected byte[] |
validateByteArraySize(javax.media.Buffer buffer,
int newSize)
|
protected short[] |
validateShortArraySize(javax.media.Buffer buffer,
int newSize)
|
| 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 |
|---|
protected AbstractCodecExt(String name,
Class<? extends javax.media.Format> formatClass,
javax.media.Format[] supportedOutputFormats)
name - the PlugIn name of the new instanceformatClass - the Class of input and output
Formats supported by the new instancesupportedOutputFormats - the list of Formats supported by
the new instance as output| Method Detail |
|---|
public void close()
close in interface javax.media.PlugInclose in class net.sf.fmj.media.AbstractPlugInprotected void discardOutputBuffer(javax.media.Buffer outputBuffer)
protected abstract void doClose()
protected abstract void doOpen()
throws javax.media.ResourceUnavailableException
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.
javax.media.ResourceUnavailableException - if any of the resources that this
Codec needs to operate cannot be acquired
protected abstract int doProcess(javax.media.Buffer inputBuffer,
javax.media.Buffer outputBuffer)
protected javax.media.Format[] getMatchingOutputFormats(javax.media.Format inputFormat)
inputFormat - the input format to get the matching output formats of
public String getName()
getName in interface javax.media.PlugIngetName in class net.sf.fmj.media.AbstractPlugInpublic javax.media.Format[] getSupportedOutputFormats(javax.media.Format inputFormat)
AbstractCodec.getSupportedOutputFormats(Format).
getSupportedOutputFormats in interface javax.media.CodecgetSupportedOutputFormats in class net.sf.fmj.media.AbstractCodecinputFormat - input format
AbstractCodec.getSupportedOutputFormats(Format)
public static javax.media.Format matches(javax.media.Format in,
javax.media.Format[] outs)
in - input formatouts - array of output formats
public void open()
throws javax.media.ResourceUnavailableException
open in interface javax.media.PlugInopen in class net.sf.fmj.media.AbstractPlugInjavax.media.ResourceUnavailableException - if any of the resources that this
PlugIn needs to operate cannot be acquiredAbstractPlugIn.open()
public int process(javax.media.Buffer inputBuffer,
javax.media.Buffer outputBuffer)
process in interface javax.media.Codecprocess in class net.sf.fmj.media.AbstractCodecinputBuffer - outputBuffer -
AbstractCodec.process(Buffer, Buffer)public javax.media.Format setInputFormat(javax.media.Format format)
setInputFormat in interface javax.media.CodecsetInputFormat in class net.sf.fmj.media.AbstractCodecpublic javax.media.Format setOutputFormat(javax.media.Format format)
setOutputFormat in interface javax.media.CodecsetOutputFormat in class net.sf.fmj.media.AbstractCodec
protected void updateOutput(javax.media.Buffer outputBuffer,
javax.media.Format format,
int length,
int offset)
outputBuffer - the output Buffer to update the properties
offormat - the Format to set on outputBufferlength - the length to set on outputBufferoffset - the offset to set on outputBuffer
protected byte[] validateByteArraySize(javax.media.Buffer buffer,
int newSize)
protected short[] validateShortArraySize(javax.media.Buffer buffer,
int newSize)
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||