mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-24 10:10:05 -06:00
Merge origin/main into the NVENC branch. #183 already provides the HardwareEncoding enum, ExportSettings.hardware_encoding, the hardwareEncoding export param and the Export > Video > Hardware Encoding checkbox, so the duplicates from this branch are dropped and NVENC uses them. filmcraft-export is now an all-platform dependency of filmcraft-platform (VideoToolbox and NVENC both register encoders). Never-crash fixes in the NVENC backend: - submit() rejects a driver input pitch narrower than a row (and unlocks the buffer); fill_nv12 uses get_mut instead of slicing rows. - composition offsets use saturating math and i32::try_from; frame-rate, size and timestamp casts are checked; sizes above u16::MAX decline. - Annex B scanning and NAL type checks use get()/first(). - A failed nvEncOpenEncodeSessionEx that returns a handle destroys it. ffi.rs carries NVIDIA's MIT notice for nvEncodeAPI.h, listed in ATTRIBUTION.md under a new "Third-party source code" section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>