feat: video renderer adapter w/ slides + charts + ffmpeg

This commit is contained in:
2026-06-02 22:31:45 +02:00
parent f00a2cbbb8
commit d45d8aa913
8 changed files with 820 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ use uuid::Uuid;
use crate::{
errors::DomainError,
events::{DomainEvent, EventEnvelope},
models::wrapup::WrapUpReport,
models::{
AnnotatedRow, DiaryEntry, DiaryFilter, EntityType, ExportFormat, ExternalPersonId,
FeedEntry, FieldMapping, FileFormat, ImportError, ImportProfile, ImportSession,
@@ -521,3 +522,22 @@ pub trait WrapUpStatsQuery: Send + Sync {
range: &DateRange,
) -> Result<Vec<WrapUpMovieRow>, DomainError>;
}
// ── Video renderer ──────────────────────────────────────────────────────────
pub struct VideoRenderConfig {
pub slide_duration_secs: u32,
pub transition_duration_secs: f32,
pub resolution: (u32, u32),
pub ffmpeg_path: String,
}
#[async_trait]
pub trait WrapUpVideoRenderer: Send + Sync {
async fn render(
&self,
report: &WrapUpReport,
poster_images: Vec<(String, Vec<u8>)>,
config: &VideoRenderConfig,
) -> Result<Vec<u8>, DomainError>;
}