RUNE-2001: Media Export Driver Proposed
Summary
There is no public MediaExportDriver in the current design. Export orchestration prepares caller-owned IVideoTrack and optional IAudioTrack inputs, and a single IMediaEncoder pulls timestamped samples until end of stream.
Design
- Video export is render-bound:
StoryRenderTrackchooses timestamps frame-by-frame, seeksStoryPlayback, renders one frame, and surfacesVideoSamplevalues throughIVideoTrack. - Audio export is sample-domain: orchestration prepares one
IAudioBuffergraph, wraps it asAudioBufferTrack, and lets the encoder pull timestampedAudioSamplechunks. - Final container assembly is now an internal concern of
IMediaEncoder, not a separate public step. StoryExporterbuilds aStoryPlayback, createsStoryRenderTrackplus optionalAudioBufferTrack, and passes them toIMediaEncoder.Encode(...).
Ownership
IVideoTrackandIAudioTrackare caller-supplied transport adapters, not backend-owned driver abstractions.VideoSampleandAudioSamplecarry timestamp, duration, and disposal semantics with each returned unit.- The encoder owns encode/mux policy; orchestration owns scheduling and prepared-track lifetime.
Boundaries
There is no combined driver and no separate export-source abstraction in Rune.Media. Story/orchestration code owns scheduling and track generation, while media backends own encoding, decoding, and container details behind IMediaEncoder/IMediaDecoder.