mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-07 20:50:58 +00:00
4a833e7206
The camera was previously saved without escaping the name which made the values unusable after a settings load, for whatever reason replacing the backslashes when saving with / doesn't work but replacing them with | does. Also note that the OBS virtual cam (and any other cameras that only have directshow drivers) won't work because Qt6 dropped support for that and the ffmpeg backend doesn't seem to support it either. Closes #3468 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3630 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <dravee@eden-emu.dev> Co-authored-by: smiRaphi <neogt404@gmail.com> Co-committed-by: smiRaphi <neogt404@gmail.com>
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// Text : Copyright 2022 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <QDialog>
|
|
|
|
class QTimer;
|
|
class QCamera;
|
|
class QImageCapture;
|
|
class QMediaCaptureSession;
|
|
|
|
namespace InputCommon {
|
|
class InputSubsystem;
|
|
} // namespace InputCommon
|
|
|
|
namespace Ui {
|
|
class ConfigureCamera;
|
|
}
|
|
|
|
class ConfigureCamera : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ConfigureCamera(QWidget* parent, InputCommon::InputSubsystem* input_subsystem_);
|
|
~ConfigureCamera() override;
|
|
|
|
void ApplyConfiguration();
|
|
|
|
private:
|
|
void changeEvent(QEvent* event) override;
|
|
void RetranslateUI();
|
|
|
|
/// Load configuration settings.
|
|
void LoadConfiguration();
|
|
|
|
/// Restore all buttons to their default values.
|
|
void RestoreDefaults();
|
|
|
|
void DisplayCapturedFrame(int requestId, const QImage& img);
|
|
|
|
/// Loads and signals the current selected camera to display a frame
|
|
void PreviewCamera();
|
|
|
|
InputCommon::InputSubsystem* input_subsystem;
|
|
|
|
bool is_virtual_camera;
|
|
int pending_snapshots;
|
|
#if YUZU_USE_QT_MULTIMEDIA
|
|
std::unique_ptr<QCamera> camera;
|
|
std::unique_ptr<QImageCapture> camera_capture;
|
|
std::unique_ptr<QMediaCaptureSession> capture_session;
|
|
#endif
|
|
std::unique_ptr<QTimer> camera_timer;
|
|
std::vector<std::string> input_devices;
|
|
std::unique_ptr<Ui::ConfigureCamera> ui;
|
|
};
|