com.sun.media
类 MediaProcessor

java.lang.Object
  继承者 com.sun.media.BasicController
      继承者 com.sun.media.BasicPlayer
          继承者 com.sun.media.BasicProcessor
              继承者 com.sun.media.MediaProcessor
所有已实现的接口:
Clock, Controller, ControllerListener, DownloadProgressListener, Duration, MediaHandler, Player, Processor

public class MediaProcessor
extends BasicProcessor

MediaProcessor extends BasicProcessor and uses ProcessEngine to process media.


字段摘要
protected  ProcessEngine engine
           
 
从类 com.sun.media.BasicPlayer 继承的字段
bufferControl, cachingControl, controlComp, controllerList, controls, extendedCachingControl, framePositioning, regionControl, source, VERSION
 
从类 com.sun.media.BasicController 继承的字段
processError, state, stopThreadEnabled
 
从接口 javax.media.Processor 继承的字段
Configured, Configuring
 
从接口 javax.media.Controller 继承的字段
LATENCY_UNKNOWN, Prefetched, Prefetching, Realized, Realizing, Started, Unrealized
 
从接口 javax.media.Clock 继承的字段
RESET
 
从接口 javax.media.Duration 继承的字段
DURATION_UNBOUNDED, DURATION_UNKNOWN
 
构造方法摘要
MediaProcessor()
           
 
方法摘要
protected  boolean audioEnabled()
          Return true if the player is currently playing media with an audio track.
 javax.media.protocol.ContentDescriptor getContentDescriptor()
          Return the output content-type.
 javax.media.protocol.DataSource getDataOutput()
          Return the output DataSource of the Processor.
 GainControl getGainControl()
          Obtain the gain control from the media engine.
protected  TimeBase getMasterTimeBase()
          Obtain the time base from the media engine.
 long getMediaNanoseconds()
          Get the current media time in nanoseconds.
 Time getMediaTime()
          Obtain media time directly from the engine.
 javax.media.protocol.ContentDescriptor[] getSupportedContentDescriptors()
          Return all the content-types which this Processor's output supports.
 javax.media.control.TrackControl[] getTrackControls()
          Return the tracks in the media.
 java.awt.Component getVisualComponent()
          Obtain the visiual component from the media engine.
 javax.media.protocol.ContentDescriptor setContentDescriptor(javax.media.protocol.ContentDescriptor ocd)
          Set the output content-type.
 void setSource(javax.media.protocol.DataSource source)
          Set the DataSource that provides the media for this player.
 void updateStats()
          This is being called from a looping thread to update the stats.
protected  boolean videoEnabled()
          Return true if the player is currently playing media with a video track.
 
从类 com.sun.media.BasicProcessor 继承的方法
isConfigurable
 
从类 com.sun.media.BasicPlayer 继承的方法
abortPrefetch, abortRealize, addController, completeConfigure, completePrefetch, completeRealize, controllerSetStopTime, controllerStopAtTime, controllerUpdate, deviceBusy, doClose, doConfigure, doFailedConfigure, doFailedPrefetch, doFailedRealize, doPrefetch, doRealize, doSetMediaTime, doSetRate, doStart, doStop, downloadUpdate, getContentType, getControllerList, getControlPanelComponent, getControls, getDuration, getMediaLocator, getSource, getStartLatency, isAboutToRestart, isFramePositionable, manageController, manageController, processEndOfMedia, processEvent, removeController, setMediaLength, setMediaTime, setRate, setStopTime, setTimeBase, slaveToMasterTimeBase, start, stop, stopAtTime, syncStart, unmanageController, updateDuration
 
从类 com.sun.media.BasicController 继承的方法
abortConfigure, addControllerListener, close, configure, deallocate, dispatchEvent, doDeallocate, getClock, getControl, getRate, getState, getStopTime, getSyncTime, getTargetState, getTimeBase, interrupt, isInterrupted, mapToTimeBase, prefetch, realize, removeControllerListener, resetInterrupt, sendEvent, setClock, setTargetState, stopControllerOnly, syncStartInProgress, throwError
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
从接口 javax.media.Processor 继承的方法
configure
 
从接口 javax.media.Player 继承的方法
addController, getControlPanelComponent, removeController, start
 
从接口 javax.media.Controller 继承的方法
addControllerListener, close, deallocate, getControl, getControls, getStartLatency, getState, getTargetState, prefetch, realize, removeControllerListener
 
从接口 javax.media.Clock 继承的方法
getRate, getStopTime, getSyncTime, getTimeBase, mapToTimeBase, setMediaTime, setRate, setStopTime, setTimeBase, stop, syncStart
 
从接口 javax.media.Duration 继承的方法
getDuration
 

字段详细信息

engine

protected ProcessEngine engine
构造方法详细信息

MediaProcessor

public MediaProcessor()
方法详细信息

setSource

public void setSource(javax.media.protocol.DataSource source)
               throws java.io.IOException,
                      IncompatibleSourceException
从类 BasicPlayer 复制的描述
Set the DataSource that provides the media for this player. BasicPlayer only supports PullDataSource by default. Subclasses can override this method to support other DataSources.

指定者:
接口 MediaHandler 中的 setSource
覆盖:
BasicPlayer 中的 setSource
参数:
source - of media for this player.
抛出:
java.io.IOException - thrown when an i/o error occurs in reading information from the data source.
IncompatibleSourceException - thrown if the Player can't use this source.

getVisualComponent

public java.awt.Component getVisualComponent()
Obtain the visiual component from the media engine.

指定者:
接口 Player 中的 getVisualComponent
覆盖:
BasicPlayer 中的 getVisualComponent
返回:
the media display component.

getGainControl

public GainControl getGainControl()
Obtain the gain control from the media engine.

指定者:
接口 Player 中的 getGainControl
覆盖:
BasicPlayer 中的 getGainControl
返回:
the GainControl object for this player.

getMediaTime

public Time getMediaTime()
Obtain media time directly from the engine.

指定者:
接口 Clock 中的 getMediaTime
覆盖:
BasicController 中的 getMediaTime
返回:
the current media time.

getMediaNanoseconds

public long getMediaNanoseconds()
从类 BasicController 复制的描述
Get the current media time in nanoseconds.

指定者:
接口 Clock 中的 getMediaNanoseconds
覆盖:
BasicController 中的 getMediaNanoseconds
返回:
the media time in nanoseconds.

getMasterTimeBase

protected TimeBase getMasterTimeBase()
Obtain the time base from the media engine.

指定者:
BasicPlayer 中的 getMasterTimeBase
返回:
the master time base.

audioEnabled

protected boolean audioEnabled()
从类 BasicPlayer 复制的描述
Return true if the player is currently playing media with an audio track.

指定者:
BasicPlayer 中的 audioEnabled
返回:
true if the player is playing audio.

videoEnabled

protected boolean videoEnabled()
从类 BasicPlayer 复制的描述
Return true if the player is currently playing media with a video track.

指定者:
BasicPlayer 中的 videoEnabled
返回:
true if the player is playing video.

getTrackControls

public javax.media.control.TrackControl[] getTrackControls()
                                                    throws NotConfiguredError
Return the tracks in the media. This method can only be called after the Processor has been configured.

指定者:
接口 Processor 中的 getTrackControls
覆盖:
BasicProcessor 中的 getTrackControls
返回:
An array of the tracks in the media. An emtpy array is returned if there is no TrackControl available for this Processor.
抛出:
NotConfiguredError - if the Processor is Unrealized.

getSupportedContentDescriptors

public javax.media.protocol.ContentDescriptor[] getSupportedContentDescriptors()
                                                                        throws NotConfiguredError
Return all the content-types which this Processor's output supports.

指定者:
接口 Processor 中的 getSupportedContentDescriptors
覆盖:
BasicProcessor 中的 getSupportedContentDescriptors
返回:
An array of the the content-types supported by the Processor.
抛出:
NotConfiguredError - if the Processor is Unrealized.

setContentDescriptor

public javax.media.protocol.ContentDescriptor setContentDescriptor(javax.media.protocol.ContentDescriptor ocd)
                                                            throws NotConfiguredError
Set the output content-type.

指定者:
接口 Processor 中的 setContentDescriptor
覆盖:
BasicProcessor 中的 setContentDescriptor
参数:
ocd - The content type to be used for the Processor output.
返回:
The content descriptor that most closely matches the specified content descriptor or null if the specified content descriptor cannot be set.
抛出:
NotConfiguredError - if the Processor is Unrealized. realized state and it does not support format changes after it has been realized.

getContentDescriptor

public javax.media.protocol.ContentDescriptor getContentDescriptor()
                                                            throws NotConfiguredError
Return the output content-type.

指定者:
接口 Processor 中的 getContentDescriptor
覆盖:
BasicProcessor 中的 getContentDescriptor
返回:
The current output content-type.
抛出:
NotConfiguredError - if the Processor is Unrealized.

getDataOutput

public javax.media.protocol.DataSource getDataOutput()
                                              throws NotRealizedError
Return the output DataSource of the Processor.

指定者:
接口 Processor 中的 getDataOutput
覆盖:
BasicProcessor 中的 getDataOutput
返回:
The output DataSource of the Processor.
抛出:
NotRealizedError - if the Processor is not realized.

updateStats

public void updateStats()
从类 BasicPlayer 复制的描述
This is being called from a looping thread to update the stats.

指定者:
BasicPlayer 中的 updateStats