Package com.biglybt.core.devices.impl
Class TranscodeQueueImpl
java.lang.Object
com.biglybt.core.devices.impl.TranscodeQueueImpl
- All Implemented Interfaces:
TranscodeQueue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AsyncDispatcher
(package private) boolean
private static final String
private TranscodeJobImpl
private static final Object
private CopyOnWriteList
<TranscodeQueueListener> private TranscodeManagerImpl
(package private) int
(package private) boolean
(package private) List
<TranscodeJobImpl> (package private) AESemaphore
(package private) AEThread2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(TranscodeTarget target, TranscodeProfile profile, DiskManagerFileInfo file, boolean add_stopped) add
(TranscodeTarget target, TranscodeProfile profile, DiskManagerFileInfo file, boolean add_stopped, boolean stream, int transcode_requirement) add
(TranscodeTarget target, TranscodeProfile profile, DiskManagerFileInfo file, int transcode_requirement, boolean add_stopped) void
void
addListener
(TranscodeQueueListener listener) protected TranscodeProviderAnalysis
analyse
(TranscodeJobImpl job) protected void
analyse
(TranscodeJobImpl job, TranscodeAnalysisListener listener) protected void
protected void
close()
protected void
void
generate
(IndentWriter writer) protected int
getIndex
(TranscodeJobImpl job) protected TranscodeJobImpl
getJob
(TranscodeFile for_file) int
getJobs()
long
protected void
boolean
isPaused()
boolean
protected void
jobChanged
(TranscodeJob job, boolean schedule, boolean persistable) protected void
protected void
protected void
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
void
removeListener
(TranscodeQueueListener listener) void
resume()
protected void
protected void
schedule()
void
setMaxBytesPerSecond
(long max) protected void
updateStatus
(int tick_count)
-
Field Details
-
CONFIG_FILE
- See Also:
-
KEY_XCODE_ERROR
-
manager
-
queue
List<TranscodeJobImpl> queue -
queue_sem
AESemaphore queue_sem -
queue_thread
AEThread2 queue_thread -
current_job
-
anaylsis_dispatcher
-
listeners
-
action_listeners
-
paused
volatile boolean paused -
max_bytes_per_sec
volatile int max_bytes_per_sec -
config_dirty
volatile boolean config_dirty
-
-
Constructor Details
-
TranscodeQueueImpl
-
-
Method Details
-
initialise
protected void initialise() -
process
-
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 interfaceTranscodeQueue
- Throws:
TranscodeException
-
add
public TranscodeJobImpl add(TranscodeTarget target, TranscodeProfile profile, DiskManagerFileInfo file, int transcode_requirement, boolean add_stopped) throws TranscodeException - Specified by:
add
in interfaceTranscodeQueue
- 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
- Throws:
TranscodeActionVetoException
-
jobChanged
-
getIndex
-
getJobs
- Specified by:
getJobs
in interfaceTranscodeQueue
-
getJobCount
public int getJobCount()- Specified by:
getJobCount
in interfaceTranscodeQueue
-
getCurrentJob
- Specified by:
getCurrentJob
in interfaceTranscodeQueue
-
isTranscoding
public boolean isTranscoding()- Specified by:
isTranscoding
in interfaceTranscodeQueue
-
getJob
-
moveUp
-
moveDown
-
pause
public void pause()- Specified by:
pause
in interfaceTranscodeQueue
-
isPaused
public boolean isPaused()- Specified by:
isPaused
in interfaceTranscodeQueue
-
resume
public void resume()- Specified by:
resume
in interfaceTranscodeQueue
-
getMaxBytesPerSecond
public long getMaxBytesPerSecond()- Specified by:
getMaxBytesPerSecond
in interfaceTranscodeQueue
-
setMaxBytesPerSecond
public void setMaxBytesPerSecond(long max) - Specified by:
setMaxBytesPerSecond
in interfaceTranscodeQueue
-
lookupTarget
- Throws:
TranscodeException
-
lookupProfile
- Throws:
TranscodeException
-
lookupFile
- Throws:
TranscodeException
-
analyse
protected void analyse(TranscodeJobImpl job, TranscodeAnalysisListener listener) throws TranscodeException - Throws:
TranscodeException
-
analyse
- Throws:
TranscodeException
-
configDirty
protected void configDirty() -
loadConfig
protected void loadConfig() -
saveConfig
protected void saveConfig() -
close
protected void close() -
addListener
- Specified by:
addListener
in interfaceTranscodeQueue
-
removeListener
- Specified by:
removeListener
in interfaceTranscodeQueue
-
addActionListener
- Specified by:
addActionListener
in interfaceTranscodeQueue
-
removeActionListener
- Specified by:
removeActionListener
in interfaceTranscodeQueue
-
log
-
log
-
generate
-