|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.sun.media.BasicModule
public abstract class BasicModule
BasicModule Implements a basic JMF Module.
字段摘要 | |
---|---|
protected BasicController |
controller
|
protected com.sun.media.BasicModule.Registry |
inputConnectors
registry of all input connectors created by this module. |
protected InputConnector[] |
inputConnectorsArray
|
protected JMD |
jmd
|
protected ModuleListener |
moduleListener
|
protected java.lang.String |
name
the instance name of the module, declared in the manager |
protected com.sun.media.BasicModule.Registry |
outputConnectors
registry of all output connectors created by this module. |
protected OutputConnector[] |
outputConnectorsArray
|
protected boolean |
prefetchFailed
|
protected int |
protocol
|
protected boolean |
resetted
|
构造方法摘要 | |
---|---|
BasicModule()
|
方法摘要 | |
---|---|
void |
abortPrefetch()
Called when the prefetch() is aborted, i.e. deallocate() was called while prefetching. |
void |
abortRealize()
Called when the realize() is aborted, i.e. deallocate() was called while realizing. |
boolean |
canRun()
return if data is available on all inputConnectors and there is room in all outputConnectors. |
void |
connectorPushed(InputConnector inputConnector)
A callback function denoting data was written to one of this Module input Connectors. |
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. |
void |
doFailedRealize()
Called when realize 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 |
doSetMediaTime(Time t)
This function notifies the module that the media time has changed. |
float |
doSetRate(float r)
This function notifies the module that the playback rate has changed. |
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. |
protected void |
error()
|
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. |
BasicController |
getController()
|
java.lang.Object[] |
getControls()
Return a list of module controls. |
InputConnector |
getInputConnector(java.lang.String connectorName)
Return the InputConnector given the connector name. |
java.lang.String[] |
getInputConnectorNames()
Return an array of strings containing this media module's input port names. |
long |
getLatency()
|
long |
getMediaNanoseconds()
Return the current time in nanoseconds. |
Time |
getMediaTime()
Return the current Media time. |
java.lang.String |
getName()
returns the name of this Module in the Player |
OutputConnector |
getOutputConnector(java.lang.String connectorName)
Return the OutputConnector given the connector name. |
java.lang.String[] |
getOutputConnectorNames()
Return an array of strings containing this media module's output port names. |
int |
getProtocol()
return the data transfer protocol |
int |
getState()
Return the state of the controller. |
boolean |
isInterrupted()
Query to see if the module has just been interrupted. |
boolean |
isThreaded()
return if this module create threads (so it run on Safe protocol) like Rendering module or not (as a codec module). |
boolean |
prefetchFailed()
|
protected abstract void |
process()
function which does the real processing. |
void |
registerInputConnector(java.lang.String name,
InputConnector inputConnector)
For each of the inputConnectables to this node, it needs to be registered with this function. |
void |
registerOutputConnector(java.lang.String name,
OutputConnector outputConnector)
For each of the outputConnectables from this node, it needs to be registered with this function. |
void |
reset()
reset this module only. |
void |
setController(BasicController c)
Set the Controller that maintains this module. |
void |
setFormat(Connector connector,
Format format)
Selects a format for this Connector (the default is null). |
void |
setJMD(JMD jmd)
Set the JMD debugger instance for the module to use. |
void |
setModuleListener(ModuleListener listener)
Specify a ModuleListener to which this Module
will send events. |
void |
setName(java.lang.String name)
sets the name of this Module. |
void |
setProtocol(int protocol)
sets the protocol for all the connectors |
protected boolean |
verifyBuffer(Buffer buffer)
Verify to see if the given buffer has valid data sizes. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
protected com.sun.media.BasicModule.Registry inputConnectors
protected com.sun.media.BasicModule.Registry outputConnectors
protected InputConnector[] inputConnectorsArray
protected OutputConnector[] outputConnectorsArray
protected int protocol
protected java.lang.String name
protected ModuleListener moduleListener
protected BasicController controller
protected boolean resetted
protected boolean prefetchFailed
protected JMD jmd
构造方法详细信息 |
---|
public BasicModule()
方法详细信息 |
---|
public boolean doRealize()
StateTransistor
中的 doRealize
public void doFailedRealize()
StateTransistor
中的 doFailedRealize
public void abortRealize()
StateTransistor
中的 abortRealize
public void connectorPushed(InputConnector inputConnector)
Module
复制的描述
Module
中的 connectorPushed
inputConnector
- the inputConnector of the connection which have received data.public boolean doPrefetch()
StateTransistor
中的 doPrefetch
public void doFailedPrefetch()
StateTransistor
中的 doFailedPrefetch
public void abortPrefetch()
StateTransistor
中的 abortPrefetch
public void doStart()
StateTransistor
中的 doStart
public void doStop()
StateTransistor
中的 doStop
public void doDealloc()
StateTransistor
中的 doDealloc
public void doClose()
StateTransistor
中的 doClose
public void doSetMediaTime(Time t)
StateTransistor
中的 doSetMediaTime
public float doSetRate(float r)
StateTransistor
中的 doSetRate
public java.lang.Object[] getControls()
Controls
中的 getControls
public java.lang.Object getControl(java.lang.String s)
Controls
复制的描述Class
or Interface
The full class or interface name must be used.
If the control is not supported then null
is returned.
Controls
中的 getControl
null
.public void setModuleListener(ModuleListener listener)
ModuleListener
to which this Module
will send events.
Module
中的 setModuleListener
listener
- The listener to which the Module
will
post events.public void setFormat(Connector connector, Format format)
Module
中的 setFormat
public java.lang.String[] getInputConnectorNames()
Module
中的 getInputConnectorNames
public java.lang.String[] getOutputConnectorNames()
Module
中的 getOutputConnectorNames
public InputConnector getInputConnector(java.lang.String connectorName)
Module
中的 getInputConnector
connectorName
- the name of the connector.
public OutputConnector getOutputConnector(java.lang.String connectorName)
Module
中的 getOutputConnector
connectorName
- the name of the connector
public void registerInputConnector(java.lang.String name, InputConnector inputConnector)
Module
中的 registerInputConnector
public void registerOutputConnector(java.lang.String name, OutputConnector outputConnector)
Module
中的 registerOutputConnector
public void reset()
if (state== Started) throw Exception() for (all connectors) connector.reset()The resetted flag is falsified only when the module is later restarted.
Module
中的 reset
protected boolean verifyBuffer(Buffer buffer)
public final boolean isInterrupted()
Module
复制的描述
Module
中的 isInterrupted
public boolean isThreaded()
public boolean canRun()
protected abstract void process()
if canRun { for (all inputConnectors) ic.getValidBuffer() for (all outputConnectors) oc.getEmptyBuffer()for (all inputConnectors) ic.readReport() for (all outputConnectors) oc.writeReport() }
protected void error()
public final BasicController getController()
public final void setController(BasicController c)
public final int getState()
public final java.lang.String getName()
Module
中的 getName
public void setName(java.lang.String name)
Module
中的 setName
public void setJMD(JMD jmd)
Module
复制的描述
Module
中的 setJMD
public Time getMediaTime()
public long getMediaNanoseconds()
public long getLatency()
public void setProtocol(int protocol)
public int getProtocol()
public boolean prefetchFailed()
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |