Improve J2K progress reporting

This commit is contained in:
Simon Ogorodnik
2020-07-27 14:34:53 +03:00
parent 8bcf1000f6
commit dc963e4ff6
6 changed files with 95 additions and 18 deletions
@@ -298,6 +298,7 @@ interface WithProgressProcessor {
): List<TOutputItem>
fun updateState(fileIndex: Int?, phase: Int, description: String)
fun updateState(phase: Int, subPhase: Int, subPhaseCount: Int, fileIndex: Int?, description: String)
fun <T> process(action: () -> T): T
}
@@ -348,6 +349,16 @@ class OldWithProgressProcessor(private val progress: ProgressIndicator?, private
override fun updateState(fileIndex: Int?, phase: Int, description: String) {
throw AbstractMethodError("Should not be called for old J2K")
}
override fun updateState(
phase: Int,
subPhase: Int,
subPhaseCount: Int,
fileIndex: Int?,
description: String
) {
error("Should not be called for old J2K")
}
}
class ProgressPortionReporter(