Backend MP4 conversion (#23)
* ADD conversion queue * ADD RemuxService for MP4 conversion * REMOVE unused conversion queue * REORGANISE Job-related classes * ADD Job stages * REVERT to old commit, using Spring Async instead * ADD asynchronous processing for video tasks * PATCH and streamline progress tracking * ADD asynchronous video processing and job restructuring * REFACTOR job service method * ADD job remux functionality * ADD remuxing endpoint * PATCH complete flag not updating in API response * ADD progress type in frontend * ADD reset functionality for job status * PATCH missing progress bar for subsequent exports * REDESIGN settings box * ADD tracking video file conversion in frontend * PATCH extension bug * REMOVE autowired decorator
This commit is contained in:
@@ -1,19 +1,30 @@
|
||||
package com.ddf.vodsystem.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class ProgressTracker {
|
||||
private float progress;
|
||||
private float progress = 0.0f;
|
||||
private boolean isComplete = false;
|
||||
|
||||
public ProgressTracker(float initialProgress) {
|
||||
this.progress = initialProgress;
|
||||
public synchronized float getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public void setProgress(float newProgress) {
|
||||
public synchronized boolean isComplete() {
|
||||
return isComplete;
|
||||
}
|
||||
|
||||
public synchronized void setProgress(float newProgress) {
|
||||
if (newProgress < 0 || newProgress > 1) {
|
||||
throw new IllegalArgumentException("Progress must be between 0 and 1");
|
||||
}
|
||||
this.progress = newProgress;
|
||||
}
|
||||
|
||||
public synchronized void markComplete() {
|
||||
this.isComplete = true;
|
||||
}
|
||||
|
||||
public synchronized void reset() {
|
||||
this.progress = 0.0f;
|
||||
this.isComplete = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user