public class AMController extends MediaController
| Modifier and Type | Field and Description |
|---|---|
protected Time |
eomDuration |
protected static int |
TRYSET_CANT |
protected static int |
TRYSET_DONE |
protected static int |
TRYSET_PASTEOM |
parent, stateLATENCY_UNKNOWN, Prefetched, Prefetching, Realized, Realizing, Started, UnrealizedDURATION_UNBOUNDED, DURATION_UNKNOWN| Constructor and Description |
|---|
AMController(Handler handler)
Methods
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
abortPrefetch()
Called when the prefetch() is aborted, i.e.
|
protected void |
abortRealize()
Called when the realize() is aborted, i.e.
|
boolean |
audioEnabled() |
int |
canRead(int bytes)
Stream related calls made from native code
|
long |
canSeek(long seekTo) |
protected void |
doClose()
Invoked by close() to cleanup the Controller.
|
protected void |
doDeallocate()
Called by deallocate().
|
protected boolean |
doPrefetch()
The stub function to perform the steps to prefetch the controller.
|
protected boolean |
doRealize()
The stub function to perform the steps to realize the controller.
|
float |
doSetRate(float factor) |
protected void |
doStart()
Start immediately.
|
void |
doStop()
Invoked from stop().
|
void |
finalize() |
void |
gainChange(float g) |
Control[] |
getControls()
Return a list of Control objects this Controller
supports.
|
Time |
getDuration()
Return the duration of the media.
|
TimeBase |
getTimeBase()
Get the current time base.
|
Component |
getVisualComponent() |
boolean |
isConfigurable() |
void |
muteChange(boolean state) |
int |
read(byte[] data,
int offset,
int length) |
long |
seek(long seekTo) |
void |
setMediaTime(Time time)
Set the media time.
|
void |
setSource(DataSource s) |
void |
setTimeBase(TimeBase tb)
Set the timebase used by the controller.
|
boolean |
startSource(boolean on,
boolean regardless) |
protected int |
trySetMediaTime(Time time) |
boolean |
videoEnabled() |
addControllerListener, cleanup, close, completePrefetch, completeRealize, controllerUpdate, deallocate, dispatchEvent, doFailedPrefetch, doFailedRealize, getControl, getMediaClockTime, getMediaNanoseconds, getMediaTime, getRate, getStartLatency, getState, getStopTime, getSyncTime, getTargetState, mapToTimeBase, prefetch, processEvent, realize, removeControllerListener, sendEvent, setMediaLength, setRate, setStopTime, setTargetState, stop, stopAtTime, syncStartprotected static final int TRYSET_DONE
protected static final int TRYSET_CANT
protected static final int TRYSET_PASTEOM
protected Time eomDuration
public AMController(Handler handler)
public void setSource(DataSource s) throws IncompatibleSourceException
IncompatibleSourceExceptionpublic void setTimeBase(TimeBase tb) throws IncompatibleTimeBaseException
MediaControllersetTimeBase in interface ClocksetTimeBase in class MediaControllertb - the time base to set to.IncompatibleTimeBaseException - is thrown if the Controller
cannot accept the given time base.public TimeBase getTimeBase()
MediaControllergetTimeBase in interface ClockgetTimeBase in class MediaControllerpublic boolean isConfigurable()
public Control[] getControls()
MediaControllergetControls in interface ControllergetControls in class MediaControllerpublic int canRead(int bytes)
public long canSeek(long seekTo)
public long seek(long seekTo)
public int read(byte[] data,
int offset,
int length)
protected boolean doRealize()
MediaControllerReturn 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.
doRealize in class MediaControllerprotected void abortRealize()
MediaControllerabortRealize in class MediaControllerprotected void abortPrefetch()
MediaControllerabortPrefetch in class MediaControllerprotected boolean doPrefetch()
MediaControllerReturn true if the prefetch 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.
doPrefetch in class MediaControllerprotected final void doStart()
MediaControllerdoStart in class MediaControllerpublic void doStop()
MediaControllerdoStop in class MediaControllerprotected void doDeallocate()
MediaControllerdoDeallocate in class MediaControllerprotected void doClose()
MediaControllerdoClose in class MediaControllerpublic void setMediaTime(Time time)
MediaControllersetMediaTime in interface ClocksetMediaTime in class MediaControllertime - the media time to set to.protected int trySetMediaTime(Time time)
public float doSetRate(float factor)
doSetRate in class MediaControllerpublic Component getVisualComponent()
public Time getDuration()
MediaControllergetDuration in interface DurationgetDuration in class MediaControllerpublic boolean startSource(boolean on,
boolean regardless)
public boolean audioEnabled()
public boolean videoEnabled()
public void gainChange(float g)
public void muteChange(boolean state)
Copyright © 2012 code4tv.com. All Rights Reserved.