-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
🐛 Unable to use more than 3 video outputs on Android #2878
Comments
While debugging I came accross the
So this issue seems to be an api limitation? I can consistently repro this when I ahve more than 3 "video outputs" enabled at the same time(preview, photo, codescanner, frame processors) and it works fine when I remove any of them. |
Can you try setting I built VisionCamera to not have that limitation (that was a huge issue in native Camera APIs, so it's hard to work around this issue) |
I guess you meant Isn't it a limitation on the camera api itself?
|
@mrousavy Sorry if I'm missing something implementation wise, but it seems like we are assuming all devices will support binding any number of use cases— or at least that the camera api will disregard if not supported. Which doesn't seem to be the case and the camera API will just throw an exception. Seems like we should be using the I will try to fold the code scanner into my custom frame processor to reduce the number of use cases and workaround this. We cannot use multiple |
No;
|
Aha! Sorry, I didn't know that was a thing on Android(iOS works perfectly btw); unfortunately it doesn't seem to work as we would want it to :/ |
Hey - just created a PR to maybe fix this - can you test if that works for you? #2897 🙏 |
Will test it later today 🙌🏻 ! I ended up implementing the barcode recognizer with mlkit on a frame processor to reduce the number of outputs btw, that seems to work fine. |
Hey! I just tested on a Xiaomi Redmi 13C and it's still throwing the error. I'm using 4 video outputs: preview, take photo programatically, built-in code scanner, frame processors. |
Well then that means that the StreamSharing feature is not working properly on that specific phone. We'd need to report that bug to Google/CameraX. |
What's happening?
When I try to use more than 3 camera outputs on Android it throws an exception:
I'm using the example app code for the code scanner use case and adding a few more "video outputs" for running a frame processor & being able to take photos programatically.
I need to be able to run 4 "video ouputs" at the same time: preview the camera, take photos programatically, scan codes using the built-in code-scanner & run a frame processor:
Reproduceable Code
Relevant log output
Camera Device
Device
Pixel 6 API 30 emulator, also repo on real Xiaomi Redmi 13C
VisionCamera Version
main branch
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
The text was updated successfully, but these errors were encountered: