ferrex_model/
transcoding.rs1#[derive(Debug, Clone)]
2#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3pub struct TranscodingJobResponse {
4 pub id: String,
5 pub media_id: String,
6 pub media_path: String,
7 pub profile: String,
8 pub status: TranscodingStatus,
9 pub created_at: u64, pub output_path: Option<String>,
11 pub playlist_path: Option<String>,
12 pub error: Option<String>,
13 pub progress_details: Option<TranscodingProgressDetails>,
14 pub duration: Option<f64>, }
16
17#[derive(Debug, Clone, PartialEq)]
18#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
19pub enum TranscodingStatus {
20 Pending,
21 Queued,
22 Processing { progress: f32 },
23 Completed,
24 Failed { error: String },
25 Cancelled,
26}
27
28#[derive(Debug, Clone)]
29#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
30pub struct TranscodingProgressDetails {
31 pub percentage: f32,
32 pub time_elapsed: Option<f64>,
33 pub estimated_time_remaining: Option<f64>,
34 pub frames_processed: Option<u64>,
35 pub current_fps: Option<f64>,
36 pub current_bitrate: Option<u64>,
37}