com.sun.media
类 BasicMuxModule

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

public class BasicMuxModule
extends BasicSinkModule

BasicMuxModule is a module which have InputConnectors and no OutputConnectors. It receives data from its inputs, feed that to a plugin Multiplexer which then outputs the data via an output DataSource.


字段摘要
static java.lang.String ConnectorNamePrefix
           
protected  com.sun.media.util.ElapseTime[] elapseTime
           
protected  boolean[] endMarkers
           
protected  InputConnector[] ics
           
protected  Format[] inputs
           
protected  Multiplexer multiplexer
           
protected  boolean[] paused
           
protected  boolean prefetching
           
protected  boolean[] prefetchMarkers
           
protected  boolean[] prerollTrack
           
protected  boolean[] resettedMarkers
           
protected  boolean started
           
protected  boolean[] stopAtTimeMarkers
           
 
从类 com.sun.media.BasicSinkModule 继承的字段
prerolling, rate, stopTime
 
从类 com.sun.media.BasicModule 继承的字段
controller, inputConnectors, inputConnectorsArray, jmd, moduleListener, name, outputConnectors, outputConnectorsArray, prefetchFailed, protocol, resetted
 
构造方法摘要
protected BasicMuxModule(Multiplexer m, Format[] inputs)
           
 
方法摘要
 void abortPrefetch()
          Called when the prefetch() is aborted, i.e. deallocate() was called while prefetching.
 void connectorPushed(InputConnector ic)
          This is the main processing function.
 void doClose()
          This function performs the steps to close a module or Player.
 void doDealloc()
          This function performs the steps to deallocate a module or Player, and return to the realized state.
 void doFailedPrefetch()
          Called when prefetch fails.
 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.
 void doStart()
          This function performs the steps to start a module or Player.
 void doStop()
          This function performs the steps to stop a module or Player, and return to the prefetched state.
 long getBitsWritten()
           
 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.
 javax.media.protocol.DataSource getDataOutput()
           
 int getFramesPlayed()
           
 Multiplexer getMultiplexer()
           
 boolean isThreaded()
          return if this module create threads (so it run on Safe protocol) like Rendering module or not (as a codec module).
protected  void process()
          function which does the real processing.
 void reset()
          reset this module only.
 void resetBitsWritten()
           
 void resetFramesPlayed()
           
 void setFormat(Connector connector, Format format)
          Selects a format for this Connector (the default is null).
 void setPreroll(long wanted, long actual)
          Enable prerolling.
 void triggerReset()
           
 
从类 com.sun.media.BasicSinkModule 继承的方法
doneReset, doSetMediaTime, doSetRate, getClock, getMediaNanoseconds, getMediaTime, getTimeBase, setClock, setStopTime, setTimeBase
 
从类 com.sun.media.BasicModule 继承的方法
abortRealize, canRun, doFailedRealize, error, getController, getInputConnector, getInputConnectorNames, getLatency, getName, getOutputConnector, getOutputConnectorNames, getProtocol, getState, isInterrupted, prefetchFailed, registerInputConnector, registerOutputConnector, setController, setJMD, setModuleListener, setName, setProtocol, verifyBuffer
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

multiplexer

protected Multiplexer multiplexer

inputs

protected Format[] inputs

ics

protected InputConnector[] ics

prefetchMarkers

protected boolean[] prefetchMarkers

endMarkers

protected boolean[] endMarkers

resettedMarkers

protected boolean[] resettedMarkers

stopAtTimeMarkers

protected boolean[] stopAtTimeMarkers

paused

protected boolean[] paused

prerollTrack

protected boolean[] prerollTrack

elapseTime

protected com.sun.media.util.ElapseTime[] elapseTime

prefetching

protected boolean prefetching

started

protected boolean started

ConnectorNamePrefix

public static java.lang.String ConnectorNamePrefix
构造方法详细信息

BasicMuxModule

protected BasicMuxModule(Multiplexer m,
                         Format[] inputs)
方法详细信息

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

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.

doFailedPrefetch

public void doFailedPrefetch()
从类 BasicModule 复制的描述
Called when prefetch fails.

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

abortPrefetch

public void abortPrefetch()
从类 BasicModule 复制的描述
Called when the prefetch() is aborted, i.e. deallocate() was called while prefetching. Release all resources claimed previously by the prefetch call.

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

setPreroll

public void setPreroll(long wanted,
                       long actual)
Enable prerolling.

覆盖:
BasicSinkModule 中的 setPreroll

doStart

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

指定者:
接口 StateTransistor 中的 doStart
覆盖:
BasicSinkModule 中的 doStart

doStop

public void doStop()
从类 BasicModule 复制的描述
This function performs the steps to stop a module or Player, and return to the prefetched state.

指定者:
接口 StateTransistor 中的 doStop
覆盖:
BasicSinkModule 中的 doStop

doDealloc

public void doDealloc()
从类 BasicModule 复制的描述
This function performs the steps to deallocate a module or Player, and return to the realized state.

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

doClose

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

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

connectorPushed

public void connectorPushed(InputConnector ic)
This is the main processing function. It is called when one of the the upstream modules pushes a buffer to this module.

指定者:
接口 Module 中的 connectorPushed
覆盖:
BasicModule 中的 connectorPushed
参数:
ic - the inputConnector of the connection which have received data.

process

protected 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

reset

public void reset()
从类 BasicModule 复制的描述
reset this module only.
 if (state== Started)
    throw Exception()
 for (all connectors)
    connector.reset()
 
The resetted flag is falsified only when the module is later restarted.

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

triggerReset

public void triggerReset()
覆盖:
BasicSinkModule 中的 triggerReset

getDataOutput

public javax.media.protocol.DataSource getDataOutput()

getMultiplexer

public Multiplexer getMultiplexer()

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.

setFormat

public void setFormat(Connector connector,
                      Format format)
从类 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

getFramesPlayed

public int getFramesPlayed()

resetFramesPlayed

public void resetFramesPlayed()

getBitsWritten

public long getBitsWritten()

resetBitsWritten

public void resetBitsWritten()