Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 24, 2024

Conversation

MarijnS95
Copy link
Member

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.

@MarijnS95 MarijnS95 force-pushed the imagereader-dataspace branch 4 times, most recently from 1b6b867 to 79cc7d1 Compare May 19, 2024 21:02
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.

Also clean up and commonize some panics on pedantic `.try_from()` checks.
@MarijnS95 MarijnS95 changed the title image_reader: Add api-level-34 AImageReader_newWithDataSpace() image_reader: Add AImageReader_newWithDataSpace() from api-level-34 May 24, 2024
@MarijnS95 MarijnS95 merged commit 1944c13 into master May 24, 2024
38 checks passed
@MarijnS95 MarijnS95 deleted the imagereader-dataspace branch May 24, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant