pub struct EngineProject { /* private fields */ }Expand description
An immutable project snapshot and its reusable evaluation index.
Implementations§
Source§impl EngineProject
impl EngineProject
Sourcepub fn new(project: Project) -> Result<Self, EvalError>
pub fn new(project: Project) -> Result<Self, EvalError>
Validates a project and builds its active interval index.
§Errors
Returns an evaluation error when the project is structurally invalid.
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Process-unique snapshot identity, shared by clones. An crate::Exporter renders only
its own snapshot.
Sourcepub const fn draws_text(&self) -> bool
pub const fn draws_text(&self) -> bool
Whether any frame may draw text, which the host must prepare
(crate::TextTextures::prepare_at).
Sourcepub fn evaluate(&self, time: MediaTime) -> Result<FrameDesc<'_>, EvalError>
pub fn evaluate(&self, time: MediaTime) -> Result<FrameDesc<'_>, EvalError>
Evaluates a deterministic frame description.
§Errors
Returns an error if the immutable index and project disagree.
Sourcepub fn frame_needs(&self, time: MediaTime) -> Result<Vec<FrameNeed>, EvalError>
pub fn frame_needs(&self, time: MediaTime) -> Result<Vec<FrameNeed>, EvalError>
Returns the host frames needed at a timeline timestamp.
§Errors
Returns an error if the immutable index and project disagree.
Sourcepub fn evaluate_audio(
&self,
range: TimeRange,
) -> Result<AudioSpanDesc<'_>, EvalError>
pub fn evaluate_audio( &self, range: TimeRange, ) -> Result<AudioSpanDesc<'_>, EvalError>
Evaluates every audio clip overlapping a half-open timeline span.
§Errors
Returns an error if the immutable index and project disagree.
Sourcepub fn evaluate_audio_in<'s>(
&self,
range: TimeRange,
scratch: &'s mut AudioSpanScratch,
) -> Result<AudioSpan<'_, 's>, EvalError>
pub fn evaluate_audio_in<'s>( &self, range: TimeRange, scratch: &'s mut AudioSpanScratch, ) -> Result<AudioSpan<'_, 's>, EvalError>
Self::evaluate_audio into reusable scratch.
§Errors
Returns an error if the immutable index and project disagree.
Sourcepub fn timeline_range(&self) -> Option<TimeRange>
pub fn timeline_range(&self) -> Option<TimeRange>
The smallest interval holding everything the timeline shows, captions included
(alpha2_model::Timeline::extent).
Sourcepub fn effects(&self) -> Vec<(&str, u32)>
pub fn effects(&self) -> Vec<(&str, u32)>
Every effect the project can draw, by id and version, each once. Compositions that cannot draw are reported when a frame shows them.
Sourcepub fn check_effects(&self, renderer: &Renderer) -> Result<(), EngineError>
pub fn check_effects(&self, renderer: &Renderer) -> Result<(), EngineError>
Checks that renderer can draw every effect the project uses
(Self::effects).
§Errors
Returns crate::EngineError::UnregisteredEffect naming the first missing one.
Trait Implementations§
Source§impl Clone for EngineProject
impl Clone for EngineProject
Auto Trait Implementations§
impl Freeze for EngineProject
impl RefUnwindSafe for EngineProject
impl Send for EngineProject
impl Sync for EngineProject
impl Unpin for EngineProject
impl UnsafeUnpin for EngineProject
impl UnwindSafe for EngineProject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more