87 lines
1.8 KiB
Protocol Buffer
87 lines
1.8 KiB
Protocol Buffer
// Protocol Buffer Definitions - GENERATED FILE
|
|
//
|
|
// Do not edit directly. Regenerate using modelgen.
|
|
|
|
syntax = "proto3";
|
|
|
|
package mpr.worker;
|
|
|
|
service WorkerService {
|
|
rpc SubmitJob(JobRequest) returns (JobResponse);
|
|
rpc StreamProgress(ProgressRequest) returns (stream ProgressUpdate);
|
|
rpc CancelJob(CancelRequest) returns (CancelResponse);
|
|
rpc GetWorkerStatus(Empty) returns (WorkerStatus);
|
|
rpc StreamChunkPipeline(ChunkStreamRequest) returns (stream ChunkPipelineEvent);
|
|
}
|
|
|
|
message JobRequest {
|
|
string job_id = 1;
|
|
string source_path = 2;
|
|
string output_path = 3;
|
|
string preset_json = 4;
|
|
optional float trim_start = 5;
|
|
optional float trim_end = 6;
|
|
}
|
|
|
|
message JobResponse {
|
|
string job_id = 1;
|
|
bool accepted = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message ProgressRequest {
|
|
string job_id = 1;
|
|
}
|
|
|
|
message ProgressUpdate {
|
|
string job_id = 1;
|
|
int32 progress = 2;
|
|
int32 current_frame = 3;
|
|
float current_time = 4;
|
|
float speed = 5;
|
|
string status = 6;
|
|
optional string error = 7;
|
|
}
|
|
|
|
message CancelRequest {
|
|
string job_id = 1;
|
|
}
|
|
|
|
message CancelResponse {
|
|
string job_id = 1;
|
|
bool cancelled = 2;
|
|
string message = 3;
|
|
}
|
|
|
|
message WorkerStatus {
|
|
bool available = 1;
|
|
int32 active_jobs = 2;
|
|
repeated string supported_codecs = 3;
|
|
bool gpu_available = 4;
|
|
}
|
|
|
|
message Empty {
|
|
// Empty
|
|
}
|
|
|
|
message ChunkStreamRequest {
|
|
string job_id = 1;
|
|
}
|
|
|
|
message ChunkPipelineEvent {
|
|
string job_id = 1;
|
|
string event_type = 2;
|
|
int32 sequence = 3;
|
|
string worker_id = 4;
|
|
string state = 5;
|
|
int32 queue_size = 6;
|
|
float elapsed = 7;
|
|
float throughput_mbps = 8;
|
|
int32 total_chunks = 9;
|
|
int32 processed_chunks = 10;
|
|
int32 failed_chunks = 11;
|
|
string error = 12;
|
|
float processing_time = 13;
|
|
int32 retries = 14;
|
|
}
|