refactor(media): consolidate upload/edit/download into MediaService
Merge UploadService, EditService, JobOrchestrationService, and
DownloadService into a single MediaService with a unified Job lifecycle
(READY → PROCESSING → SUCCEEDED/FAILED via JobState enum).
- Add MediaController (/api/v1/media) exposing compress, save, and clip
- Add JobController (/api/v1/job) for status polling and file download
- Move clip/thumbnail download into ClipController (/{id}/media, /{id}/thumbnail)
- Move stream saveSection/clip from StreamService into MediaService
- Simplify Job DTO: remove dual ClipOptions/files, add ProgressTracker and download file
- Refactor JobRegistryService.add() → generateJob() to co-locate creation and registration
- Wire FFmpeg out_time_ms progress parsing into StreamActionsService via CommandRunner
- Rename GET /api/v1/auth/user → GET /api/v1/user/me
- Delete DownloadController, MetadataController, UploadController
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.ddf.vodsystem.controllers.dto;
|
||||
|
||||
import com.ddf.vodsystem.dto.JobState;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public record JobResponse (
|
||||
String uuid,
|
||||
float progress,
|
||||
boolean isComplete,
|
||||
JobState state,
|
||||
String errorOutput,
|
||||
Instant createdAt
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package com.ddf.vodsystem.controllers.dto;
|
||||
|
||||
public record UUIDResponse(String uuid) {}
|
||||
Reference in New Issue
Block a user