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

switch camera occur: [Camera2 Capture] Couldn't abort captures on session, error is ACAMERA_ERROR_SESSION_CLOSED #455

Open
LoyaiHai opened this issue Dec 2, 2024 · 2 comments

Comments

@LoyaiHai
Copy link

LoyaiHai commented Dec 2, 2024

Hi
@Viish

44/5000
When I was about to switch the front and rear cameras, I found that the device would report this error when the rear camera was switched to the front camera:
E/NdkCameraCaptureSession: ACameraCaptureSession_abortCaptures: session 0xb400007c853e3500 is already closed
E/linphone: [Camera2 Capture] Couldn't abort captures on session, error is ACAMERA_ERROR_SESSION_CLOSED
E/NdkCameraCaptureSession: ACameraCaptureSession_stopRepeating: session 0xb400007c853e3500 is already closed
E/linphone: [Camera2 Capture] Couldn't stop repeating session, error is ACAMERA_ERROR_SESSION_CLOSED
E/linphone: [Camera2 Capture] Failed to get a valid object to display camera preview from native window id [0x3846]
How should this bug be fixed?
Thank you
cheers

@LoyaiHai
Copy link
Author

LoyaiHai commented Dec 2, 2024

this is my code:
if (currentCore != null) {
String videoDevice = currentCore.getVideoDevice();
String[] videoDevicesList = currentCore.getVideoDevicesList();
for (int i = 0; i < videoDevicesList.length; i++) {
String tempVideoDevice = videoDevicesList[i];
if (!(videoDevice.equals(tempVideoDevice)) && !(videoDevice.equals("StaticImage: Static picture"))) {
currentCore.setVideoDevice(tempVideoDevice);
break;
}
}
}

@Viish Viish transferred this issue from BelledonneCommunications/linphone-android Dec 2, 2024
@LoyaiHai
Copy link
Author

LoyaiHai commented Dec 3, 2024

Hi
@Viish
Is the question invalid?

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

No branches or pull requests

1 participant