com.sun.media
类 BasicCodec

java.lang.Object
  继承者 com.sun.media.BasicPlugIn
      继承者 com.sun.media.BasicCodec
所有已实现的接口:
Codec, Controls, PlugIn

public abstract class BasicCodec
extends BasicPlugIn
implements Codec


字段摘要
protected  Format inputFormat
           
protected  Format[] inputFormats
           
protected  boolean opened
           
protected  Format outputFormat
           
protected  Format[] outputFormats
           
protected  boolean pendingEOM
           
 
从类 com.sun.media.BasicPlugIn 继承的字段
controls
 
从接口 javax.media.PlugIn 继承的字段
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
构造方法摘要
BasicCodec()
           
 
方法摘要
protected  int checkEOM(Buffer inputBuffer, Buffer outputBuffer)
           
protected  boolean checkFormat(Format format)
           
protected  boolean checkInputBuffer(Buffer inputBuffer)
           
 void close()
          Closes the plug-in component and releases the resources it was using.
protected  int getArrayElementSize(java.lang.Class type)
           
protected  Format getInputFormat()
           
protected  Format getOutputFormat()
           
 Format[] getSupportedInputFormats()
          Lists all of the input formats that this codec accepts.
protected  boolean isEOM(Buffer inputBuffer)
           
 void open()
          Opens the plug-in software or hardware component and acquires the resources that the plug-in needs to operate.
protected  int processAtEOM(Buffer inputBuffer, Buffer outputBuffer)
           
protected  void propagateEOM(Buffer outputBuffer)
           
 void reset()
          Resets the state of the plug-in.
 Format setInputFormat(Format input)
          Sets the format of the data to be input to this codec.
 Format setOutputFormat(Format output)
          Sets the format for the data this codec outputs.
protected  void updateOutput(Buffer outputBuffer, Format format, int length, int offset)
           
protected  javax.media.format.RGBFormat updateRGBFormat(javax.media.format.VideoFormat newFormat, javax.media.format.RGBFormat outputFormat)
           
 
从类 com.sun.media.BasicPlugIn 继承的方法
error, getClassForName, getControl, getControls, getInputData, getNativeData, getOutputData, matches, plugInExists, validateByteArraySize, validateData, validateIntArraySize, validateShortArraySize
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 javax.media.Codec 继承的方法
getSupportedOutputFormats, process
 
从接口 javax.media.PlugIn 继承的方法
getName
 
从接口 javax.media.Controls 继承的方法
getControl, getControls
 

字段详细信息

inputFormat

protected Format inputFormat

outputFormat

protected Format outputFormat

opened

protected boolean opened

inputFormats

protected Format[] inputFormats

outputFormats

protected Format[] outputFormats

pendingEOM

protected boolean pendingEOM
构造方法详细信息

BasicCodec

public BasicCodec()
方法详细信息

setInputFormat

public Format setInputFormat(Format input)
从接口 Codec 复制的描述
Sets the format of the data to be input to this codec.

指定者:
接口 Codec 中的 setInputFormat
参数:
input - The Format to be set.
返回:
The Format that was set, which might be the supported Format that most closely matches the one specified. Returns null if the specified Format is not supported and no reasonable match could be found.

setOutputFormat

public Format setOutputFormat(Format output)
从接口 Codec 复制的描述
Sets the format for the data this codec outputs.

指定者:
接口 Codec 中的 setOutputFormat
参数:
output - The Format to be set.
返回:
The Format that was set, which might be the Format that most closely matched the one specified. Returns null if the specified Format is not supported and no reasonable match could be found.

getInputFormat

protected Format getInputFormat()

getOutputFormat

protected Format getOutputFormat()

reset

public void reset()
从接口 PlugIn 复制的描述
Resets the state of the plug-in. The reset method is typically called if the end of media is reached or the media is repositioned.

指定者:
接口 PlugIn 中的 reset

open

public void open()
          throws ResourceUnavailableException
从接口 PlugIn 复制的描述
Opens the plug-in software or hardware component and acquires the resources that the plug-in needs to operate. All required input and/or output formats have to be set on the plug-in before open is called. Buffers should not be passed into the plug-in without first calling this method.

指定者:
接口 PlugIn 中的 open
抛出:
ResourceUnavailableException - If all of the required resources cannot be acquired.

close

public void close()
从接口 PlugIn 复制的描述
Closes the plug-in component and releases the resources it was using. No more data will be accepted by the plug-in after close is called. A closed plug-in can be reinstated by calling open again.

指定者:
接口 PlugIn 中的 close

getSupportedInputFormats

public Format[] getSupportedInputFormats()
从接口 Codec 复制的描述
Lists all of the input formats that this codec accepts.

指定者:
接口 Codec 中的 getSupportedInputFormats
返回:
An array that contains the supported input Formats.

updateRGBFormat

protected javax.media.format.RGBFormat updateRGBFormat(javax.media.format.VideoFormat newFormat,
                                                       javax.media.format.RGBFormat outputFormat)

isEOM

protected boolean isEOM(Buffer inputBuffer)

propagateEOM

protected void propagateEOM(Buffer outputBuffer)

updateOutput

protected void updateOutput(Buffer outputBuffer,
                            Format format,
                            int length,
                            int offset)

checkInputBuffer

protected boolean checkInputBuffer(Buffer inputBuffer)

checkFormat

protected boolean checkFormat(Format format)

checkEOM

protected int checkEOM(Buffer inputBuffer,
                       Buffer outputBuffer)

processAtEOM

protected int processAtEOM(Buffer inputBuffer,
                           Buffer outputBuffer)

getArrayElementSize

protected int getArrayElementSize(java.lang.Class type)