com.sun.media
类 BasicFilterModule

java.lang.Object
  继承者 com.sun.media.BasicModule
      继承者 com.sun.media.BasicFilterModule
所有已实现的接口:
Module, StateTransistor, Controls

public class BasicFilterModule
extends BasicModule

BasicFilterModule is a module which is not threaded and have one InputConnector and one OutputConnector. It receives data from its input connector, pass the data to the level 3 plugIn codec and put the result in the OutputConnector. BasicFilterModule can be either Push or Pull driven. The plugIn codec might be media decoder, media encoder, effect etc.


字段摘要
protected  Codec codec
           
protected  java.awt.Frame controlFrame
           
protected  float curFramesBehind
           
protected  javax.media.control.FrameProcessingControl frameControl
           
protected  InputConnector ic
           
protected  OutputConnector oc
           
protected  float prevFramesBehind
           
protected  boolean readPendingFlag
           
protected  Buffer storedInputBuffer
           
protected  Buffer storedOutputBuffer
           
protected  boolean VERBOSE_CONTROL
           
protected  boolean writePendingFlag
           
 
从类 com.sun.media.BasicModule 继承的字段
controller, inputConnectors, inputConnectorsArray, jmd, moduleListener, name, outputConnectors, outputConnectorsArray, prefetchFailed, protocol, resetted
 
构造方法摘要
BasicFilterModule(Codec c)
           
 
方法摘要
 void doClose()
          This function performs the steps to close a module or Player.
 boolean doPrefetch()
          This function performs the steps to prefetch a module or Player.
 boolean doRealize()
          This function performs the steps of realizing a module or a Player.
 Codec getCodec()
           
 java.lang.Object getControl(java.lang.String s)
          Obtain the object that implements the specified Class or Interface The full class or interface name must be used.
 java.lang.Object[] getControls()
          Return a list of module controls.
 boolean isThreaded()
          return if this module create threads (so it run on Safe protocol) like Rendering module or not (as a codec module).
 void process()
          function which does the real processing.
protected  boolean reinitCodec(Format input)
          A new input format has been detected, we'll check if the existing codec can handle it.
 boolean setCodec(Codec codec)
           
 boolean setCodec(java.lang.String codec)
          sets the plugIn codec of this filter.
 void setFormat(Connector c, Format f)
          Selects a format for this Connector (the default is null).
protected  void setFramesBehind(float framesBehind)
           
 
从类 com.sun.media.BasicModule 继承的方法
abortPrefetch, abortRealize, canRun, connectorPushed, doDealloc, doFailedPrefetch, doFailedRealize, doSetMediaTime, doSetRate, doStart, doStop, error, getController, getInputConnector, getInputConnectorNames, getLatency, getMediaNanoseconds, getMediaTime, getName, getOutputConnector, getOutputConnectorNames, getProtocol, getState, isInterrupted, prefetchFailed, registerInputConnector, registerOutputConnector, reset, setController, setJMD, setModuleListener, setName, setProtocol, verifyBuffer
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

codec

protected Codec codec

ic

protected InputConnector ic

oc

protected OutputConnector oc

frameControl

protected javax.media.control.FrameProcessingControl frameControl

curFramesBehind

protected float curFramesBehind

prevFramesBehind

protected float prevFramesBehind

controlFrame

protected java.awt.Frame controlFrame

VERBOSE_CONTROL

protected final boolean VERBOSE_CONTROL
另请参见:
常量字段值

storedInputBuffer

protected Buffer storedInputBuffer

storedOutputBuffer

protected Buffer storedOutputBuffer

readPendingFlag

protected boolean readPendingFlag

writePendingFlag

protected boolean writePendingFlag
构造方法详细信息

BasicFilterModule

public BasicFilterModule(Codec c)
方法详细信息

doRealize

public boolean doRealize()
从类 BasicModule 复制的描述
This function performs the steps of realizing a module or a Player.

指定者:
接口 StateTransistor 中的 doRealize
覆盖:
BasicModule 中的 doRealize
返回:
true if successful.

doPrefetch

public boolean doPrefetch()
从类 BasicModule 复制的描述
This function performs the steps to prefetch a module or Player.

指定者:
接口 StateTransistor 中的 doPrefetch
覆盖:
BasicModule 中的 doPrefetch
返回:
true if successful.

doClose

public void doClose()
从类 BasicModule 复制的描述
This function performs the steps to close a module or Player.

指定者:
接口 StateTransistor 中的 doClose
覆盖:
BasicModule 中的 doClose

setFormat

public void setFormat(Connector c,
                      Format f)
从类 BasicModule 复制的描述
Selects a format for this Connector (the default is null). The setFormat() method is typically called by the Manager as part of the Connector connection method call. Typically the connector would delegate this call to its owning Module.

指定者:
接口 Module 中的 setFormat
覆盖:
BasicModule 中的 setFormat

setCodec

public boolean setCodec(java.lang.String codec)
sets the plugIn codec of this filter.

参数:
codec - the plugIn codec (should we specify Codec class or String)
返回:
true if successful

setCodec

public boolean setCodec(Codec codec)

getCodec

public Codec getCodec()
返回:
the plugIn codec of this filter, null if not yet set.

isThreaded

public boolean isThreaded()
从类 BasicModule 复制的描述
return if this module create threads (so it run on Safe protocol) like Rendering module or not (as a codec module).

覆盖:
BasicModule 中的 isThreaded

getControls

public java.lang.Object[] getControls()
从类 BasicModule 复制的描述
Return a list of module controls.

指定者:
接口 Controls 中的 getControls
覆盖:
BasicModule 中的 getControls
返回:
the collection of object controls

getControl

public java.lang.Object getControl(java.lang.String s)
从接口 Controls 复制的描述
Obtain the object that implements the specified Class or Interface The full class or interface name must be used.

If the control is not supported then null is returned.

指定者:
接口 Controls 中的 getControl
覆盖:
BasicModule 中的 getControl
返回:
the object that implements the control, or null.

setFramesBehind

protected void setFramesBehind(float framesBehind)

reinitCodec

protected boolean reinitCodec(Format input)
A new input format has been detected, we'll check if the existing codec can handle it. Otherwise, we'll try to re-create a new codec to handle it.


process

public void process()
从类 BasicModule 复制的描述
function which does the real processing.
 if canRun {
    for (all inputConnectors)
      ic.getValidBuffer()
    for (all outputConnectors)
      oc.getEmptyBuffer()
    
    for (all inputConnectors)
      ic.readReport()
    for (all outputConnectors)
      oc.writeReport()
 }
 

指定者:
BasicModule 中的 process