Skip to main content

Crate oxideav_scene

Crate oxideav_scene 

Source
Expand description

A time-based composition model for oxideav.

The type surface (scene, objects, animations, time-base) is in place. The full SceneRenderer driver is still a stub (StubRenderer returns Error::Unsupported); concrete per-object rendering lands here piecemeal. The first real piece is text::TextRenderer — it composites a TextRun onto a straight-alpha RGBA framebuffer via oxideav_scribe (TrueType shaping + scanline rasterisation). The caller supplies the oxideav_scribe::Face; scene-level font discovery is out of scope.

See README.md for the full design + the three target use cases (PDF pages, RTMP streaming compositor, NLE timeline).

§Quick tour

use oxideav_scene::{Scene, Canvas, SceneDuration, SceneObject};
use oxideav_core::TimeBase;

let scene = Scene {
    canvas: Canvas::raster(1920, 1080),
    duration: SceneDuration::Finite(30_000),
    time_base: TimeBase::new(1, 1_000),
    sample_rate: 48_000,
    ..Scene::default()
};
assert_eq!(scene.canvas.raster_size(), Some((1920, 1080)));

The hierarchy:

Re-exports§

pub use adapt::adapt_frame_to;
pub use adapt::adapt_frame_to_canvas;
pub use adapt::AdaptedSource;
pub use animation::AnimatedProperty;
pub use animation::Animation;
pub use animation::Easing;
pub use animation::Keyframe;
pub use animation::KeyframeValue;
pub use animation::Repeat;
pub use audio::AudioCue;
pub use audio::AudioSource;
pub use audio::DuckBus;
pub use duration::Lifetime;
pub use duration::SceneDuration;
pub use duration::TimeStamp;
pub use id::ObjectId;
pub use object::BlendMode;
pub use object::Canvas;
pub use object::ClipRect;
pub use object::Effect;
pub use object::ImageSource;
pub use object::LengthUnit;
pub use object::LiveStreamHandle;
pub use object::ObjectKind;
pub use object::SceneObject;
pub use object::Shape;
pub use object::TextRun;
pub use object::Transform;
pub use object::VideoSource;
pub use ops::ExportOp;
pub use ops::Operation;
pub use page::Page;
pub use raster::rasterize_vector;
pub use render::RenderedFrame;
pub use render::SceneRenderer;
pub use render::SceneSampler;
pub use render::StubRenderer;
pub use scene::Background;
pub use scene::Metadata;
pub use scene::Scene;
pub use source::drive;
pub use source::FnSink;
pub use source::NullSink;
pub use source::RenderedSource;
pub use source::SceneSink;
pub use source::SceneSource;
pub use source::SourceFormat;
pub use text::TextRenderer;

Modules§

adapt
Automatic pixel-format adaptation for scene I/O.
animation
Keyframe-based property animations.
audio
Timeline-triggered audio cues.
duration
Scene-time primitives.
id
Stable object identifiers.
object
Scene objects — what’s on the canvas, and where.
ops
External-operation DSL for the streaming compositor.
page
Page-based timing model.
raster
Vector → raster fallback for [ObjectKind::Vector] when the output target is a raster pipeline.
render
Renderer traits + a stub implementation.
scene
Root scene type.
source
Source / Sink plumbing.
text
Text-run rasterisation for crate::TextRun via the oxideav_scribe vector shaper + oxideav_raster vector→pixel renderer.