#[non_exhaustive]pub struct ProjectSettings {
pub width: u32,
pub height: u32,
pub frame_rate: FrameRate,
pub sample_rate: u32,
pub background: Rgb,
pub blend_space: BlendSpace,
pub color: ColorPipeline,
}Expand description
Output-wide settings independent of a renderer or encoder.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: u32Canvas width in output pixels, at most MAX_CANVAS_DIMENSION.
height: u32Canvas height in output pixels, at most MAX_CANVAS_DIMENSION. The
canvas area is at most MAX_CANVAS_PIXELS.
frame_rate: FrameRateTimeline frame rate.
sample_rate: u32Internal audio sample rate, within SAMPLE_RATE_RANGE.
background: RgbOpaque color under every layer, in preview and export alike.
Empty canvas, and whatever shows through a translucent layer, is this color rather than something a host or encoder decides.
blend_space: BlendSpaceThe space in which clips’ blend modes are evaluated, in preview and export alike.
color: ColorPipelineHow sources’ colors come into the working space.
Implementations§
Source§impl ProjectSettings
impl ProjectSettings
Sourcepub fn new(
width: u32,
height: u32,
frame_rate: FrameRate,
sample_rate: u32,
) -> Result<Self, ModelError>
pub fn new( width: u32, height: u32, frame_rate: FrameRate, sample_rate: u32, ) -> Result<Self, ModelError>
Creates validated output settings.
§Errors
Returns a model error when dimensions or sample rate exceed supported bounds.
Sourcepub fn with_background(self, background: Rgb) -> Result<Self, ModelError>
pub fn with_background(self, background: Rgb) -> Result<Self, ModelError>
Replaces the background color.
§Errors
Returns ModelError::InvalidBackground for a non-finite or
out-of-range component.