RUNE-1012: Story Media Exporter Proposed
Summary
StoryExportRequest is the Story-layer orchestration bridge from a baked Story scene to a backend-neutral media encoder. It carries the StoryScene, bake engine, export geometry, frame rate, encoder options, and optional audio buffer graph.
Design
StoryExportRequest contains:
- the baked
StoryScene; - the bake engine that owns snapshot resources;
- exported video width and height;
- output frame rate;
- the
IMediaEncoderandMediaEncodeOptions; - optional
IAudioBuffergraph.
StoryExporter.Export creates StoryPlayback from the scene, wraps it in StoryRenderTrack, optionally creates an AudioBufferTrack, and calls the provided IMediaEncoder.Encode(...). Source-video sprite frames are updated inside StoryPlayback.RenderFrame; the exporter only sees the fully rendered story frame.
Boundaries
This is a baked-scene exporter. It does not execute or bake Story scripts, decode media files directly, or encode/mux packets itself. Script execution and snapshot capture belong to RuneStory.Bake(...); export only seeks and renders the baked timeline, including render-time updates for dynamic video sprites.
Audio-capable clips require an audio buffer provider. The request fails fast without one so scheduled audio is not silently dropped.
Test Strategy
Story tests cover combined video/audio export ordering through the real Story/Rune source, video-only export without an audio provider, and request validation for audio clips without a provider.