public abstract class LoopThread extends MediaThread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected boolean |
killed |
protected boolean |
paused |
protected boolean |
restarted |
mediaThreadGroupMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
LoopThread()
The pause flag determines the initial state.
|
| Modifier and Type | Method and Description |
|---|---|
void |
blockingPause() |
void |
doKilled()
Callback before the thread is killed.
|
void |
doPause()
Callback before the thread goes into the pause state.
|
boolean |
isPaused() |
void |
kill() |
void |
pause()
Set the paused state to true.
|
abstract boolean |
process()
process callback function.
|
void |
restart()
Resume the loop at the beginning of the loop where
waitHereIfPaused() is called.
|
void |
run()
The run method for the Thread class.
|
void |
waitHereIfPaused()
Put the thread in a wait() if the paused state is on.
|
getMediaThreadGroup, useAudioPriority, useControlPriority, useNetworkPriority, useVideoPriorityactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected boolean paused
protected boolean restarted
protected boolean killed
public void pause()
public boolean isPaused()
public void blockingPause()
public void restart()
public void kill()
public void waitHereIfPaused()
public abstract boolean process()
public void doPause()
public void doKilled()
Copyright © 2012 code4tv.com. All Rights Reserved.