-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Feature Request] Camera frames access by native extension #2029
Comments
Hi Just reviewing this one, based on the other comments/updates made to linked issues recently .. and am curious: if you're looking to get hold of camera frames from within an ANE, then why do you not just directly request the camera via the ANE i.e. use the Android/Java code in the ANE to take a picture or kick off a video recording? thanks |
@ajwfrost Sometimes we are working with camera just from native extension (without AIR Basically all these issues around "how to improve performance?".
|
Feature Description
AIR should provide some way to get camera frames by native extension.
In many cases for image processing, computer vision and OpenCV usage you need fastest way to get "image bytes" from camera. Most of such operations should be done by native extensions. And getting frames from AS3
Camera
and then pass it to native extension, then convert to bytes and so on cause huge performance overhead. Especially for low-performance Android devices.Moreover
Camera
usage with AS3 side for Android cause terrible performance: #1980May be it related that AIR still uses legacy Android Camera API https://developer.android.com/guide/topics/media/camera, not CameraX https://developer.android.com/training/camerax or Camera2 https://developer.android.com/reference/android/hardware/camera2/package-summary.
If we get some way to get frames from camera by native extension it could increase overall performance for such applications.
For example, with Android native extension it could be new callback "on new image availability" which available through
FlashRuntimeExtensions
. With such callback we could get https://developer.android.com/reference/android/media/Image or frame YUV_420_888 bytes.May be access to camera object from native side also could be useful. In such way we could also configure other camera parameters like torch/flash, auto focus and other. https://developer.android.com/reference/android/hardware/camera2/CameraManager
Related issues:
#1895
#1348
#1344
Known Workarounds
Write own native extension for camera usage.
The text was updated successfully, but these errors were encountered: