aether_renderer_core/
report.rs1use std::path::PathBuf;
2
3#[derive(Debug)]
4pub struct RenderReport {
5 pub output_path: PathBuf,
6 pub frames_rendered: Option<usize>,
7 pub ffmpeg_warnings: Vec<String>,
8 pub preview: bool,
9 pub notes: Option<String>,
10}
11
12impl RenderReport {
13 pub fn new(
14 output_path: PathBuf,
15 frames_rendered: Option<usize>,
16 ffmpeg_warnings: Vec<String>,
17 preview: bool,
18 notes: Option<String>,
19 ) -> Self {
20 Self {
21 output_path,
22 frames_rendered,
23 ffmpeg_warnings,
24 preview,
25 notes,
26 }
27 }
28
29 pub fn summary(&self) -> String {
30 let mut summary = format!("✅ Rendered to: {}\n", self.output_path.display());
31
32 if let Some(frames) = self.frames_rendered {
33 summary.push_str(&format!("Frames rendered: {}\n", frames));
34 } else {
35 summary.push_str("Frames rendered: Unknown\n");
36 }
37
38 if !self.ffmpeg_warnings.is_empty() {
39 summary.push_str("⚠️ FFmpeg Warnings:\n");
40 for warning in &self.ffmpeg_warnings {
41 summary.push_str(&format!("- {}\n", warning));
42 }
43 }
44
45 if self.preview {
46 summary.push_str("🔍 Preview mode enabled.\n");
47 }
48
49 if let Some(notes) = &self.notes {
50 summary.push_str(&format!("📝 Notes: {}\n", notes));
51 }
52
53 summary
54 }
55}