|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.sun.media.BasicController com.sun.media.PlaybackEngine
public class PlaybackEngine
PlaybackEngine implements the media engine for playback.
字段摘要 | |
---|---|
protected javax.media.control.BitRateControl |
bitRateControl
|
protected java.awt.Container |
container
|
protected javax.media.protocol.DataSource |
dsource
|
protected java.util.Vector |
filters
|
protected javax.media.control.FramePositioningControl |
framePositioningControl
|
protected javax.media.control.FrameRateControl |
frameRateControl
|
protected java.lang.String |
genericProcessorError
|
protected JMD |
jmd
|
protected BasicSinkModule |
masterSink
|
protected java.util.Vector |
modules
|
protected static boolean |
needSavingDB
|
protected Demultiplexer |
parser
|
protected BasicPlayer |
player
|
protected boolean |
prefetched
|
boolean |
prefetchEnabled
|
protected com.sun.media.controls.ProgressControl |
progressControl
|
protected java.lang.String |
realizeError
|
protected java.util.Vector |
sinks
|
protected com.sun.media.PlaybackEngine.SlaveClock |
slaveClock
|
protected BasicSourceModule |
source
|
protected boolean |
started
|
protected java.lang.String |
timeBaseError
|
static boolean |
TRACE_ON
|
protected BasicTrackControl[] |
trackControls
|
protected Track[] |
tracks
|
protected java.util.Vector |
waitEnded
|
protected java.util.Vector |
waitPrefetched
|
protected java.util.Vector |
waitResetted
|
protected java.util.Vector |
waitStopped
|
从类 com.sun.media.BasicController 继承的字段 |
---|
processError, state, stopThreadEnabled |
从接口 javax.media.Controller 继承的字段 |
---|
LATENCY_UNKNOWN, Prefetched, Prefetching, Realized, Realizing, Started, Unrealized |
从接口 javax.media.Clock 继承的字段 |
---|
RESET |
从接口 javax.media.Duration 继承的字段 |
---|
DURATION_UNBOUNDED, DURATION_UNKNOWN |
构造方法摘要 | |
---|---|
PlaybackEngine(BasicPlayer p)
|
方法摘要 | |
---|---|
protected void |
abortConfigure()
Called when doConfigure() is aborted. |
protected void |
abortPrefetch()
Called when the prefetch() is aborted, i.e. deallocate() was called while prefetching. |
protected void |
abortRealize()
Called when the realize() is aborted, i.e. deallocate() was called while realizing. |
boolean |
audioEnabled()
Return true if audio is present. |
void |
bufferPrefetched(Module src)
This method is called when the module has prefetched all the data. |
protected com.sun.media.GraphNode |
buildTrackFromGraph(BasicTrackControl tc,
com.sun.media.GraphNode node)
Construct a track (connected modules) from the specified node graph. |
protected void |
connectModules(OutputConnector oc,
InputConnector ic,
BasicModule dst)
Connect the two given modules. |
protected BasicModule |
createModule(com.sun.media.GraphNode n,
java.util.Vector used)
Create a realized filter module given the plugIn codec. |
void |
createProgressControl()
Create the progress status control. |
protected java.awt.Component |
createVisualContainer(java.util.Vector visuals)
|
void |
dataBlocked(Module src,
boolean blocked)
This method is called when the module detected a data blockage. |
protected void |
doClose()
Invoked by close() to cleanup the Controller. |
protected boolean |
doConfigure()
Configuring the engine. |
protected boolean |
doConfigure1()
Configure - Part I. |
protected boolean |
doConfigure2()
Configure - Part II. |
protected void |
doDeallocate()
Called by deallocate(). |
protected void |
doFailedPrefetch()
Called when the prefetch() has failed. |
protected void |
doFailedRealize()
Called when realize() has failed. |
protected boolean |
doPrefetch()
The stub function to perform the steps to prefetch the controller. |
protected boolean |
doPrefetch1()
doPrefetch - Part I |
protected boolean |
doPrefetch2()
doPrefetch - Part II |
protected boolean |
doRealize()
The stub function to perform the steps to realize the controller. |
protected boolean |
doRealize1()
doRealize Part I |
protected boolean |
doRealize2()
doRealize Part II |
protected void |
doReset()
The real reset code. |
protected void |
doSetMediaTime(Time when)
|
float |
doSetRate(float r)
|
protected void |
doStart()
Start immediately. |
protected void |
doStart1()
doStart - Part I. |
protected void |
doStart2()
doStart - Part II |
protected void |
doStop()
Invoked from stop(). |
protected void |
doStop1()
doStop - Part I. |
protected void |
doStop2()
doStop - Part II. |
protected BasicSinkModule |
findMasterSink()
Returns the DataSink which holds the timebase. |
void |
formatChanged(Module src,
Format oldFormat,
Format newFormat)
This method is called when a format change has occurred and the module has successfully coped with it. |
void |
formatChangedFailure(Module src,
Format oldFormat,
Format newFormat)
This method is called when a format change has occurred and the Module has failed to deal with it. |
void |
framesBehind(Module src,
float frames,
InputConnector ic)
This method is called when a module detects frame delay. |
protected long |
getBitRate()
|
java.lang.String |
getCNAME()
|
Control[] |
getControls()
Return a list of Control objects this Controller supports. |
Time |
getDuration()
Return the duration of the media. |
GainControl |
getGainControl()
Get audio gain control. |
long |
getLatency()
Return the run-time latency. |
protected PlugIn |
getPlugIn(BasicModule m)
Get the plugin from a module. |
Time |
getStartLatency()
Returns the start latency. |
TimeBase |
getTimeBase()
Override the parent's method to not check for realized state. |
java.awt.Component |
getVisualComponent()
Get the visual component where the video is presented. |
void |
internalErrorOccurred(Module src)
This method is called when an irrecoverable internal error has occurred either on the plugin or on the controlling module. |
protected boolean |
isConfigurable()
The PlaybackEngine is configurable. |
boolean |
isRTP()
|
protected BasicModule |
lastModule(BasicModule bm)
Given a chain of FilterModules, return the last one of the chain. |
protected void |
localStop()
|
void |
markedDataArrived(Module src,
Buffer buffer)
This method is called when a buffer with the marker bit set arrives. |
void |
mediaEnded(Module src)
This method is called when the module has reached the end of media. |
void |
pluginTerminated(Module src)
This method is called when the plugin controlled by the module has been closed. |
protected void |
reset()
Flush (reset) the flow graph. |
protected void |
resetBitRate()
|
void |
resetted(Module src)
This method is called when the module has been resetted. |
void |
setMediaTime(Time when)
Override BasicController's setMediaTime so as not to set the media time on the master clock twice. |
static void |
setMemoryTrace(boolean on)
Turn on memory trace to assit debugging. |
void |
setProgressControl(com.sun.media.controls.ProgressControl p)
|
protected void |
setRenderBufferSize(Renderer r)
|
void |
setSource(javax.media.protocol.DataSource ds)
Verifies to see if the engine accepts the given source. |
void |
setStopTime(Time t)
Override BasicController.setStopTime to allow for more accurate stop time set. |
void |
setTimeBase(TimeBase tb)
Override the parent's method to not check for realized state. |
void |
stop()
This is stop by request. |
void |
stopAtTime(Module src)
This method is called when the module has reached the scheduled stop time. |
void |
updateFormats()
Update the format info per track on the progress control. |
void |
updateRates()
Update the aggregate bit rate and frame rate per track on the progress control. |
boolean |
videoEnabled()
Return true if video is present. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
protected BasicPlayer player
protected javax.media.protocol.DataSource dsource
protected java.util.Vector modules
protected java.util.Vector filters
protected java.util.Vector sinks
protected java.util.Vector waitPrefetched
protected java.util.Vector waitStopped
protected java.util.Vector waitEnded
protected java.util.Vector waitResetted
protected Track[] tracks
protected Demultiplexer parser
protected BasicSinkModule masterSink
protected BasicSourceModule source
protected com.sun.media.PlaybackEngine.SlaveClock slaveClock
protected boolean prefetched
protected boolean started
public boolean prefetchEnabled
protected static boolean needSavingDB
protected javax.media.control.BitRateControl bitRateControl
protected javax.media.control.FrameRateControl frameRateControl
protected javax.media.control.FramePositioningControl framePositioningControl
protected JMD jmd
protected java.awt.Container container
public static boolean TRACE_ON
protected BasicTrackControl[] trackControls
protected com.sun.media.controls.ProgressControl progressControl
protected java.lang.String realizeError
protected java.lang.String timeBaseError
protected java.lang.String genericProcessorError
构造方法详细信息 |
---|
public PlaybackEngine(BasicPlayer p)
方法详细信息 |
---|
public static void setMemoryTrace(boolean on)
protected boolean isConfigurable()
BasicController
中的 isConfigurable
public void setSource(javax.media.protocol.DataSource ds) throws java.io.IOException, IncompatibleSourceException
java.io.IOException
IncompatibleSourceException
protected boolean doConfigure()
BasicController
中的 doConfigure
protected boolean doConfigure1()
protected boolean doConfigure2()
protected boolean doRealize()
BasicController
复制的描述Return true if the realize is successful. Return false and set the processError string if failed.
This function is not declared synchronized because first it is already guaranteed by realize() not to be called more than once simultaneously. Secondly if this is synchronized, then other synchronized methods, deallocate() and processEvent() will be blocked since they are synchronized methods. Override this to implement subclass behavior.
BasicController
中的 doRealize
protected boolean doRealize1()
protected boolean doRealize2()
protected BasicSinkModule findMasterSink()
protected void abortConfigure()
BasicController
中的 abortConfigure
protected void abortRealize()
BasicController
中的 abortRealize
protected void doFailedRealize()
BasicController
中的 doFailedRealize
protected boolean doPrefetch()
BasicController
中的 doPrefetch
protected boolean doPrefetch1()
protected boolean doPrefetch2()
protected void abortPrefetch()
BasicController
中的 abortPrefetch
protected void doFailedPrefetch()
BasicController
中的 doFailedPrefetch
protected void doStart()
BasicController
中的 doStart
protected void doStart1()
protected void doStart2()
public void stop()
Clock
中的 stop
BasicController
中的 stop
protected void localStop()
protected void doStop()
BasicController
中的 doStop
protected void doStop1()
protected void doStop2()
public void setStopTime(Time t)
Clock
中的 setStopTime
BasicController
中的 setStopTime
t
- The time at which you want the
Clock
to stop, in media time.protected void doDeallocate()
BasicController
中的 doDeallocate
protected void doClose()
BasicController
中的 doClose
public boolean isRTP()
public java.lang.String getCNAME()
public void setMediaTime(Time when)
Clock
中的 setMediaTime
BasicController
中的 setMediaTime
when
- The new media time.protected void doSetMediaTime(Time when)
BasicController
中的 doSetMediaTime
public float doSetRate(float r)
BasicController
中的 doSetRate
protected void reset()
protected void doReset()
public void bufferPrefetched(Module src)
ModuleListener
复制的描述
ModuleListener
中的 bufferPrefetched
public void stopAtTime(Module src)
ModuleListener
复制的描述
ModuleListener
中的 stopAtTime
public void mediaEnded(Module src)
ModuleListener
复制的描述
ModuleListener
中的 mediaEnded
public void resetted(Module src)
ModuleListener
复制的描述
ModuleListener
中的 resetted
public void dataBlocked(Module src, boolean blocked)
ModuleListener
复制的描述
ModuleListener
中的 dataBlocked
blocked
- is set to true if the data is blocked, false if the
data has been blocked but have now be released.public void framesBehind(Module src, float frames, InputConnector ic)
ModuleListener
复制的描述
ModuleListener
中的 framesBehind
public void markedDataArrived(Module src, Buffer buffer)
ModuleListener
复制的描述
ModuleListener
中的 markedDataArrived
public void formatChanged(Module src, Format oldFormat, Format newFormat)
ModuleListener
复制的描述
ModuleListener
中的 formatChanged
public void formatChangedFailure(Module src, Format oldFormat, Format newFormat)
ModuleListener
复制的描述
ModuleListener
中的 formatChangedFailure
public void pluginTerminated(Module src)
ModuleListener
复制的描述
ModuleListener
中的 pluginTerminated
public void internalErrorOccurred(Module src)
ModuleListener
复制的描述
ModuleListener
中的 internalErrorOccurred
public boolean audioEnabled()
public boolean videoEnabled()
public Control[] getControls()
Controller
中的 getControls
BasicController
中的 getControls
public GainControl getGainControl()
public java.awt.Component getVisualComponent()
protected java.awt.Component createVisualContainer(java.util.Vector visuals)
public Time getStartLatency()
Controller
中的 getStartLatency
BasicController
中的 getStartLatency
public long getLatency()
public Time getDuration()
Duration
中的 getDuration
BasicController
中的 getDuration
public void setProgressControl(com.sun.media.controls.ProgressControl p)
public void createProgressControl()
public void updateFormats()
public void updateRates()
protected long getBitRate()
protected void resetBitRate()
public void setTimeBase(TimeBase tb) throws IncompatibleTimeBaseException
Clock
中的 setTimeBase
BasicController
中的 setTimeBase
tb
- The new TimeBase
or null
to reset the Clock
to its default TimeBase
.
IncompatibleTimeBaseException
- Thrown if
the Clock
can't use the specified TimeBase
.public TimeBase getTimeBase()
Clock
中的 getTimeBase
BasicController
中的 getTimeBase
protected com.sun.media.GraphNode buildTrackFromGraph(BasicTrackControl tc, com.sun.media.GraphNode node)
protected void setRenderBufferSize(Renderer r)
protected BasicModule lastModule(BasicModule bm)
protected BasicModule createModule(com.sun.media.GraphNode n, java.util.Vector used)
protected void connectModules(OutputConnector oc, InputConnector ic, BasicModule dst)
protected PlugIn getPlugIn(BasicModule m)
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |