rust-mobile / ndk

Rust bindings to the Android NDK
Apache License 2.0
1.11k stars 110 forks source link

image_reader: Add `AImageReader_newWithDataSpace()` from `api-level-34` #474

Closed MarijnS95 closed 3 months ago

MarijnS95 commented 4 months ago

Android 14 (U, API level 34) adds DataSpace support to ImageReader with a new constructor and a getter, and finally switches to the regular HardwareBufferFormat instead of the restricted ImageFormat enum to select the underlying buffer format. After all, an AImage can be turned into a HardwareBuffer which supports a wider range of formats.