RenderConfig constructor
RenderConfig({})
Creates a validated render configuration.
Implementation
RenderConfig({
required this.width,
required this.height,
required this.frameCount,
this.fps = VideoDefaults.fps,
this.startFrame = 0,
this.quality = Quality.high,
this.cacheEnabled = true,
}) {
if (width <= 0 || width.isOdd) {
throw ArgumentError.value(width, 'width', 'must be positive and even (yuv420p output)');
}
if (height <= 0 || height.isOdd) {
throw ArgumentError.value(height, 'height', 'must be positive and even (yuv420p output)');
}
if (fps <= 0) {
throw ArgumentError.value(fps, 'fps', 'must be positive');
}
if (frameCount <= 0) {
throw ArgumentError.value(frameCount, 'frameCount', 'must be positive');
}
if (startFrame < 0) {
throw ArgumentError.value(startFrame, 'startFrame', 'must be >= 0');
}
}