I have trouble with accessing cameras if my application is located on a share. When I run my application locally it shows the camera, but when the same application is run on a shared folder, the camera is gone.

I have check the windows permissions and found nothing. Firewalls and virus scanner all turned off. Share is located in the same domain and I access it with the same user as I use locally.

Does anyone know how to fix this? installing it locally is not a option.

QString txt(""); QCameraPermission cameraPermission; txt += "-------------------\n"; switch (qApp->checkPermission(cameraPermission)) { case Qt::PermissionStatus::Granted: txt += "Camera permission already granted. Starting camera...\n"; //startCamera(); // Your function to initialize and use the camera break; case Qt::PermissionStatus::Denied: txt += "Camera permission denied. Cannot start camera.\n"; // Show a message to the user break; case Qt::PermissionStatus::Undetermined: txt += "Camera permission is undetermined. Requesting now...\n"; // Request permission, passing 'this' and the slot for the callback //qApp->requestPermission(cameraPermission, this, &CameraWidget::permissionGranted); break; } txt += "-------------------\n\n"; const QList<QAudioDevice> audioDevices = QMediaDevices::audioInputs(); for (const QAudioDevice &device : audioDevices) { txt += "-------------------\n"; txt += "ID: " + device.id() + "\n"; txt += "Description: " + device.description() + "\n"; txt += (QString)"Is default: " + (device.isDefault() ? "Yes" : "No") + "\n"; txt += "-------------------\n"; } txt += "\n"; const QList<QCameraDevice> videoDevices = QMediaDevices::videoInputs(); for (const QCameraDevice &device : videoDevices) { txt += "-------------------\n"; txt += "ID: " + device.id() + "\n"; txt += "Description: " + device.description() + "\n"; txt += (QString)"Is default: " + (device.isDefault() ? "Yes" : "No") + "\n"; txt += "-------------------\n"; } QMessageBox msgBox; msgBox.setWindowTitle("Fatal error"); msgBox.setText(txt); msgBox.setInformativeText("Shutting down!"); msgBox.setIcon(QMessageBox::Critical); msgBox.setStandardButtons(QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); return msgBox.exec();

Error message:

enter image description here

Running on Windows 11 and using Qt6.9.1 with Visual Studio 2022

Jerry Coffin's user avatar

Jerry Coffin

495k83 gold badges657 silver badges1.2k bronze badges

vincent poortvliet's user avatar

5

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.