mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 12:08:50 +03:00
96f791daf1
See also: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/ https://hynek.me/til/copyright-years/
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
// SPDX-FileCopyrightText: Nheko Contributors
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
#include <QObject>
|
|
|
|
typedef struct _GstDevice GstDevice;
|
|
|
|
class CallDevices final : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static CallDevices &instance()
|
|
{
|
|
static CallDevices instance;
|
|
return instance;
|
|
}
|
|
|
|
bool haveMic() const;
|
|
bool haveCamera() const;
|
|
std::vector<std::string> names(bool isVideo, const std::string &defaultDevice) const;
|
|
std::vector<std::string> resolutions(const std::string &cameraName) const;
|
|
std::vector<std::string>
|
|
frameRates(const std::string &cameraName, const std::string &resolution) const;
|
|
|
|
signals:
|
|
void devicesChanged();
|
|
|
|
private:
|
|
CallDevices();
|
|
|
|
friend class WebRTCSession;
|
|
void init();
|
|
GstDevice *audioDevice() const;
|
|
GstDevice *videoDevice(std::pair<int, int> &resolution, std::pair<int, int> &frameRate) const;
|
|
|
|
public:
|
|
CallDevices(CallDevices const &) = delete;
|
|
void operator=(CallDevices const &) = delete;
|
|
void deinit();
|
|
};
|