Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
Add getter for mCamera in JavaCameraView class#16759
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
asmorkalov commentedMar 8, 2020
Could you provide some reason why you want to expose camera object? The protect ed camera object guarantees that application has predictable lifecycle and camera settings are done in proper state. You can use inheritance and implement own class for specific behaviour, there is no need to modify original code. |
StidOfficial commentedMar 8, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It's more complex to create a extends class : Replace JavaCameraView component in xml layout and use it in normal code juste for enable/disable flash torch. |
asmorkalov commentedMar 11, 2020
Theoretically yes, but in practice even with flash you need to check flash mode availability (there is no flash for frontal camera), handle view events (turn it of, when camera view is closed), etc. So the amount of extra code lines for real use case is very small. |
asmorkalov commentedMar 11, 2020
@alalek What do you think about the patch? |
asmorkalov commentedMar 14, 2020
The solution was discussed with@alalek@VadimLevin@vpisarev and the team decided to reject the patch. There are several reasons for that:
|
Pull Request Readiness Checklist
See details athttps://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Example usage :