|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||
java.lang.Objectcom.sun.media.BasicModule
com.sun.media.BasicSinkModule
com.sun.media.BasicRendererModule
public class BasicRendererModule
BasicRenderer is a module which have InputConnectors and no OutputConnectors.
It receives data from its input connector and put its output in output device
such as file, URL, screen, audio device, output DataSource or null.
MediaRenderers can be either Pull driven (as AudioPlayer) or Push
driven (as File renderer). VideoRenderer might be implemented as either Push or Pull.
MediaRenderers are stopAtTime aware (so that the audio renderer would stop at the correct time) and
are responsible to stop the player at the required time (no separate thread for poling TimeBase).
There is no need to define buffers allocation and connectors behavior here, as it is done in module.
Common functionality of renderers would be put here as we start the implementation
We need the level 3 design to continue working on this class
| 字段摘要 | |
|---|---|
protected PlaybackEngine |
engine
|
protected float |
frameRate
|
protected int |
framesPlayed
|
protected boolean |
framesWereBehind
|
protected InputConnector |
ic
|
protected boolean |
prefetching
|
protected Renderer |
renderer
|
protected boolean |
started
|
| 从类 com.sun.media.BasicSinkModule 继承的字段 |
|---|
prerolling, stopTime |
| 从类 com.sun.media.BasicModule 继承的字段 |
|---|
controller, inputConnectors, inputConnectorsArray, jmd, moduleListener, name, outputConnectors, outputConnectorsArray, prefetchFailed, protocol, resetted |
| 构造方法摘要 | |
|---|---|
protected |
BasicRendererModule(Renderer r)
|
| 方法摘要 | |
|---|---|
void |
abortPrefetch()
Called when the prefetch() is aborted, i.e. deallocate() was called while prefetching. |
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 |
doneReset()
|
boolean |
doPrefetch()
This function performs the steps to prefetch a module or Player. |
protected boolean |
doProcess()
The loop to process the data. |
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. |
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. |
int |
getFramesPlayed()
|
Renderer |
getRenderer()
|
long |
getRTPTime()
|
protected boolean |
handlePreroll(Buffer buf)
Handle the prerolling a buffer. |
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. |
int |
processBuffer(Buffer buffer)
Break down one larger buffer into smaller pieces so the processing won't take that long to block. |
protected boolean |
reinitRenderer(Format input)
Attempt to re-initialize the renderer given a new input format. |
void |
reset()
reset this module only. |
void |
resetFramesPlayed()
|
protected boolean |
scheduleBuffer(Buffer buf)
Handed a buffer, this function does the scheduling of the buffer processing. |
void |
setFormat(Connector connector,
Format format)
Selects a format for this Connector (the default is null). |
void |
setPreroll(long wanted,
long actual)
Enable prerolling. |
protected void |
setRenderer(Renderer r)
|
void |
triggerReset()
|
| 从类 com.sun.media.BasicSinkModule 继承的方法 |
|---|
doSetMediaTime, doSetRate, getClock, getMediaNanoseconds, getMediaTime, getTimeBase, setClock, setStopTime, setTimeBase |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected PlaybackEngine engine
protected Renderer renderer
protected InputConnector ic
protected int framesPlayed
protected float frameRate
protected boolean framesWereBehind
protected boolean prefetching
protected boolean started
| 构造方法详细信息 |
|---|
protected BasicRendererModule(Renderer r)
| 方法详细信息 |
|---|
public boolean isThreaded()
BasicModule 复制的描述
BasicModule 中的 isThreadedpublic boolean doRealize()
BasicModule 复制的描述
StateTransistor 中的 doRealizeBasicModule 中的 doRealizepublic boolean doPrefetch()
BasicModule 复制的描述
StateTransistor 中的 doPrefetchBasicModule 中的 doPrefetchpublic void doFailedPrefetch()
BasicModule 复制的描述
StateTransistor 中的 doFailedPrefetchBasicModule 中的 doFailedPrefetchpublic void abortPrefetch()
BasicModule 复制的描述
StateTransistor 中的 abortPrefetchBasicModule 中的 abortPrefetchpublic void doStart()
BasicModule 复制的描述
StateTransistor 中的 doStartBasicSinkModule 中的 doStartpublic void doStop()
BasicModule 复制的描述
StateTransistor 中的 doStopBasicSinkModule 中的 doStoppublic void doDealloc()
BasicModule 复制的描述
StateTransistor 中的 doDeallocBasicModule 中的 doDeallocpublic void doClose()
BasicModule 复制的描述
StateTransistor 中的 doCloseBasicModule 中的 doClosepublic void reset()
BasicModule 复制的描述
if (state== Started)
throw Exception()
for (all connectors)
connector.reset()
The resetted flag is falsified only when the module is later restarted.
Module 中的 resetBasicModule 中的 resetpublic void triggerReset()
BasicSinkModule 中的 triggerResetpublic void doneReset()
BasicSinkModule 中的 doneResetprotected boolean reinitRenderer(Format input)
protected void setRenderer(Renderer r)
public Renderer getRenderer()
protected void process()
BasicModule 复制的描述
if canRun {
for (all inputConnectors)
ic.getValidBuffer()
for (all outputConnectors)
oc.getEmptyBuffer()
for (all inputConnectors)
ic.readReport()
for (all outputConnectors)
oc.writeReport()
}
BasicModule 中的 processprotected boolean doProcess()
protected boolean scheduleBuffer(Buffer buf)
public int processBuffer(Buffer buffer)
public void setPreroll(long wanted,
long actual)
BasicSinkModule 中的 setPrerollprotected boolean handlePreroll(Buffer buf)
public long getRTPTime()
public java.lang.Object[] getControls()
BasicModule 复制的描述
Controls 中的 getControlsBasicModule 中的 getControlspublic 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 中的 getControlBasicModule 中的 getControlnull.
public void setFormat(Connector connector,
Format format)
BasicModule 复制的描述
Module 中的 setFormatBasicModule 中的 setFormatpublic int getFramesPlayed()
public void resetFramesPlayed()
|
|||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | ||||||||