com.sun.media
类 BasicTrackControl

java.lang.Object
  继承者 com.sun.media.BasicTrackControl
所有已实现的接口:
Control, javax.media.control.FormatControl, javax.media.control.TrackControl, Controls

public class BasicTrackControl
extends java.lang.Object
implements javax.media.control.TrackControl

Basic track control for use with a Processor or Player.


字段摘要
protected  java.util.Vector modules
           
protected  BasicMuxModule muxModule
           
protected  boolean prefetchFailed
           
protected  boolean rendererFailed
           
protected  BasicRendererModule rendererModule
           
 
构造方法摘要
BasicTrackControl(PlaybackEngine engine, Track track, OutputConnector oc)
           
 
方法摘要
 boolean buildTrack(int trackID, int numTracks)
          Top level routine to build a single track.
protected  javax.media.control.FrameRateControl frameRateControl()
           
 java.lang.Object getControl(java.lang.String type)
          Obtain the object that implements the specified Class or Interface The full class or interface name must be used.
 java.awt.Component getControlComponent()
          Get the Component associated with this Control object.
 java.lang.Object[] getControls()
          Obtain the collection of objects that control the object that implements this interface.
 Format getFormat()
          Obtain the format that this object is set to.
 Format getOriginalFormat()
           
 Format[] getSupportedFormats()
          Lists the possible input formats supported by this plug-in.
 boolean isCustomized()
           
 boolean isEnabled()
          Return the state of the track.
 boolean isTimeBase()
          Returns true if this track holds the master time base.
 boolean prefetchTrack()
          Prefetch the modules for this track.
 void prError()
           
protected  com.sun.media.controls.ProgressControl progressControl()
           
 void setCodecChain(Codec[] codec)
          Specify a chain of Codec plugins to be used on the track.
 void setEnabled(boolean enabled)
          Enable or disable the track.
 Format setFormat(Format format)
          Sets the data format.
 void setRenderer(Renderer renderer)
          Replace the default renderer of the Processor with the given one.
 void startTrack()
          Start the modules for this track.
 void stopTrack()
          Start the modules for this track.
 void updateFormat()
          Update the format per track on the progress control.
 void updateRates(long now)
          Update the frame rate per track on the progress control.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

modules

protected java.util.Vector modules

rendererModule

protected BasicRendererModule rendererModule

muxModule

protected BasicMuxModule muxModule

prefetchFailed

protected boolean prefetchFailed

rendererFailed

protected boolean rendererFailed
构造方法详细信息

BasicTrackControl

public BasicTrackControl(PlaybackEngine engine,
                         Track track,
                         OutputConnector oc)
方法详细信息

getOriginalFormat

public Format getOriginalFormat()

getFormat

public Format getFormat()
从接口 javax.media.control.FormatControl 复制的描述
Obtain the format that this object is set to.

指定者:
接口 javax.media.control.FormatControl 中的 getFormat
返回:
the current format.

getSupportedFormats

public Format[] getSupportedFormats()
从接口 javax.media.control.FormatControl 复制的描述
Lists the possible input formats supported by this plug-in.

指定者:
接口 javax.media.control.FormatControl 中的 getSupportedFormats
返回:
an array of the supported formats

buildTrack

public boolean buildTrack(int trackID,
                          int numTracks)
Top level routine to build a single track.


setFormat

public Format setFormat(Format format)
从接口 javax.media.control.FormatControl 复制的描述
Sets the data format. The method returns null if the format is not supported. Otherwise, it returns the format that's actually set.

However in some situations, returning a non-null format does not necessarily mean that the format is supported since determining the supported formats may be state dependent or simply too costly. In such cases, the setFormat call will succeed but the object may fail in another state-transition operation such as when the object is being initialized.

Alternatively, the getSupportedFormats method can be used to query for the list of supported formats. The resulting list can be used to screen for the valid formats before setting that on the object.

指定者:
接口 javax.media.control.FormatControl 中的 setFormat
返回:
null if the format is not supported; otherwise return the format that's actually set.

setCodecChain

public void setCodecChain(Codec[] codec)
                   throws NotConfiguredError,
                          UnsupportedPlugInException
从接口 javax.media.control.TrackControl 复制的描述
Specify a chain of Codec plugins to be used on the track. The Processor will try its best to insert the codecs in the given order to the data flow.
Effect is a subclass of Codec and thus can be used also in this method.

指定者:
接口 javax.media.control.TrackControl 中的 setCodecChain
参数:
codec - an array of Codec plugins to be set.
抛出:
NotConfiguredError - if the owning Processor is not configured.
UnsupportedPlugInException - if the PlugIn cannot be set.

setRenderer

public void setRenderer(Renderer renderer)
                 throws NotConfiguredError
从接口 javax.media.control.TrackControl 复制的描述
Replace the default renderer of the Processor with the given one.

指定者:
接口 javax.media.control.TrackControl 中的 setRenderer
参数:
renderer - the Renderer plugin to be used.
抛出:
NotConfiguredError - if the owning Processor is not configured.

prefetchTrack

public boolean prefetchTrack()
Prefetch the modules for this track.


startTrack

public void startTrack()
Start the modules for this track.


stopTrack

public void stopTrack()
Start the modules for this track.


isCustomized

public boolean isCustomized()

isTimeBase

public boolean isTimeBase()
Returns true if this track holds the master time base.


isEnabled

public boolean isEnabled()
从接口 javax.media.control.FormatControl 复制的描述
Return the state of the track.

指定者:
接口 javax.media.control.FormatControl 中的 isEnabled
返回:
A boolean telling whether or not the track is enabled.

setEnabled

public void setEnabled(boolean enabled)
从接口 javax.media.control.FormatControl 复制的描述
Enable or disable the track.

指定者:
接口 javax.media.control.FormatControl 中的 setEnabled
参数:
enabled - true if the track is to be enabled.

progressControl

protected com.sun.media.controls.ProgressControl progressControl()

frameRateControl

protected javax.media.control.FrameRateControl frameRateControl()

prError

public void prError()

getControls

public java.lang.Object[] getControls()
                               throws NotRealizedError
从接口 Controls 复制的描述
Obtain the collection of objects that control the object that implements this interface.

If no controls are supported, a zero length array is returned.

指定者:
接口 Controls 中的 getControls
返回:
the collection of object controls
抛出:
NotRealizedError

getControl

public java.lang.Object getControl(java.lang.String type)
从接口 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
返回:
the object that implements the control, or null.

getControlComponent

public java.awt.Component getControlComponent()
从接口 Control 复制的描述
Get the Component associated with this Control object. For example, this method might return a slider for volume control or a panel containing radio buttons for CODEC control. The getControlComponent method can return null if there is no GUI control for this Control.

指定者:
接口 Control 中的 getControlComponent

updateFormat

public void updateFormat()
Update the format per track on the progress control.


updateRates

public void updateRates(long now)
Update the frame rate per track on the progress control.