Methods Summary |
---|
public boolean | audioEnabled()
return amController.audioEnabled();
|
protected boolean | connectNodes()
//addControls(amController.getControls());
return true;
|
protected void | createGainControl()
// called by MediaPlayer.doRealize()
|
public void | doClose()
/*
if (controlPanel != null)
controlPanel.dispose();
controlPanel = null;
*/
super.doClose();
amController = null;
|
protected void | doDeallocate()
super.doDeallocate();
justDeallocated = true;
|
protected boolean | doPrefetch()
if (justDeallocated) {
setMediaTime(new Time(0));
justDeallocated = false;
}
return super.doPrefetch();
|
protected synchronized boolean | doRealize()
boolean returnVal = super.doRealize();
if (!returnVal)
return false;
/*
if (audioEnabled()) {
gainControl = new GainCA(false);
gainControl.addGainChangeListener( this );
}
// set rate control to null if player plays only AUDIO since
// we dont support audio rate control
if ((rateControl != null) && (audioEnabled()) && (!videoEnabled()))
rateControl = null;
if (regionControl != null)
regionControl.setEnable(false);
Time dur = amController.getDuration();
if (dur != null)
setMediaLength(dur.getNanoseconds());
*/
return true;
|
public java.awt.Component | getControlPanelComponent()Get the Component with the default user interface for controlling
this player.
If this player has no default control panel null is
returned.
return super.getControlPanelComponent();
|
public javax.media.GainControl | getGainControl()Get the object for controlling audio gain. Returns null
if this player does not have a GainControl (e.g. no audio).
return super.getGainControl();
|
protected javax.media.TimeBase | getMasterTimeBase()
return amController.getTimeBase();
|
public java.awt.Component | getVisualComponent()Get the Component this player will output its visual media to. If
this player has no visual component (e.g. audio only)
getVisualComponent() will return null.
if (state == Unrealized || state == Realizing)
throw new javax.media.NotRealizedError("Cannot get visual component from an unrealized player.");
return amController.getVisualComponent();
|
public void | setSource(javax.media.protocol.DataSource source)
//if (BuildInfo.usePureJava()) {
// throw new IncompatibleSourceException(this + " : does not support mpeg on this platform.");
//}
super.setSource(source);
try {
if (amController == null) {
amController = new AMController(this);
amController.setSource(source);
manageController(amController);
}
} catch (Exception e) {
throw new IncompatibleSourceException(e.getMessage());
}
|
public void | updateStats()
|
public boolean | videoEnabled()
return amController.videoEnabled();
|