mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Const correctness, override keyword, a bunch of stuff..
This commit is contained in:
@@ -62,13 +62,13 @@ public:
|
||||
);
|
||||
~V4L2Grabber() override;
|
||||
|
||||
QRectF getSignalDetectionOffset()
|
||||
QRectF getSignalDetectionOffset() const
|
||||
{
|
||||
return QRectF(_x_frac_min, _y_frac_min, _x_frac_max, _y_frac_max);
|
||||
}
|
||||
|
||||
bool getSignalDetectionEnabled() { return _signalDetectionEnabled; }
|
||||
bool getCecDetectionEnabled() { return _cecDetectionEnabled; }
|
||||
bool getSignalDetectionEnabled() const { return _signalDetectionEnabled; }
|
||||
bool getCecDetectionEnabled() const { return _cecDetectionEnabled; }
|
||||
|
||||
int grabFrame(Image<ColorRgb> &);
|
||||
|
||||
@@ -128,27 +128,27 @@ public:
|
||||
///
|
||||
/// @brief overwrite Grabber.h implementation
|
||||
///
|
||||
QStringList getV4L2devices() override;
|
||||
QStringList getV4L2devices() const override;
|
||||
|
||||
///
|
||||
/// @brief overwrite Grabber.h implementation
|
||||
///
|
||||
QString getV4L2deviceName(QString devicePath) override;
|
||||
QString getV4L2deviceName(const QString& devicePath) const override;
|
||||
|
||||
///
|
||||
/// @brief overwrite Grabber.h implementation
|
||||
///
|
||||
QMultiMap<QString, int> getV4L2deviceInputs(QString devicePath) override;
|
||||
QMultiMap<QString, int> getV4L2deviceInputs(const QString& devicePath) const override;
|
||||
|
||||
///
|
||||
/// @brief overwrite Grabber.h implementation
|
||||
///
|
||||
QStringList getResolutions(QString devicePath) override;
|
||||
QStringList getResolutions(const QString& devicePath) const override;
|
||||
|
||||
///
|
||||
/// @brief overwrite Grabber.h implementation
|
||||
///
|
||||
QStringList getFramerates(QString devicePath) override;
|
||||
QStringList getFramerates(const QString& devicePath) const override;
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -169,6 +169,7 @@ private:
|
||||
void getV4Ldevices();
|
||||
|
||||
bool init();
|
||||
|
||||
void uninit();
|
||||
|
||||
bool open_device();
|
||||
@@ -250,12 +251,13 @@ private:
|
||||
|
||||
private:
|
||||
QString _deviceName;
|
||||
std::map<QString, QString> _v4lDevices;
|
||||
QMap<QString, V4L2Grabber::DeviceProperties> _deviceProperties;
|
||||
VideoStandard _videoStandard;
|
||||
io_method _ioMethod;
|
||||
int _fileDescriptor;
|
||||
std::vector<buffer> _buffers;
|
||||
std::map<QString, QString> _v4lDevices;
|
||||
QMap<QString, V4L2Grabber::DeviceProperties> _deviceProperties;
|
||||
|
||||
VideoStandard _videoStandard;
|
||||
io_method _ioMethod;
|
||||
int _fileDescriptor;
|
||||
std::vector<buffer> _buffers;
|
||||
|
||||
PixelFormat _pixelFormat;
|
||||
int _pixelDecimation;
|
||||
|
@@ -18,8 +18,8 @@ public:
|
||||
int pixelDecimation );
|
||||
~V4L2Wrapper() override;
|
||||
|
||||
bool getSignalDetectionEnable();
|
||||
bool getCecDetectionEnable();
|
||||
bool getSignalDetectionEnable() const;
|
||||
bool getCecDetectionEnable() const;
|
||||
|
||||
public slots:
|
||||
bool start() override;
|
||||
@@ -30,7 +30,7 @@ public slots:
|
||||
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
||||
void setSignalDetectionEnable(bool enable);
|
||||
void setCecDetectionEnable(bool enable);
|
||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard);
|
||||
void setDeviceVideoStandard(const QString& device, VideoStandard videoStandard);
|
||||
void handleCecEvent(CECEvent event);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
||||
|
||||
|
@@ -10,20 +10,20 @@ enum class VideoStandard {
|
||||
NO_CHANGE
|
||||
};
|
||||
|
||||
inline VideoStandard parseVideoStandard(QString videoStandard)
|
||||
inline VideoStandard parseVideoStandard(const QString& videoStandard)
|
||||
{
|
||||
// convert to lower case
|
||||
videoStandard = videoStandard.toLower();
|
||||
QString standard = videoStandard.toLower();
|
||||
|
||||
if (videoStandard == "pal")
|
||||
if (standard == "pal")
|
||||
{
|
||||
return VideoStandard::PAL;
|
||||
}
|
||||
else if (videoStandard == "ntsc")
|
||||
else if (standard == "ntsc")
|
||||
{
|
||||
return VideoStandard::NTSC;
|
||||
}
|
||||
else if (videoStandard == "secam")
|
||||
else if (standard == "secam")
|
||||
{
|
||||
return VideoStandard::SECAM;
|
||||
}
|
||||
|
Reference in New Issue
Block a user