com.aelitis.azureus.core.devices.impl
Class TranscodeQueueImpl
java.lang.Object
com.aelitis.azureus.core.devices.impl.TranscodeQueueImpl
- All Implemented Interfaces:
- TranscodeQueue
public class TranscodeQueueImpl
- extends Object
- implements TranscodeQueue
Method Summary |
TranscodeJobImpl |
add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
boolean add_stopped)
|
TranscodeJobImpl |
add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
boolean add_stopped,
boolean stream,
int transcode_requirement)
|
TranscodeJobImpl |
add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
int transcode_requirement,
boolean add_stopped)
|
void |
addActionListener(TranscodeQueueActionListener listener)
|
void |
addListener(TranscodeQueueListener listener)
|
protected TranscodeProviderAnalysis |
analyse(TranscodeJobImpl job)
|
protected void |
analyse(TranscodeJobImpl job,
TranscodeAnalysisListener listener)
|
protected void |
checkJobStatus()
|
protected void |
close()
|
protected void |
configDirty()
|
void |
generate(IndentWriter writer)
|
TranscodeJob |
getCurrentJob()
|
protected int |
getIndex(TranscodeJobImpl job)
|
protected TranscodeJobImpl |
getJob(TranscodeFile for_file)
|
int |
getJobCount()
|
TranscodeJobImpl[] |
getJobs()
|
long |
getMaxBytesPerSecond()
|
protected void |
initialise()
|
boolean |
isPaused()
|
boolean |
isTranscoding()
|
protected void |
jobChanged(TranscodeJob job,
boolean schedule,
boolean persistable)
|
protected void |
loadConfig()
|
protected void |
log(String str)
|
protected void |
log(String str,
Throwable e)
|
protected DiskManagerFileInfo |
lookupFile(byte[] hash,
int index)
|
protected TranscodeProfile |
lookupProfile(String profile_id)
|
protected TranscodeTarget |
lookupTarget(String target_id)
|
void |
moveDown(TranscodeJobImpl job)
|
void |
moveUp(TranscodeJobImpl job)
|
void |
pause()
|
protected boolean |
process(TranscodeJobImpl job)
|
protected void |
remove(TranscodeJobImpl job,
boolean force)
|
void |
removeActionListener(TranscodeQueueActionListener listener)
|
void |
removeListener(TranscodeQueueListener listener)
|
void |
resume()
|
protected void |
saveConfig()
|
protected void |
schedule()
|
void |
setMaxBytesPerSecond(long max)
|
protected void |
updateStatus(int tick_count)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TranscodeQueueImpl
protected TranscodeQueueImpl(TranscodeManagerImpl _manager)
initialise
protected void initialise()
process
protected boolean process(TranscodeJobImpl job)
schedule
protected void schedule()
updateStatus
protected void updateStatus(int tick_count)
checkJobStatus
protected void checkJobStatus()
add
public TranscodeJobImpl add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
boolean add_stopped)
throws TranscodeException
- Specified by:
add
in interface TranscodeQueue
- Throws:
TranscodeException
add
public TranscodeJobImpl add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
int transcode_requirement,
boolean add_stopped)
throws TranscodeException
- Specified by:
add
in interface TranscodeQueue
- Throws:
TranscodeException
add
public TranscodeJobImpl add(TranscodeTarget target,
TranscodeProfile profile,
DiskManagerFileInfo file,
boolean add_stopped,
boolean stream,
int transcode_requirement)
throws TranscodeException
- Throws:
TranscodeException
remove
protected void remove(TranscodeJobImpl job,
boolean force)
throws TranscodeActionVetoException
- Throws:
TranscodeActionVetoException
jobChanged
protected void jobChanged(TranscodeJob job,
boolean schedule,
boolean persistable)
getIndex
protected int getIndex(TranscodeJobImpl job)
getJobs
public TranscodeJobImpl[] getJobs()
- Specified by:
getJobs
in interface TranscodeQueue
getJobCount
public int getJobCount()
- Specified by:
getJobCount
in interface TranscodeQueue
getCurrentJob
public TranscodeJob getCurrentJob()
- Specified by:
getCurrentJob
in interface TranscodeQueue
isTranscoding
public boolean isTranscoding()
- Specified by:
isTranscoding
in interface TranscodeQueue
getJob
protected TranscodeJobImpl getJob(TranscodeFile for_file)
moveUp
public void moveUp(TranscodeJobImpl job)
moveDown
public void moveDown(TranscodeJobImpl job)
pause
public void pause()
- Specified by:
pause
in interface TranscodeQueue
isPaused
public boolean isPaused()
- Specified by:
isPaused
in interface TranscodeQueue
resume
public void resume()
- Specified by:
resume
in interface TranscodeQueue
getMaxBytesPerSecond
public long getMaxBytesPerSecond()
- Specified by:
getMaxBytesPerSecond
in interface TranscodeQueue
setMaxBytesPerSecond
public void setMaxBytesPerSecond(long max)
- Specified by:
setMaxBytesPerSecond
in interface TranscodeQueue
lookupTarget
protected TranscodeTarget lookupTarget(String target_id)
throws TranscodeException
- Throws:
TranscodeException
lookupProfile
protected TranscodeProfile lookupProfile(String profile_id)
throws TranscodeException
- Throws:
TranscodeException
lookupFile
protected DiskManagerFileInfo lookupFile(byte[] hash,
int index)
throws TranscodeException
- Throws:
TranscodeException
analyse
protected void analyse(TranscodeJobImpl job,
TranscodeAnalysisListener listener)
throws TranscodeException
- Throws:
TranscodeException
analyse
protected TranscodeProviderAnalysis analyse(TranscodeJobImpl job)
throws TranscodeException
- Throws:
TranscodeException
configDirty
protected void configDirty()
loadConfig
protected void loadConfig()
saveConfig
protected void saveConfig()
close
protected void close()
addListener
public void addListener(TranscodeQueueListener listener)
- Specified by:
addListener
in interface TranscodeQueue
removeListener
public void removeListener(TranscodeQueueListener listener)
- Specified by:
removeListener
in interface TranscodeQueue
addActionListener
public void addActionListener(TranscodeQueueActionListener listener)
- Specified by:
addActionListener
in interface TranscodeQueue
removeActionListener
public void removeActionListener(TranscodeQueueActionListener listener)
- Specified by:
removeActionListener
in interface TranscodeQueue
log
protected void log(String str)
log
protected void log(String str,
Throwable e)
generate
public void generate(IndentWriter writer)