public class Handler extends MediaPlayer
| Modifier and Type | Field and Description |
|---|---|
protected AMController |
amController
Variables
|
controls, defaultColorModel, gainControl, source, systemTimeBase, VERSIONparent, stateLATENCY_UNKNOWN, Prefetched, Prefetching, Realized, Realizing, Started, UnrealizedDURATION_UNBOUNDED, DURATION_UNKNOWN| Constructor and Description |
|---|
Handler()
Methods
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
audioEnabled()
Return true if the player is currently playing media
with an audio track.
|
protected boolean |
connectNodes()
This is invoked from doRealize() after all the nodes created in
createNode() is fully realized.
|
protected void |
createGainControl()
If the Player can play audio, a gain control adapter is created
and the player is registered a listener for gain change events
|
protected boolean |
createNodes()
This is invoked from doRealize() during the player realization stage.
|
void |
doClose()
This is called when close() is invoked on the Player.
|
protected boolean |
doRealize()
The stub function (invoked from realize()) to perform the steps to
realize the player.
|
Component |
getControlPanelComponent()
Get the Component with the default user interface for controlling
this player.
|
GainControl |
getGainControl()
Get the object for controlling audio gain.
|
protected TimeBase |
getMasterTimeBase()
This should be implemented by the subclass.
|
Component |
getVisualComponent()
Get the Component this player will output its visual media to.
|
void |
processEvent(ControllerEvent evt)
Process one event from another Controller which we are listening to.
|
void |
setSource(DataSource source)
Set the DataSource that provides the media for this player.
|
void |
updateStats() |
boolean |
videoEnabled()
Return true if the player is currently playing media
with a video track.
|
abortPrefetch, abortRealize, addController, addControls, addNode, addNode, allocBuffers, close, completePrefetch, completeRealize, deviceBusy, doFailedPrefetch, doFailedRealize, doPrefetch, doSetMediaTime, doSetRate, doStart, doStop, flush, gainChange, getControls, getDuration, getNodeList, getSource, muteChange, removeController, removeNode, setMediaLength, setMediaTime, setRate, setStopTime, setTimeBase, setVisualComponent, slaveToMasterTimeBase, start, stop, stop, stopAtTime, synchronousPrefetch, synchronousRealize, syncStart, updateDurationaddControllerListener, cleanup, controllerUpdate, deallocate, dispatchEvent, doDeallocate, getControl, getMediaClockTime, getMediaNanoseconds, getMediaTime, getRate, getStartLatency, getState, getStopTime, getSyncTime, getTargetState, getTimeBase, mapToTimeBase, prefetch, realize, removeControllerListener, sendEvent, setTargetStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddControllerListener, deallocate, getControl, getStartLatency, getState, getTargetState, prefetch, realize, removeControllerListenergetMediaNanoseconds, getMediaTime, getRate, getStopTime, getSyncTime, getTimeBase, mapToTimeBaseprotected AMController amController
public void setSource(DataSource source) throws IOException, IncompatibleSourceException
MediaPlayersetSource in interface MediaHandlersetSource in class MediaPlayersource - of media for this player.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.protected TimeBase getMasterTimeBase()
MediaPlayergetMasterTimeBase in class MediaPlayerpublic void updateStats()
public Component getVisualComponent()
getVisualComponent in interface PlayergetVisualComponent in class MediaPlayerpublic GainControl getGainControl()
getGainControl in interface PlayergetGainControl in class MediaPlayerpublic Component getControlPanelComponent()
getControlPanelComponent in interface PlayergetControlPanelComponent in class MediaPlayerprotected boolean createNodes()
MediaPlayerIn addition, this method should also choose a master timebase to be used by this player. This should be returned on a getMasterTimeBase() call.
It should return success/failure. A subsequent call to createNodes() after the first successful completion should just return true.
createNodes in class MediaPlayerprotected boolean connectNodes()
MediaPlayerconnectNodes in class MediaPlayerprotected void createGainControl()
MediaPlayercreateGainControl in class MediaPlayerprotected boolean doRealize()
MediaPlayerdoRealize in class MediaPlayerpublic void doClose()
MediaPlayerdoClose in class MediaPlayerpublic boolean audioEnabled()
MediaPlayeraudioEnabled in class MediaPlayerpublic boolean videoEnabled()
MediaPlayervideoEnabled in class MediaPlayerpublic void processEvent(ControllerEvent evt)
MediaControllerprocessEvent in class MediaPlayerevt - controller event to be processedCopyright © 2012 code4tv.com. All Rights Reserved.