pub struct ExportFrameGenerator {
project: EditProject,
stream: EditorVideoStream,
preview: EditorPreview,
next: u64,
total: u64,
}Expand description
Walks an [EditProject] into a deterministic composed-frame stream.
Fields§
§project: EditProject§stream: EditorVideoStream§preview: EditorPreview§next: u64§total: u64Implementations§
Source§impl ExportFrameGenerator
impl ExportFrameGenerator
Sourcepub fn new(project: EditProject, source: &Path) -> Result<Self, String>
pub fn new(project: EditProject, source: &Path) -> Result<Self, String>
Open the source clip + compose pipeline for project, composing at the
project’s aspect-ratio canvas ([EditProject::canvas_dims], AUT-513).
§Errors
Returns a message if the source can’t be opened or the wgpu compose pipeline can’t be created.
Sourcepub fn with_canvas(
project: EditProject,
source: &Path,
canvas_w: u32,
canvas_h: u32,
) -> Result<Self, String>
pub fn with_canvas( project: EditProject, source: &Path, canvas_w: u32, canvas_h: u32, ) -> Result<Self, String>
Like Self::new but composes into an explicit canvas_w × canvas_h
output — the export path passes the aspect canvas after clamping it to
the HW-encoder edge cap (fit_within_encoder_limits) so the generator
and the encoder agree on dimensions. The source is aspect-fit
(letterbox / pillarbox) into the canvas.
§Errors
Returns a message if the source can’t be opened or the wgpu compose pipeline can’t be created.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Total project frames the generator will emit.
Sourcepub fn spawn_count(&self) -> u64
pub fn spawn_count(&self) -> u64
Decode pipelines spawned so far — stays 1 for a full forward walk.
Sourcepub fn next_frame(&mut self) -> Option<ExportFrame>
pub fn next_frame(&mut self) -> Option<ExportFrame>
Generate the next project frame, or None at the end of the project.
Auto Trait Implementations§
impl !Freeze for ExportFrameGenerator
impl !RefUnwindSafe for ExportFrameGenerator
impl Send for ExportFrameGenerator
impl !Sync for ExportFrameGenerator
impl Unpin for ExportFrameGenerator
impl UnsafeUnpin for ExportFrameGenerator
impl !UnwindSafe for ExportFrameGenerator
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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